# Create order

Creates an open cart order of 1 to 20 line items (quantity 1 to 10 each) from one merchant; card services can't be added. Agent credential only; nothing is paid until checkout.

`POST /v1/orders`

Creates an open cart order of 1 to 20 line items (quantity 1 to 10 each) from one merchant; card services can't be added. Agent credential only; nothing is paid until checkout.

## Request body

```json
{
  "items": [
    {
      "service_id": "svc_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "quantity": 1
    }
  ]
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).

Example 200 response:

```json
{
  "order": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "org_id": "org_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "agent_id": "agt_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "merchant_id": "mch_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "status": "active",
    "total_base_units": "50000",
    "created_at": "2026-11-16T12:00:00Z",
    "items": [
      {
        "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
        "service_id": "svc_01jd2x3k4m5n6p7q8r9s0t1v2w",
        "quantity": 1,
        "amount_base_units": "50000",
        "intent_id": "pi_01jd2x3k4m5n6p7q8r9s0t1v2w",
        "intent_ids": [
          null
        ],
        "fulfillment_status": "string"
      }
    ],
    "merchant": {
      "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "name": "Example",
      "tier": "VERIFIED"
    }
  }
}
```
