API reference › Clients › Locations
Retrieve all locations for a specific client
GET /v1/locations/{client}
- Scope
clients:readorassignments:readorshifts:readorschedule:readorconsumers:readorproviders:readorfinance:readorforms:read
Fetches all locations associated with the specified client ID, returning their basic details like label, address, and primary flag.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
client required | string | Unique identifier of the client Example |
Query parameters
| Name | Type | Description |
|---|---|---|
isPublished | boolean | Filter locations by their Published status. Example |
isActive | boolean | Filter locations by their Active status. Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/locations/{client}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Client Location details retrieved successfully
Client Location details retrieved successfully
{
"success": true,
"message": "Client Location details retrieved!",
"data": [
{
"id": "CLTLOC-HQBS7",
"label": "Example label",
"addressLine1": "123 Main St",
"addressLine2": "Suite 200",
"city": "Austin",
"state": {
"id": 1,
"label": "Example label",
"code": "string"
},
"postalCode": "90210",
"isPrimary": true,
"isDefault": true
}
]
}Response fields (15)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | array of object | |
data[].id | string | Example |
data[].label | string | Example |
data[].addressLine1 | string | Example |
data[].addressLine2 | string | Example |
data[].city | string | Example |
data[].state | object | |
data[].state.id | integer | Example |
data[].state.label | string | Example |
data[].state.code | string | Example |
data[].postalCode | string | Example |
data[].isPrimary | boolean | Example |
data[].isDefault | boolean | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'clients:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation error - Missing or invalid Client ID
{
"success": false,
"message": "Client ID is required.",
"errors": null
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Internal server error
{
"success": false,
"message": "An unexpected error occurred — please try again.",
"errors": "SQLSTATE[HY000]: General error: 1234 Something went wrong"
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null | Null in production. The exception message only when the application runs with debug on. Example |