Cette page n’est pas encore disponible en Français ; elle s’affiche donc en anglais.
The resources of API v1
Which endpoints exist, what they do and which scope each needs — including the hosted-only and app-only ones.
| Endpoint | What it does | Scope |
|---|---|---|
GET /me | Who is calling: the key (or app user), the workspace and the scopes | any |
GET|POST /customers, GET|PATCH /customers/{id} | Create dedupes on e-mail / phone (200 { existing: true }) | customers:* |
GET|POST /inquiries, GET /inquiries/{id} | Leads; type CONTACT, QUOTE, BOOKING or CALLBACK; source defaults to api | inquiries:* |
GET|POST /quotations, GET /quotations/{id} | Create makes a DRAFT with tax computed by the workspace's rules | quotations:* |
GET|POST /invoices, GET /invoices/{id} | Create makes a DRAFT — never sent or paid through the API | invoices:* |
GET /payments[/{id}] | Invoice payments (?invoice=<id>) — read-only | payments:read |
GET /orders[/{id}] | Shop orders | orders:read |
GET /products[/{id}], GET /products/lookup?code= | Products with stock; exact barcode / SKU match | products:read |
GET /warehouses, GET /stock, POST /stock/adjustments | Stock locations, levels, add / remove stock | stock:* |
GET /appointments[/{id}] | Appointments (from / to filter the start time) | appointments:read |
GET /pos-sales[/{id}] | Till sales and refunds — read-only | pos:read |
GET|POST /tasks, GET|PATCH /tasks/{id} | Tasks; DONE closes a task | tasks:* |
POST /attachments (multipart), GET /attachments/{id} | Upload a photo or PDF (images re-encoded, GPS removed) | attachments:write |
GET /events, GET /deliveries[/{id}] | Webhook event catalogue and delivery log | webhooks:read |
Hosted only: GET /categories, GET /services[/{id}], GET /booking-services[/{id}], GET /bookings/slots?service=&date=, GET|POST /bookings, and GET|POST /webhooks, DELETE /webhooks/{id}. App-token only (the zmle apps): POST /session/handoff, GET|POST /devices, DELETE /devices/{id}, GET /notifications.
Quotations and invoices include publicUrl — the customer link (/q/<token> or /i/<token>) that shows the document and lets the customer accept a quotation or pay an invoice.
curl -s "$ZMLE_BASE/products/lookup?code=6291041500213" -H "Authorization: Bearer $ZMLE_KEY"Written from: docs/API.md, src/lib/integrations/openapi.ts, src/lib/api-v1/resources.ts