# Orders

Ecommerce orders and their line items, including status and fulfilment updates.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### GET /orders/:order_id

Fetch a single ecommerce order by UUID, including its line items.

**Scopes:** `ecommerce:read` — [full detail](./orders/get-orders-order-id.md)

### GET /orders/:order_id/items

List the line items for an ecommerce order.

**Scopes:** `ecommerce:read` — [full detail](./orders/get-orders-order-id-items.md)

### GET /orders

List ecommerce orders. Filter by status or store_id query params.

**Scopes:** `ecommerce:read` — [full detail](./orders/get-orders.md)

### POST /orders/:order_id/reconcile

Reconcile an order against Stripe (safety net for missed webhooks): pulls the checkout session status with the store's Connect token and marks the order paid only if Stripe confirms payment.

**Scopes:** `ecommerce:write` — [full detail](./orders/post-orders-order-id-reconcile.md)

### PATCH /orders/:order_id

Update an ecommerce order's status, fulfillment_status, notes, or shipping address.

**Scopes:** `ecommerce:write` — [full detail](./orders/patch-orders-order-id.md)
