> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maple.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Get order

> Returns a single order if it belongs to a location the app is connected to.

GET`https://api.maple.inc/v1/orders/{orderId}`API key

## Authorization

Send your API key as `Authorization: Bearer <key>`: `mpk_test_…` against the sandbox (`https://api.staging.maple.inc/v1`), `mpk_live_…` against production. See [Authentication](https://docs.maple.inc/developer-api/concepts/authentication.md). The samples read the key from `MAPLE_KEY` and the base URL from `MAPLE_BASE`, as set up in the [Quickstart](https://docs.maple.inc/developer-api/quickstart.md).

## Parameters

- `orderId` string path required

## Responses

### 200 OK

- `object` string required

  Always `order`.

- `id` string required

- `livemode` boolean required

  True when the order belongs to the live environment; false for test-mode data.

- `created` number required

- `status` string required

- `payment_status` string or null required

- `location_id` string or null required

- `fulfillment_type` string required

- `scheduled_for` string or null required

  Customer-selected completion time (ISO 8601, UTC) for scheduled orders; null for ASAP orders. Prepare the order for this time, not on receipt.

- `delivery_address` object or null required

  The delivery address for delivery orders, including delivery instructions; null for pickup orders or when no stored address is available.

- `delivery_address.street` string required

- `delivery_address.unit` string or null required

- `delivery_address.city` string required

- `delivery_address.state` string required

- `delivery_address.zip` string required

- `delivery_address.notes` string or null required

- `customer` object required

- `customer.name` string required

- `customer.phone` string or null required

  Customer phone number in E.164 format (e.g. +14155552671); null when the customer provided none.

- `customer.phone_last_four` string or null required

  Last four digits of the customer phone number.

- `line_items` object\[] required

- `line_items[].name` string required

- `line_items[].menu_entity_id` string or null required

- `line_items[].quantity` number required

- `line_items[].base_price` number required

- `line_items[].tax` number required

- `line_items[].modifiers` object\[] required

- `line_items[].modifiers[].name` string required

- `line_items[].modifiers[].menu_entity_id` string or null required

- `line_items[].modifiers[].quantity` number required

- `line_items[].modifiers[].price` number required

- `totals` object required

  All amounts in integer USD cents. `total` = subtotal + tax + surcharge + tip + delivery fees.

- `totals.currency` string required

- `totals.subtotal` number required

- `totals.tax` number required

- `totals.surcharge` number required

- `totals.tip` number required

- `totals.delivery_fee` number required

- `totals.delivery_tip` number required

- `totals.total` number required

- `external_id` string or null required

- `payment` object required

- `payment.provider` string or null required

- `payment.status` string or null required

- `payment.payment_link_url` string or null required

### Errors

- `400` Bad request DeveloperApiBadRequest

- `401` Unauthorized DeveloperApiUnauthorized

- `403` Forbidden DeveloperApiForbidden

- `404` Not found DeveloperApiNotFound

- `429` Too many requests DeveloperApiRateLimited

Every error body names the error in `_tag`, explains it in `message`, and says where to report it in `feedback`. See [Errors](https://docs.maple.inc/developer-api/concepts/errors.md).

A `429` also sends `Retry-After`: Seconds to wait before retrying; also returned as retry\_after in the body.

Get order

```sh
curl "$MAPLE_BASE/orders/ord_123" \
  -H "Authorization: Bearer $MAPLE_KEY"
```

```python
import os
import requests


r = requests.get(
    f"{os.environ['MAPLE_BASE']}/orders/ord_123",
    headers={"Authorization": f"Bearer {os.environ['MAPLE_KEY']}"},
    timeout=30,
)
r.raise_for_status()
print(r.json())
```

```js
const res = await fetch(`${process.env.MAPLE_BASE}/orders/ord_123`, {
  headers: {
    Authorization: `Bearer ${process.env.MAPLE_KEY}`,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
```

```json
{
  "object": "order",
  "id": "string",
  "livemode": true,
  "created": 1.5,
  "status": "string",
  "payment_status": "string",
  "location_id": "str_123",
  "fulfillment_type": "string",
  "scheduled_for": "string",
  "delivery_address": {
    "street": "string",
    "unit": "string",
    "city": "string",
    "state": "string",
    "zip": "string",
    "notes": "string"
  },
  "customer": {
    "name": "string",
    "phone": "+15555550123",
    "phone_last_four": "string"
  },
  "line_items": [
    {
      "name": "string",
      "menu_entity_id": "string",
      "quantity": 1.5,
      "base_price": 1.5,
      "tax": 1.5,
      "modifiers": [
        {
          "name": "string",
          "menu_entity_id": "string",
          "quantity": 1.5,
          "price": 1.5
        }
      ]
    }
  ],
  "totals": {
    "currency": "USD",
    "subtotal": 1.5,
    "tax": 1.5,
    "surcharge": 1.5,
    "tip": 1.5,
    "delivery_fee": 1.5,
    "delivery_tip": 1.5,
    "total": 1.5
  },
  "external_id": "string",
  "payment": {
    "provider": "string",
    "status": "string",
    "payment_link_url": "string"
  }
}
```

```json
{
  "_tag": "DeveloperApiBadRequest",
  "code": "string",
  "message": "string",
  "feedback": "string"
}
```
