API
Locations
Create, list, update, and delete canonical location records in your organization. Locations are environment-scoped (test vs live) based on your API key. Supports idempotency via the Idempotency-Key header.
POST
/v1/locationsAuthorizations
Authorizationstringheaderrequired
Bearer token. Use a test key from the dashboard. The header is Authorization: Bearer <token>.
"Bearer trq_test_…"
Body
{
"name": "Warehouse A",
"coordinates": { "latitude": 24.7136, "longitude": 46.6753 },
"address": {
"formatted": "Al Olaya St, Riyadh",
"city": "Riyadh",
"country_code": "SA"
},
"tags": ["warehouse"],
"external_reference": "WH-001"
}Response
200 · application/json
Errors
| Code | HTTP | When |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid API key or session token. |
| FORBIDDEN | 403 | The credential is valid but lacks permission for this action. |
| INVALID_INPUT | 400 | The request body failed validation. |
| INVALID_COORDINATES | 400 | Latitude or longitude is out of range. |
| NOT_FOUND | 404 | The location does not exist in your organization. |
| CONFLICT | 409 | Idempotency key reused with a different payload. |
| RATE_LIMITED | 429 | Too many requests. |