Connect API Documentation

https://connect.yourbarmate.com/api
Changelog

Read a product

GET /products/:id

Parameters

  • id: The identifier as specified when the product was created

Status codes

  • 200 on success
  • 404 if no product with the given id was found

Response properties

  • id: The product identifier
  • status: One of "ACTIVE", "INACTIVE" or "OUT_OF_STOCK"
  • category: The ID of the product category
  • name: The product name
  • order_by: One of "vessel" or "kg", if specified
  • vessel: The vessel object:
    • id: The custom vessel identifier
    • size: Size of the vessel in the specified unit
    • unit: One of "l", "dl", "cl", "ml", "kg", "g" or "quantity"
    • type: See vessel and bundle types
  • bundles: The array of bundle objects:
    • id: The custom bundle identifier
    • id_override: The custom product ID override
    • 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 kg, if the bundle is by weight
    • pallet_bundle: Only if type is "PX". Specifies the bundle on the pallet:
  • price: The integer price in cents, if available
  • price_per: One of "vessel", "l", "kg" or "100g", if specified when creating the product
  • min_order_count: The minimum number of vessels or kilos that can be ordered, depending on order_by
  • delivery_days: An object with one required (lead_days) and one optional (cutoff) parameter, indexed by the day of the week as a number between 0 (Sunday) and 6 (Saturday)
  • delivery_date_overrides: An object with one required (lead_days) and one optional (cutoff) parameter, indexed by the ISO date it refers to (e.g. "2023-12-26")
  • dates_with_no_delivery: A list of dates in ISO date format. It contains all the dates when the supplier will not deliver this item
  • pricing: Optional scaled pricing setup
    • strategy: The pricing strategy, one of "VOLUME", "INCREMENTAL", or "DIVISIBLE"
    • price_points: The prices used in the pricing based on the quantity of items.
      • from: The number of items the price point is applied from
      • price: The price for one item
    • date_overrides: An array of date periods where the price points are different from the default ones. Each item of the array can have the following properties:
      • from_date: The start of the validity for the date override. Can be open ended if no to_date is given.
      • to_date: The last day of the date range. It is inclusive, the override is still valid on this date.
      • price_points: The price points to be used for this date range or from this start date.

Example response

{
"id": "123456789",
"status": "ACTIVE",
"category": "SPIRITS",
"name": "Vodka",
"vessel": {
"size": 7,
"unit": "dl",
"type": "BO"
},
"bundles": [
{
"id": "001",
"type": "CT",
"size": 6
}
],
"price": 750,
"min_order_count": 6,
"delivery_days": {
"1": { "lead_days": 3 },
"3": { "lead_days": 1, "cutoff": "11:00" },
"5": { "lead_days": 1, "cutoff": "11:00" }
},
"dates_with_no_delivery": ["2023-12-26"]
}