Responses
All API calls will return a standard HTTP response code as indicated below. Response payload examples are indicated below, however each API endpoint should indicate the actual structure of the response payload.
Success
HTTP Code: 200
Example Response
{
"status": "success",
"request_id": "<request id>"
}
Success No Content
HTTP Code: 204
Note
No response payload will be provided
Paginated Lists
API endpoints that return lists of resources use a paginated response envelope. The response includes the total count and URLs for navigating between pages.
Example Response
{
"count": 356,
"next": "https://<domain>/api/v1.5/products/?page=2",
"previous": null,
"results": [
{ "..." : "..." }
]
}
Field |
Type |
Description |
|---|---|---|
|
integer |
Total number of results across all pages |
|
string or null |
URL for the next page of results, or |
|
string or null |
URL for the previous page of results, or |
|
array |
The list of resource objects for the current page |
To retrieve a specific page, add the page query parameter to the endpoint URL:
GET /api/v1.5/products/?page=3
Note
Paginated responses are used by LucidSource list endpoints (products, batches, assets). LucidRetail endpoints return individual resources.
Bad Request
HTTP Code: 400
Example Response
{
"status": "invalid payload",
"reason": {
"items": [
"Unknown LucidID(s)."
]
}
}
Invalid Payload
HTTP Code: 403
reasonshould contain one or more errors with the submitted data
Example Response
{
"status": "invalid payload",
"reason": {
"items": [
"Unknown LucidID(s)."
]
}
}
Method Not Allowed
HTTP Code: 405
Example Response
{
"detail": "Method \"PUT\" not allowed."
}
Application Error
HTTP Codes: 500, 502, 503, 504
Note
No response payload will be provided