Quickstart
This guide takes you from credentials to real task data using nothing but
curl. Every command runs against the sandbox; switch the base URL to
production once you are ready.
-
Export your credentials
Terminal window export UNIQUE_API=https://api-sandbox.uniqueonthego.comexport UNIQUE_CLIENT_ID=cli_4f2a9c7e1bexport UNIQUE_CLIENT_SECRET=sk_test_REPLACE_MEKeep the secret in your secret manager, not in source control.
-
Request an access token
Terminal window curl -s -X POST "$UNIQUE_API/oauth/token" \-u "$UNIQUE_CLIENT_ID:$UNIQUE_CLIENT_SECRET" \-d grant_type=client_credentials{"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMjYtMDkifQ...","token_type": "Bearer","expires_in": 3600,"scope": "tasks:read locations:read"}Save the token for the next steps:
Terminal window export UNIQUE_TOKEN=eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMjYtMDkifQ... -
List your locations
Terminal window curl -s "$UNIQUE_API/v1/locations" \-H "Authorization: Bearer $UNIQUE_TOKEN"{"data": [{"id": "loc_7Hq2Lm","name": "Avis Los Angeles Airport","timezone": "America/Los_Angeles","address": "9020 Aviation Blvd, Inglewood, CA 90301"}]} -
Fetch yesterday’s tasks at one location
Terminal window curl -s -G "$UNIQUE_API/v1/tasks" \-H "Authorization: Bearer $UNIQUE_TOKEN" \--data-urlencode "from=2026-09-26T00:00:00Z" \--data-urlencode "to=2026-09-27T00:00:00Z" \--data-urlencode "location_id=loc_7Hq2Lm" \--data-urlencode "limit=100"{"data": [{"id": "tsk_8sd2KqP1","vehicle_id": "4471209","mva": "4471209","vin": null,"task_type": "Oil Change","status": "completed","location": { "id": "loc_7Hq2Lm", "name": "Avis Los Angeles Airport" },"started_at": "2026-09-26T21:41:50Z","odometer_miles": 48210}],"next_cursor": null}To fetch one task again later, use its id:
Terminal window curl -s "$UNIQUE_API/v1/tasks/tsk_8sd2KqP1" \-H "Authorization: Bearer $UNIQUE_TOKEN"
Next steps
Section titled “Next steps”- Loop over pages with
next_cursor: Pagination. - Cache the token instead of requesting one per call: Authentication.
- Understand every field: Data model.
- Try the endpoints from your browser: API reference.