Skip to content
Navigation

Get the schedule

Selectable pickup or delivery slots for the coming days. Past slots and slots too close to now are left out.

Some products need a longer preparation time or must be ordered days in advance; with products the slots respect those rules, exactly as POST /orders will. Send it whenever the cart is not empty, and reload the schedule when the set of products changes.

GET
https://api.unipage.eu/storefront/v1/schedule

Authorization

  • publicKey
    optional
    API key in header
  • secretKey
    optional
    HTTP

Query parameters

  • orderType
    TAKEOUT
    or
    DELIVERY
    required

    The order type to read for.

  • days
    optional
    integer

    Number of days, starting today in the restaurant's timezone. A value above 14 is read as 14.

    maximum: 14 · minimum: 1 · default: 7
  • products
    optional
    string

    The comma-separated product ids in the cart, at most 100. An unknown id is a 422 VALIDATION (fields.products).

Returns

200

The schedule.

JSON
  • timezone
    optional
    string
  • days
    optional
    array of
    object
    • date
      optional
      string

      YYYY-MM-DD in the restaurant's timezone.

    • weekday
      optional
      string
    • isOpen
      optional
      boolean

      false (with slots: []) for a day without a selectable slot.

    • slots
      optional
      array of
      object
      • time
        optional
        string

        HH:MM in the restaurant's timezone.

      • at
        optional
        integer

        Unix seconds. Send it as slotAt.

      • available
        optional
        boolean

        false means the slot exists but is full.

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.

422

The request is not valid, see fields (VALIDATION).
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