This page documents every API endpoint the Ergane Pro Zapier integration uses. For setup steps, see Ergane Pro + Zapier.
Base URL
https://blissful-herring-315.convex.site is the production API for Ergane Pro (the web app runs at https://app.erganepro.com). All requests use HTTPS.
Authentication (OAuth 2.0, authorization code)
-
Authorize:
GET https://app.erganepro.com/zapier/connectwithclient_id,redirect_uri,stateandresponse_type=code. The user signs in to Ergane Pro and approves the connection for their company. The authorization code is single-use and expires after 10 minutes. -
Token:
POST /zapier/token(form-encoded) withcode,client_id,client_secret,redirect_uriandgrant_type=authorization_code. Returns JSON withaccess_tokenandtoken_type. Onlygrant_type=authorization_codeis supported; any other grant returnsinvalid_grant. -
Requests: send
Authorization: Bearer <access_token>on every call. Each token only accesses the company that approved it.
Token lifetime
Access tokens do not expire, so there is no refresh token and no expires_in. A token stays valid until the company disconnects Zapier in Ergane Pro or the company account is paused. After that, requests return 401 and the customer is asked to reconnect.
Endpoints
| Method and path | Purpose |
|---|---|
GET /zapier/me |
Tests the connection. Returns JSON with name and company (the company name, used as the connection label). |
POST /zapier/subscribe/{event} |
Registers a webhook for one event. JSON body: {"target_url": "..."}. Returns JSON with the subscription id. |
DELETE /zapier/unsubscribe/{id} |
Removes the webhook with that subscription id. |
GET /zapier/sample/{event} |
Returns a list of recent example records for that event, used when testing a trigger. |
Webhook delivery
When an event happens, Ergane Pro sends a POST with a JSON body describing the record to every target_url subscribed to that event for that company.
Events
| Event key | Sent when |
|---|---|
job_created |
A job is booked. |
job_completed |
A job is completed. |
job_status_changed |
A job's status changes. |
invoice_sent |
An invoice is emailed to a customer. |
invoice_item |
An invoice is sent, once for each line item. |
invoice_paid |
A payment is recorded or a card payment is made. |
quote_accepted |
A customer signs and accepts a quote. |
quote_declined |
A customer declines a quote. |
customer_created |
A customer is added. |
membership_sold |
A membership is sold. |
membership_renewed |
A membership is renewed. |
membership_cancelled |
A membership is cancelled. |
service_request |
The online service request form is submitted. |
equipment_added |
Equipment is added to a customer. |
warranty_added |
A warranty is added to a customer. |
Errors
-
401with{"error":"unauthorized"}: the token is missing, invalid or revoked (the company disconnected or was paused). The customer should reconnect. -
invalid_grantfrom/zapier/token: an expired, reused or invalid authorization code, or an unsupported grant type.
Contact
Technical questions: stacy@foreenterprisesllc.com