Get Single Shopping List
Retrieves the details of a single shopping list, including its owner, status and products.
HTTP Request
- URL:
/shoppingList/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_SHOPPINGLISTorREAD_WRITE_SHOPPINGLIST
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | The ID of the shopping list to retrieve. |
cURL Example
curl --location '<BASE_URL>/shoppingList/6722d1a4b7c3e85f2a9d0b10' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The shopping list was returned successfully.
- 400 Bad Request: The access token is missing or invalid, does not have the required scope, or the shopping list ID is not valid.
Sample JSON Response
{
"success": true,
"data": {
"id": "6722d1a4b7c3e85f2a9d0b10",
"name": "Monthly Site Supplies",
"company": "65ba028af764f931f1c7c18b",
"customer": "66d07121db294e0b70180bf6",
"corporateCompany": null,
"isLocked": false,
"status": "pending",
"products": [
{
"id": "6722d1a4b7c3e85f2a9d0b11",
"productId": "65b88ef5045a7d009e79974b",
"quantity": 4
},
{
"id": "6722d1a4b7c3e85f2a9d0b12",
"productId": "66b4a01249e6ce3d41c428fa",
"variantId": "66d5a286fcb786834cebb16a",
"quantity": 20
}
],
"metaFields": [],
"createdBy": {
"id": "6650c2e9f1a3b84d2e7a9c01",
"name": "ERP Integration",
"type": "api"
},
"order": 0,
"createdAt": "2024-10-31T08:20:52.417Z",
"updatedAt": "2024-10-31T08:20:52.417Z"
}
}
Response Details
Shopping List Data
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the shopping list. |
name | String | Name of the shopping list. |
company | String | ID of the company that owns the list. |
customer | String | ID of the customer that owns the list. |
corporateCompany | String | ID of the corporate company that owns the list, or null. |
isLocked | Boolean | Whether the list is locked against changes. Default is false. |
status | String | pending, approved or rejected. Default is pending. |
products | Array | Products in the list. See below. |
metaFields | Array | Custom field values. See Metafields. |
approvedBy | String | ID of the customer who approved the list. Shown once the list is approved. |
createdBy | Object | Who created the list: id, name and type. |
order | Number | Display order. Default is 0. |
createdAt | String | Date and time the list was created (ISO 8601). |
updatedAt | String | Date and time the list was last updated (ISO 8601). |
Product Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the list item. |
productId | String | ID of the product. |
variantId | String | ID of the variant. Shown only for variant items. |
quantity | Number | Quantity of the product. |
Notes
- If no shopping list matches the ID,
datais an empty object.