This section is written for engineers and integrators. Operators who need to issue or revoke credentials should start with API clients.
Base URL
All endpoints are served from the adorabl application origin, currentlyhttps://sherpa-topaz.vercel.app. Resource endpoints live under /api/v1; the token endpoint is /api/oauth/token.
Authentication
1
Obtain client credentials
An organization admin issues a client under Settings → Data & Admin → API clients and grants it scopes. The client secret is shown once.
2
Request an access token
Send a Tokens expire after one hour. Request a new one rather than caching past
client_credentials grant to POST /api/oauth/token. The body may be form-encoded or JSON.expires_in.3
Call the API
Send the token as a bearer header on every resource request.
Scopes
A request without the required scope returns
403 with {"error": "insufficient_scope", "details": {"required": "<scope>"}}.
Conventions
Response envelope
Every successful response wraps the payload indata.
- Get by id returns a single object:
{ "data": { ... } }. - List returns an array plus a cursor:
{ "data": [ ... ], "nextCursor": "<opaque>" | null }. - Create returns
201with the same shape as a get. - Update returns
200with the same shape as a get.
Shape guarantees
- Child collections —
addresses,contacts,uomConversions,lines— are always present. An empty collection is[], never omitted. - Optional singular references —
terms,customerGroup,supplierGroup,paymentMethod,category,preferredSupplier,baseUom,customer,warehouse,shipTo,billTo— arenullwhen unset, never omitted. Suppliertermsis a string. - Never send an empty object
{}for a missing child; omit the field or sendnull.
Pagination
List endpoints acceptlimit (1–200, default 50) and cursor. Pass the nextCursor from one page as the cursor of the next until nextCursor is null. Cursors are opaque; do not construct them.
Writes
- Send the record inside
{ "data": { ... } }. - Server-owned fields —
id,customerNumber,supplierNumber,skuon update,orderNumber, timestamps, totals, and childids — are ignored and recomputed. PUTis a partial header update: omitted header fields keep their current values. Omitted child collections are left unchanged; send[]to clear one.- Create and update rules match the adorabl screens. For example, a sales order
POSTcreates a draft, andPUT /api/v1/sales-orders/{id}only succeeds while the order is still a draft — later statuses return409.
Errors
Errors return a JSON body with a stableerror code and optional details.
Example: create a draft sales order
id or a natural key — customerNumber for customers, sku for items. The response is the full sales order with computed totals and lines populated; drafts receive their orderNumber when they are submitted in adorabl. Submit, fulfill, and invoice the order from the adorabl screens — see Sales orders & fulfillment.
Endpoint reference
The Customers, Suppliers, Items, and Sales orders sections in the sidebar are generated from the OpenAPI document and include request and response schemas plus an interactive playground for every endpoint. Paste a bearer token fromPOST /api/oauth/token into the playground’s authorization field to try calls against your organization.
