Skip to main content

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_SHOPPINGLIST or READ_WRITE_SHOPPINGLIST

Path Parameters​

ParameterTypeDescription
idStringThe 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​

FieldTypeDescription
idStringUnique identifier of the shopping list.
nameStringName of the shopping list.
companyStringID of the company that owns the list.
customerStringID of the customer that owns the list.
corporateCompanyStringID of the corporate company that owns the list, or null.
isLockedBooleanWhether the list is locked against changes. Default is false.
statusStringpending, approved or rejected. Default is pending.
productsArrayProducts in the list. See below.
metaFieldsArrayCustom field values. See Metafields.
approvedByStringID of the customer who approved the list. Shown once the list is approved.
createdByObjectWho created the list: id, name and type.
orderNumberDisplay order. Default is 0.
createdAtStringDate and time the list was created (ISO 8601).
updatedAtStringDate and time the list was last updated (ISO 8601).

Product Object​

FieldTypeDescription
idStringUnique identifier of the list item.
productIdStringID of the product.
variantIdStringID of the variant. Shown only for variant items.
quantityNumberQuantity of the product.

Notes​

  • If no shopping list matches the ID, data is an empty object.