Claret Docs
Search
K

Authentication

Claret API Authentication Processes
All Claret API calls are authenticated with tokens. Before making a call, you must authenticate first. You do this by first creating an authentication token and then use that token in the header of the subsequent API calls.
NOTE that all references to {tenant} should be replaced with the name of the Claret tenant (i.e., demo, zymoeno, etc.)
post
https://plan.claret.app/{tenant}/api/v1/tokens/create
Once the authentication token has been successfully retrieved, it can be used as a Bearer token within the header of each subsequent API call.
Example:
curl --location --request GET 'https://plan.claret.app/{tenant}/api/v1/sales?sale_type_name=History' \
--header 'X-Requested-With: XMLHttpRequest' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|bfDoNPffjU6k541RYSLB68oEfHySweWJ2HSx34sZ' \