Read an Item

GET /items/:id

Read an Item by its ID, including a deleted Item if you still know the ID. Add ?expand=connect for current product details from its YBM Connect supplier, or ?expand=shop for ordering details. Both expansions require the X-Timezone-Offset header in minutes (for example, 0 for UTC).

Status codes

  • 200 on success
  • 400 on an invalid expand value or a missing timezone header for an expansion
  • 404 on item not found

Response properties

  • id: The item identifier
  • category: The ID of the Product group
  • name: The name of the Item
  • account_code: Optional string with the account code (optional)
  • external_id: External reference assigned to the Item. (optional)
  • vessel: The vessel object: (optional)
    • size: Size of the vessel in the specified unit
    • unit: One of "l", "dl", "cl", "ml", "kg", "g" or "quantity"
    • display_unit: When set, the vessel will be always converted to this unit when displayed. One of "kg", "l", "dl", "cl" (optional)
    • type: See vessel and bundle types (optional)
  • supplier contains information about the supplier: (optional)
    • id: The id of the supplier
    • reference: The supplier reference for this item (optional)
    • comment: Account-specific supplier note. (optional)
    • connect: For an imported Item, the connected product ID and whether its price is linked to the supplier. (optional)
  • bundles: The array of bundle objects: (optional)
    • type: See vessel and bundle types
    • size: The number of vessels in the bundle, or the number of bundles on the pallet if type is "PX"
    • unit: Set to g, if the bundle is by weight (optional)
    • pallet_bundle: Only if type is "PX". Specifies the bundle on the pallet:
  • price: The integer price in cents (optional)
  • container_price: Container deposit price in cents. (optional)
  • price_per: One of "vessel", "l", "kg" or "100g" (optional)
  • order_by: One of "vessel" or "kg" (optional)
  • count_fractions: Expresses how fractional counts will be represented. Can be one of "l", "dl", "cl", "ml", "kg", "g", "quantity", "quarters", "decimal", "none" (optional)
  • min_inventory: Minimum stock level, with integer count and an optional package unit. (optional)
  • custom_properties: Additional product details such as description and labels. (optional)
  • links: Object for replacement links with two properties: (optional)
    • replacement: The id of the item that is replacing this item (optional)
    • replaces: An array of ids of items this item is replacing (optional)
  • master_data_locked: Either not defined or Boolean true. It restricts changes to the Item's vessel and ordering unit; it can apply after stock use or from the start for an imported YBM Connect Item. (optional)
  • archived: The timestamp of when the item was archived. (optional)
  • pending_delete: The timestamp marking an Item with stock for deletion. (optional)
  • deleted: The timestamp of when the item was deleted. (optional)

Prices are only included if the caller has the Items:READ_PRICE permission. For supplier-managed product fields returned by expand=connect, see YBM Connect Items.

With expand=shop, the response can also include allow_comment, earliest_delivery and order_cutoff for ordering. These fields depend on the Item and its supplier settings.

Example response

{
  "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"
  }
}