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

# Working with Orders

> Creating and managing Orders in Omneo, the mutable pre-transaction record.

An Order is a mutable, in-progress purchase record. It represents a sale that has not yet been finalised, for example, an eCommerce cart checkout in progress, a layby, or a pending POS sale.

## Orders vs transactions

|                           | Order                                   | Transaction                       |
| ------------------------- | --------------------------------------- | --------------------------------- |
| **State**                 | In-progress, mutable                    | Completed, immutable              |
| **Typical source**        | eCommerce checkout, layby, pending sale | POS completion, fulfilled order   |
| **Can be updated**        | Yes                                     | Yes, but discouraged, prefer void |
| **Triggers aggregations** | No                                      | Yes                               |
| **Triggers reactions**    | Depends on configuration                | Yes                               |
| **Customer sees**         | No                                      | Yes (Clienteling, Profile Portal) |

When an order is fulfilled and payment is complete, create a Transaction. A single Order may result in zero, one, or many Transactions (e.g., a partial fulfilment, a split shipment).

## Creating an order

```shell theme={null}
curl -X POST https://api.[tenant].getomneo.com/api/v3/orders \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "9332c9b2-e31c-4d49-8ec3-62a9466d339c",
    "external_id": "CART-88123",
    "total": 199.95,
    "status": "pending",
    "items": [
      {
        "name": "Trench Coat",
        "product_variant_id": 441200,
        "quantity": 1,
        "price_current": 199.95,
        "price_sell": 199.95,
        "price_original": 199.95
      }
    ]
  }'
```

## Reading an order

```shell theme={null}
GET /api/v3/orders/{orderId}
```

## Updating an order

Orders can be updated as the purchase progresses, for example, when items are added or removed, or the status changes:

```shell theme={null}
curl -X PUT https://api.[tenant].getomneo.com/api/v3/orders/{orderId} \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "processing",
    "total": 249.90
  }'
```

## Completing an order

When the order is fulfilled and payment is confirmed, create a Transaction referencing the order. Provide the `order_id` field in the transaction payload to link them:

```shell theme={null}
curl -X POST https://api.[tenant].getomneo.com/api/v3/transactions \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "9332c9b2-e31c-4d49-8ec3-62a9466d339c",
    "order_id": "{orderId}",
    "total": 249.90,
    "transacted_at": "2025-06-15 14:32:00",
    "external_id": "ORDER-88123-TXFULFIL"
  }'
```

## Deleting an order

```shell theme={null}
DELETE /api/v3/orders/{orderId}
```

<Note>Content needed: order status enum values, full field reference, and relationship to Shopify checkout in the Shopify extension context.</Note>
