Skip to content
Navigation

Get a product

A product with its option groups. Takes the same orderType and at as the menu; a product hidden at that moment answers "available": false. The quote and the order enforce the same option rules.

GET
https://api.unipage.eu/storefront/v1/products/{id}

Authorization

  • publicKey
    optional
    API key in header
  • secretKey
    optional
    HTTP

Path parameters

  • id
    string
    required

    The product id.

Query parameters

  • orderType
    TAKEOUT
    or
    DELIVERY
    required

    The order type to read for.

  • at
    optional
    integer

    Unix seconds of the chosen slot, default now. Prices and visibility follow the menu plan of that moment.

Returns

200

The product and its option groups.

JSON
  • id
    optional
    string
  • name
    optional
    string
  • description
    optional
    string | null
  • price
    optional
    number
  • priceType
    optional
    PER_UNIT

    Products priced by weight are not supported.

  • image
    optional
    string | null

    Image URL.

  • available
    optional
    boolean

    false means not orderable right now: show it greyed out.

  • soldOut
    optional
    boolean

    true means out of stock.

  • hasOptions
    optional
    boolean

    Get the product to read its option groups.

  • maxPerOrder
    optional
    integer | null
  • allergens
    optional
    array of
    gluten
    or
    crustaceans
    or
    eggs
    or
    fish
    or
    peanuts
    or
    soybeans
    +8 more
  • allergenSources
    optional
    map of
    array<string>

    The specific cereal (wheat, spelt, khorasan, rye, barley, oats) or nut (almonds, hazelnuts, walnuts, cashews, pecans, brazil_nuts, pistachios, macadamia) per allergen, when the restaurant recorded it. EU food-information rules ask you to show it before the order is placed: "gluten (wheat)".

  • optionGroups
    optional
    array of
    object
    • id
      optional
      string
    • name
      optional
      string
    • type
      optional
      RADIO
      or
      SELECT
      or
      CHECKBOX
      or
      AMOUNT
      • RADIO, SELECT: one option; required unless required: false (then zero or one).
      • CHECKBOX: between min and max options.
      • AMOUNT: a quantity per option; the sum is between min and max.
    • min
      optional
      integer
    • max
      optional
      integer | null

      0 or null means no maximum.

    • required
      optional
      boolean
    • options
      optional
      array of
      object
      • id
        optional
        string
      • name
        optional
        string
      • price
        optional
        number
      • available
        optional
        boolean

401

A missing, unknown or revoked key (UNAUTHENTICATED).
JSON
  • error
    object
    required
    • code
      UNAUTHENTICATED
      or
      FORBIDDEN
      or
      NOT_FOUND
      or
      METHOD_NOT_ALLOWED
      or
      VALIDATION
      or
      SLOT_UNAVAILABLE
      +6 more
      required
    • message
      string
      required

      Human readable.

    • fields
      optional
      map of
      string

      Only present when the error belongs to specific request fields.

403

A public key on a secret route, or used from an origin that is not registered for it (FORBIDDEN).
JSON
  • error
    object
    required
    • code
      UNAUTHENTICATED
      or
      FORBIDDEN
      or
      NOT_FOUND
      or
      METHOD_NOT_ALLOWED
      or
      VALIDATION
      or
      SLOT_UNAVAILABLE
      +6 more
      required
    • message
      string
      required

      Human readable.

    • fields
      optional
      map of
      string

      Only present when the error belongs to specific request fields.

404

Unknown route, product or order (NOT_FOUND).
JSON
  • error
    object
    required
    • code
      UNAUTHENTICATED
      or
      FORBIDDEN
      or
      NOT_FOUND
      or
      METHOD_NOT_ALLOWED
      or
      VALIDATION
      or
      SLOT_UNAVAILABLE
      +6 more
      required
    • message
      string
      required

      Human readable.

    • fields
      optional
      map of
      string

      Only present when the error belongs to specific request fields.

429

Too many requests (RATE_LIMITED). Wait Retry-After seconds.
JSON
  • error
    object
    required
    • code
      UNAUTHENTICATED
      or
      FORBIDDEN
      or
      NOT_FOUND
      or
      METHOD_NOT_ALLOWED
      or
      VALIDATION
      or
      SLOT_UNAVAILABLE
      +6 more
      required
    • message
      string
      required

      Human readable.

    • fields
      optional
      map of
      string

      Only present when the error belongs to specific request fields.

Type to search…

↑↓ navigate↵ selectEsc close