---
title: "Get an order"
description: "Reads an order back, with its status and payment state."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.unipage.be/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Storefront API › Orders

`GET /orders/{id}`

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

## Authentication

- `secretKey`, http, header `Authorization`

## Path parameters

- `id` (`getOrder.path.id`; string, required) — The order id.

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.unipage.eu/storefront/v1/orders/q4m8z \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.unipage.eu/storefront/v1/orders/q4m8z';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.unipage.eu/storefront/v1/orders/q4m8z"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The order.

#### Example

```json
{
  "id": "q4m8z",
  "status": "PLACED",
  "label": "Order received",
  "orderType": "TAKEOUT",
  "slotAt": 1792750500,
  "paymentType": "online",
  "isPaid": true,
  "customerNotifications": true,
  "lines": [
    {
      "productId": "p7d2x",
      "name": "Medium fries",
      "quantity": 1,
      "optionsLabel": "",
      "total": 4
    }
  ],
  "subtotal": 4,
  "deliveryCost": 0,
  "serviceCost": 0.5,
  "couponDiscount": 0,
  "total": 4.5,
  "currency": "EUR",
  "locale": "nl",
  "customer": {
    "firstName": "Ann",
    "lastName": "Example",
    "email": "ann@example.com"
  },
  "delivery": {
    "street": "string",
    "number": "string",
    "postcode": "string",
    "city": "string",
    "zone": "string"
  },
  "createdAt": 1792749000
}
```

- `id` (`getOrder.response.200.id`; string, optional)
- `status` (`getOrder.response.200.status`; string, optional) — - `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".
  - one of `"PENDING_PLACEMENT"`, `"PENDING_PAYMENT"`, `"PAYMENT_FAILED"`, `"PLACED"`, `"CHEF_STARTED"`, `"CHEF_COMPLETED"`, `"DECLINED"`, `"CANCELED"`
- `label` (`getOrder.response.200.label`; string, optional) — The status in the order's locale.
- `orderType` (`getOrder.response.200.orderType`; string, optional)
  - one of `"TAKEOUT"`, `"DELIVERY"`
- `slotAt` (`getOrder.response.200.slotAt`; integer, optional)
- `paymentType` (`getOrder.response.200.paymentType`; string, optional)
  - one of `"online"`, `"offline"`, `"external"`
- `isPaid` (`getOrder.response.200.isPaid`; boolean, optional) — Read the payment outcome from this, never from the return URL.
- `customerNotifications` (`getOrder.response.200.customerNotifications`; boolean, optional) — `false` when Unipage sends the customer nothing for this order.
- `lines` (`getOrder.response.200.lines`; array<object>, optional) — Includes the restaurant's charges as lines with `productId: null`.
  - `productId` (`getOrder.response.200.lines.productId`; string | null, optional)
  - `name` (`getOrder.response.200.lines.name`; string, optional)
  - `quantity` (`getOrder.response.200.lines.quantity`; integer, optional)
  - `optionsLabel` (`getOrder.response.200.lines.optionsLabel`; string, optional)
  - `total` (`getOrder.response.200.lines.total`; number, optional)
- `subtotal` (`getOrder.response.200.subtotal`; number, optional)
- `deliveryCost` (`getOrder.response.200.deliveryCost`; number, optional)
- `serviceCost` (`getOrder.response.200.serviceCost`; number, optional)
- `couponDiscount` (`getOrder.response.200.couponDiscount`; number, optional) — Every reduction (coupon, promotional offer).
- `total` (`getOrder.response.200.total`; number, optional)
- `currency` (`getOrder.response.200.currency`; string, optional)
- `locale` (`getOrder.response.200.locale`; string, optional)
- `customer` (`getOrder.response.200.customer`; object, optional)
  - `firstName` (`getOrder.response.200.customer.firstName`; string, optional)
  - `lastName` (`getOrder.response.200.customer.lastName`; string, optional)
  - `email` (`getOrder.response.200.customer.email`; string, optional)
- `delivery` (`getOrder.response.200.delivery`; object | null, optional) — For `DELIVERY` orders, else `null`.
  - `street` (`getOrder.response.200.delivery.street`; string, optional)
  - `number` (`getOrder.response.200.delivery.number`; string, optional)
  - `postcode` (`getOrder.response.200.delivery.postcode`; string, optional)
  - `city` (`getOrder.response.200.delivery.city`; string, optional)
  - `zone` (`getOrder.response.200.delivery.zone`; string, optional)
- `createdAt` (`getOrder.response.200.createdAt`; integer, optional) — Unix seconds.

### 401

A missing, unknown or revoked key (`UNAUTHENTICATED`).

#### Example

```json
{
  "error": {
    "code": "UNAUTHENTICATED",
    "message": "No valid key."
  }
}
```

- `error` (`getOrder.response.401.error`; object, required)
  - `code` (`getOrder.response.401.error.code`; string, required)
    - one of `"UNAUTHENTICATED"`, `"FORBIDDEN"`, `"NOT_FOUND"`, `"METHOD_NOT_ALLOWED"`, `"VALIDATION"`, `"SLOT_UNAVAILABLE"`, `"DELIVERY_UNAVAILABLE"`, `"PRODUCT_UNAVAILABLE"`, `"COUPON_INVALID"`, `"MINIMUM_NOT_REACHED"`, `"RATE_LIMITED"`, `"INTERNAL"`
  - `message` (`getOrder.response.401.error.message`; string, required) — Human readable.
  - `fields` (`getOrder.response.401.error.fields`; map<string>, optional) — 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`).

