Skip to content
Navigation

Get an order

Reads an order back, with its status and payment state.

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

Authorization

  • secretKey
    HTTP
    required

Path parameters

  • id
    string
    required

    The order id.

Returns

200

The order.

JSON
  • id
    optional
    string
  • status
    optional
    PENDING_PLACEMENT
    or
    PENDING_PAYMENT
    or
    PAYMENT_FAILED
    or
    PLACED
    or
    CHEF_STARTED
    or
    CHEF_COMPLETED
    +2 more
    • PENDING_PAYMENT: an online order, until the payment provider confirms.
    • PAYMENT_FAILED: the online payment failed or was cancelled.
    • PLACED: the restaurant received the order (offline, external, or a confirmed payment).
    • CHEF_STARTED: the restaurant started preparing it.
    • CHEF_COMPLETED: ready for pickup or out for delivery.
    • DECLINED, CANCELED: the restaurant refused or cancelled it.
    • PENDING_PLACEMENT: being placed; you will rarely see it.

    New statuses may be added: treat an unknown one as "in progress".

  • label
    optional
    string

    The status in the order's locale.

  • orderType
    optional
    TAKEOUT
    or
    DELIVERY
  • slotAt
    optional
    integer
  • paymentType
    optional
    online
    or
    offline
    or
    external
  • isPaid
    optional
    boolean

    Read the payment outcome from this, never from the return URL.

  • customerNotifications
    optional
    boolean

    false when Unipage sends the customer nothing for this order.

  • lines
    optional
    array of
    object

    Includes the restaurant's charges as lines with productId: null.

    • productId
      optional
      string | null
    • name
      optional
      string
    • quantity
      optional
      integer
    • optionsLabel
      optional
      string
    • total
      optional
      number
  • subtotal
    optional
    number
  • deliveryCost
    optional
    number
  • serviceCost
    optional
    number
  • couponDiscount
    optional
    number

    Every reduction (coupon, promotional offer).

  • total
    optional
    number
  • currency
    optional
    string
  • locale
    optional
    string
  • customer
    optional
    object
    • firstName
      optional
      string
    • lastName
      optional
      string
    • email
      optional
      string
  • delivery
    optional
    object | null

    For DELIVERY orders, else null.

    • street
      optional
      string
    • number
      optional
      string
    • postcode
      optional
      string
    • city
      optional
      string
    • zone
      optional
      string
  • createdAt
    optional
    integer

    Unix seconds.

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 id, or an order of another restaurant.
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