Orders

Read an order

An application secret reads any order this application caused. A connected person's token reads only that person's orders this application drove, in the same shape. A build grant reads only an order a build grant from this application built for the same person, in the same environment. An order belonging to another application or another person is a 404, never a 403.

get/orders/{orderId}

Request

  • Base URL: https://api.layout.link/v1
  • URL: https://api.layout.link/v1/orders/{orderId}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

orderIdstring required

Headers

Layout-Version'2026-10-01'

The API version you code against. Optional; without it you get 2026-10-01, the current version. Layout answers with the version it used.

Response

The order.

idstring required
state'building' | 'carted' | 'placing' | 'placed' | 'failed' | 'unconfirmed' | 'refunded' required
storestring nullable required
store_addressstring nullable required

The address of that store, when Layout knows it.

itemsinteger required
total_minorinteger nullable required

Minor units. 2140 is $21.40.

currencystring required
created_atstring required
placed_atstring nullable required
ready_etastring nullable required

The pickup time as the store stated it, word for word, when the store states one. Layout reads it from the store's confirmation screen and its email, so it can arrive after placed, with an order.updated event. Null until then, and null for good when the store never states a time; the person then goes by the store's own confirmation. Show it as written; it is not a timestamp.

failure_codestring nullable required

A stable machine code, never prose. Read it only when state is failed or unconfirmed: an order still placing can carry one before it settles, so switch on state first. One of LOGIN_REQUIRED, SITE_BLOCKED, RATE_LIMITED, ITEM_UNAVAILABLE, SITE_ERROR, STORE_CLOSED, PICKUP_TIME_EXPIRED, CHECKOUT_NOT_FOUND, ORDERING_PAGE_NOT_FOUND, CLOSED_NEXT_DAY, MARKETPLACE_ONLY, APP_ONLY_ORDERING, ACCOUNT_VERIFICATION_REQUIRED, CART_DRIFTED, CARD_DECLINED, CARD_REMOVED, PAYMENT_REJECTED, OUR_TIMEOUT, OUR_ERROR, UNCONFIRMED, UNKNOWN, USER_CANCELED, STAFF_STOPPED, SESSION_EXPIRED, SUPERSEDED_BY_CHANGE. Treat any value you do not recognise as UNKNOWN.

simulatedtrue

Present and true on a sandbox order that was simulated. Absent on every real order.

Example response

{
  "id": "ord_7c21e4b9a0d3",
  "store": "Layout test kitchen",
  "store_address": "1 Sandbox Way, San Francisco, CA 94107",
  "currency": "usd",
  "ready_eta": "Ready by 6:15 PM",
  "fulfillment": {
    "name": "Cole",
    "address": "709 Cirby Way, Roseville, CA 95678",
    "ready_text": "Ready by 6:15 PM",
    "merchant_order_number": "71711896",
    "instructions": "Pick up at the mobile order counter"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.