#### Example

```json
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Origin not registered for this key."
  }
}
```

- `error` (`getOrder.response.403.error`; object, required)
  - `code` (`getOrder.response.403.error.code`; string, required)
    - one of `"UNAUTHENTICATED"`, `"FORBIDDEN"`, `"NOT_FOUND"`, `"METHOD_NOT_ALLOWED"`, `"VALIDATION"`, `"SLOT_UNAVAILABLE"`, `"DELIVERY_UNAVAILABLE"`, `"PRODUCT_UNAVAILABLE"`, `"COUPON_INVALID"`, `"MINIMUM_NOT_REACHED"`, `"RATE_LIMITED"`, `"INTERNAL"`
  - `message` (`getOrder.response.403.error.message`; string, required) — Human readable.
  - `fields` (`getOrder.response.403.error.fields`; map<string>, optional) — Only present when the error belongs to specific request fields.

### 404

Unknown id, or an order of another restaurant.

#### Example

```json
{
  "error": {
    "code": "UNAUTHENTICATED",
    "message": "string",
    "fields": {
      "customer.email": "Invalid e-mail"
    }
  }
}
```

- `error` (`getOrder.response.404.error`; object, required)
  - `code` (`getOrder.response.404.error.code`; string, required)
    - one of `"UNAUTHENTICATED"`, `"FORBIDDEN"`, `"NOT_FOUND"`, `"METHOD_NOT_ALLOWED"`, `"VALIDATION"`, `"SLOT_UNAVAILABLE"`, `"DELIVERY_UNAVAILABLE"`, `"PRODUCT_UNAVAILABLE"`, `"COUPON_INVALID"`, `"MINIMUM_NOT_REACHED"`, `"RATE_LIMITED"`, `"INTERNAL"`
  - `message` (`getOrder.response.404.error.message`; string, required) — Human readable.
  - `fields` (`getOrder.response.404.error.fields`; map<string>, optional) — Only present when the error belongs to specific request fields.

### 429

Too many requests (`RATE_LIMITED`). Wait `Retry-After` seconds.

#### Example

```json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests."
  }
}
```

- `error` (`getOrder.response.429.error`; object, required)
  - `code` (`getOrder.response.429.error.code`; string, required)
    - one of `"UNAUTHENTICATED"`, `"FORBIDDEN"`, `"NOT_FOUND"`, `"METHOD_NOT_ALLOWED"`, `"VALIDATION"`, `"SLOT_UNAVAILABLE"`, `"DELIVERY_UNAVAILABLE"`, `"PRODUCT_UNAVAILABLE"`, `"COUPON_INVALID"`, `"MINIMUM_NOT_REACHED"`, `"RATE_LIMITED"`, `"INTERNAL"`
  - `message` (`getOrder.response.429.error.message`; string, required) — Human readable.
  - `fields` (`getOrder.response.429.error.fields`; map<string>, optional) — Only present when the error belongs to specific request fields.


Source: https://developer.unipage.be/storefront/api/orders/retrieve/index.md
