# Retrieve an order

`GET https://api.anyshop.io/v1/orders/{id}`

An order with what was bought and how each item was delivered. Keys and licenses stay on the buyer's order page.

- Part of the [API reference](https://docs.anyshop.io/reference.md), [Orders](https://docs.anyshop.io/reference.md#orders).
- Scope: `orders:read`.

## Path parameters

- `id` (string, required)

## Returns

The **order** object.

## Errors

| Status | error.type | When |
| --- | --- | --- |
| 400 | `invalid_request` | The request is not valid; `error.param` names the field |
| 401 | `authentication` | No API key, or it is not valid |
| 403 | `permission` | The key does not have the scope this needs, or the store is suspended (store_suspended) |
| 404 | `not_found` | Not found in the key's store and mode |
| 409 | `conflict` | Conflicts with the object's state (type conflict), or an Idempotency-Key reused for another request (type idempotency, code idempotency_key_reused) |
| 429 | `rate_limited` | Too many requests; see Retry-After |

## Example

curl:

```bash
curl \
  https://api.anyshop.io/v1/orders/ord_01m3rt5x2c7q9f0a4d6k8h1n3p \
  -H "Authorization: Bearer $ANYSHOP_API_KEY"
```

Node:

```js
const response = await fetch("https://api.anyshop.io/v1/orders/ord_01m3rt5x2c7q9f0a4d6k8h1n3p", {
  headers: {
    Authorization: `Bearer ${process.env.ANYSHOP_API_KEY}`,
  },
});
const answer = await response.json();
```

Python:

```python
import os
import requests

response = requests.get(
    "https://api.anyshop.io/v1/orders/ord_01m3rt5x2c7q9f0a4d6k8h1n3p",
    headers={
        "Authorization": f"Bearer {os.environ['ANYSHOP_API_KEY']}",
    },
)
answer = response.json()
```

Answer (200):

```json
{
  "object": "order",
  "id": "ord_01m3rt5x2c7q9f0a4d6k8h1n3p",
  "number": 1001,
  "livemode": true,
  "status": "delivered",
  "currency": "USD",
  "subtotal": 1999,
  "discount": 0,
  "total": 1999,
  "refunded": 0,
  "coupon": null,
  "buyer": {
    "email": "buyer@example.com"
  },
  "paid_with": "stripe",
  "created_at": "2026-10-02T14:21:07.000Z",
  "paid_at": "2026-10-02T14:21:07.000Z",
  "delivered_at": "2026-10-02T14:21:07.000Z",
  "withdrawal_consent": null,
  "terms_agreement": {
    "agreed_at": "2026-12-14T09:12:40.000Z",
    "wording_version": 5,
    "collected_by": "anyshop"
  },
  "items": [
    {
      "id": "oi_01m3rt5x4e9s1h2c6d8f0g2j4k",
      "product": {
        "id": "prod_01m3rr5kmbeb2s18x1kpntjxqb",
        "name": "Lumen Studio Pro",
        "type": "serial"
      },
      "variant": {
        "id": "var_01m3rr5kmd6h0q2t8w4y9zb7ce",
        "name": "Standard"
      },
      "quantity": 1,
      "unit_amount": 1999,
      "total_amount": 1999,
      "delivery_state": "pending",
      "price_kind": "fixed",
      "base_unit_amount": 1999,
      "subtotal_amount": 1999,
      "quantity_discount": null,
      "coupon_discount_amount": 0,
      "discount_amount": 0,
      "sale": null,
      "bundle_items": [],
      "answers": []
    }
  ]
}
```

Answer (400):

```json
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_query",
    "message": "The request is not valid; `error.param` names the field",
    "param": null
  }
}
```

Answer (409):

```json
{
  "error": {
    "type": "conflict",
    "code": "conflict",
    "message": "Conflicts with the object's state (type conflict), or an Idempotency-Key reused for another request (type idempotency, code idempotency_key_reused)",
    "param": null
  }
}
```

The IDs and keys in these examples are made up. Every schema is in the OpenAPI document, https://api.anyshop.io/v1/openapi.json.
