Quickstart
Create a token and make your first Claret API call in five minutes.
This guide takes you from nothing to a working API call in about five minutes. You will create a token, make your first request, and read the response.
1. Create a token
Log into Claret and go to Settings → Workspace Settings → API Access.
On the Tokens tab, click Create Token.
Name it (for example,
quickstart) and select the Read scope.Click Create, then copy the token now. It is shown only once.
The token looks like 42|clrt_aBcDeF.... Keep it somewhere safe.
For more on tokens and scopes, see Authentication & Tokens and the Scopes Reference.
2. Make your first call
Call a reference endpoint to list units of measure. This is the lightest possible request and confirms everything is wired up:
curl "https://plan.claret.app/{tenant}/api/v1/uoms" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"3. Read the response
A successful call returns 200 with the standard response envelope:
Every response follows this shape:
dataholds the result, keyed by the resource name.metaholds credit usage and pagination details.linksholds navigation links when applicable.
The response headers also report usage: X-Api-Credits-Remaining and X-RateLimit-Remaining.
4. Try a filtered query
Add query parameters to narrow results. This fetches items whose name contains "Chardonnay", sorted by name:
See Filtering & Sorting for the full query syntax and Pagination for paging through large result sets.
Next steps
Understand tokens and authorization
Page through large datasets
Filter, sort, and include relationships
Sync inventory, pull sales, generate a plan
Handle errors
Browse every endpoint
the API Reference section
Last updated
Was this helpful?