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

# Orders

> Read the store's orders, create orders, and move them through their life.

Scopes: `read_orders` to read, `write_orders` to change. Without `read_customers`, the customer's name, phone and address are hidden.

## The order

```json theme={"dark"}
{
  "id": "6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c",
  "number": 1042,
  "status": "confirmed",
  "payment_status": "pending_payment",
  "payment_method": "cod",
  "full_name": "Mona Hassan",
  "phone": "+201001234567",
  "country": "Egypt",
  "city": "Cairo",
  "address": "12 Tahrir St, Downtown",
  "metadata": { "is_app_order": true, "app_name": "ERP Sync", "erp_ref": "INV-778" },
  "product_cost": 900,
  "shipping_cost": 60,
  "total_cost": 960,
  "items": [
    { "id": "2d3e...", "product_id": "0b6f...", "variant_id": null, "quantity": 2, "price": 450, "metadata": {} }
  ],
  "created_at": "2026-12-04T10:15:00Z",
  "updated_at": "2026-12-04T10:20:00Z"
}
```

A few names differ from what the dashboard shows: `number` is the order number the merchant sees, and `city` is the governorate (the [shipping area](https://developers-docs.easyorders.ai/api-reference/shipping/overview.md)). The order's cost price, IP address and anti-spam data are never shown.

## Status and payment status

An order has two separate states:

* **`status`**, its life: `pending` → `confirmed` → `processing` → `waiting_for_pickup` → `in_delivery` → `delivered`, or `canceled`, `returning_from_delivery`, `request_refund`, `refund_in_progress`, `refunded`. Any status can follow any other; there is no forced order. Set it with [Change the status](https://developers-docs.easyorders.ai/api-reference/orders/change-the-status.md).
* **`payment_status`**: `pending_payment`, `paid`, `paid_failed`, `pending_refund`, `payment_refunded`. Set it with [Change the payment status](https://developers-docs.easyorders.ai/api-reference/orders/change-the-payment-status.md). Older orders that never had one read `null`.

Orders don't get deleted: cancel them instead.

## Stock

An order **holds its stock** while it is not canceled or refunded and its payment has not failed. Stock moves in the same step as the change that makes an order hold it or let it go, so it never moves twice. An order over the available stock of a product that tracks stock answers `409 insufficient_stock`, even when the store sells without stock.

## Lists show what is current

[List orders](https://developers-docs.easyorders.ai/api-reference/orders/list-orders.md) shows the orders created in the **last 14 days**, at most the newest **500**. Read any older order by its ID. To keep your system in step, combine the list with the order events your app receives.

## Metadata

`metadata` holds your own keys, up to 4096 bytes. A `PATCH` merges it: keys you send are added or changed, the others stay, and none is removed. These keys are reserved and refused: `is_app_order`, `app_name` (EasyOrders writes them on orders apps create), `payment_ref_id`, `ab_test_id`, `ab_test_variant_id`, `taager_order_id` and `referral_code`. The same goes for each item's metadata, up to 1024 bytes.

## Hidden customer details

While a store has unpaid dues, its orders answer `masked: true` and `masked_reason: "store_overdue"`: the name keeps its first letters, and the other customer fields and the metadata are empty.

## Digital orders

`is_digital: true` orders give out codes or links. An app cannot set one `paid`, nor change its email or phones (`409 digital_order`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.