API reference › Preferred lists › Preferred list
Retrieve a specific preference list entry
GET /v1/preference-list/{preference_list}
- Scope
settings_preferred_users:read- Roles
- admin, scheduler
Fetches a single preference list entry based on the provided ID.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
preference_list required | integer | ID of the preference list entry Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/preference-list/{preference_list}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Preference entry retrieved successfully
Preference entry retrieved successfully
{
"success": true,
"message": "Preference List entry retrieved.",
"data": {
"id": 1,
"preferredUser": {
"id": "SPR-AJKF8",
"label": "John Service"
},
"preferredUserRoleName": "admin",
"preferredRole": {
"id": 1,
"label": "Example label",
"slug": "example-slug"
},
"preferredUserImage": "https://cdn.example.com/image.png",
"preferredUserOnlineStatus": "online",
"notes": "Added by the scheduler.",
"isBehalfOfOrg": true,
"preferredBy": {
"id": "CLT-EDFFGJ",
"label": "Client"
},
"preferredByOnlineStatus": "online",
"preferredByRoleName": "admin",
"preferredByRole": {
"id": 1,
"label": "Example label",
"slug": "example-slug"
},
"preferredByImage": "https://cdn.example.com/image.png"
}
}Response fields (26)
3 top-level fields; 1 hold nested fields, listed below.
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object (23 nested) |
Nested fields
data 23 fields
| Field | Type | Description |
|---|---|---|
data.id | integer | Example |
data.preferredUser | object | |
data.preferredUser.id | string | Example |
data.preferredUser.label | string | Example |
data.preferredUserRoleName | string or null | Example |
data.preferredRole | object or null | |
data.preferredRole.id | integer or null | Example |
data.preferredRole.label | string or null | Example |
data.preferredRole.slug | string or null | Example |
data.preferredUserImage | string or null | Example |
data.preferredUserOnlineStatus | string | Example |
data.notes | string | Example |
data.isBehalfOfOrg | boolean | Example |
data.preferredBy | object | |
data.preferredBy.id | string | Example |
data.preferredBy.label | string | Example |
data.preferredByOnlineStatus | string | Example |
data.preferredByRoleName | string or null | Example |
data.preferredByRole | object or null | |
data.preferredByRole.id | integer or null | Example |
data.preferredByRole.label | string or null | Example |
data.preferredByRole.slug | string or null | Example |
data.preferredByImage | string or null | 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 'settings_preferred_users: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 |
404 Not found
Preference entry not found
{
"success": false,
"message": "Preference List entry not found.",
"errors": null
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string |
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
Unexpected server error
{
"success": false,
"message": "Something went wrong!",
"errors": "Internal server exception message"
}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 |