Read list of Items

GET /items

Parameters

All query parameters are optional.

  • offset: Pagination offset, the index of the first item returned. Items are returned in alphabetic order. If not defined it defaults to 0.
  • limit: Page size for pagination, defaults to 25. Maximum value is 100.
  • status: Filter by Item status. Can be set to "ACTIVE" or "INACTIVE".
  • category: Filter by item category. The value should be a category id.
  • supplier: Filter by supplier. The value is the numeric supplier id.

Status codes

  • 200 on success
  • 400 on invalid request parameter

Response properties

  • total: The total number of items that fulfill the filter criteria.
  • items: The array of Item objects.

You can see all the Item properties on the GET /items/:id page under "Response properties".

Example request

Query the first 25 items:

GET /items

Query the first 33 active items:

GET /items?status=ACTIVE&limit=33

Query the first 25 active items for a specific supplier:

GET /items?status=ACTIVE&supplier=1693919950079

Query the second page of items, each page containing 50 items.

GET /items?offset=100&limit=50

Example response

{
  "total": 2,
  "items": [
    {
      "id": "itm_oh0IyIjqvd",
      "category": "cat_KaNDv51Gh0",
      "name": "Vodka",
      "vessel": {
        "size": 7,
        "unit": "dl",
        "type": "BO"
      },
      "bundles": [
        {
          "type": "CT",
          "size": 6
        }
      ],
      "price": 750,
      "supplier": {
        "id": 1693919950079,
        "reference": "1100992"
      }
    },
    {
      "id": "itm_xAWy4N9VCg",
      "category": "cat_myTRpvnsNb",
      "name": "Chicken breast",
      "vessel": {
        "size": 1,
        "unit": "kg"
      },
      "price": 990,
      "price_per": "kg",
      "order_by": "kg",
      "supplier": {
        "id": 1663919969543,
        "reference": "prd-chicken-998"
      }
    }
  ]
}