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

# Create order (v1)

> Create an order in Fire by sending it in Fire format. For the POS, kiosk, and aggregator structure, use version 2.

Creates an order in Fire with the body in **Fire format**: the same as
[Inject order](https://docs.fire.rest/en/api-reference/orders.md), unchanged. Fire doesn't translate it: it validates it and
creates the order directly.

This is **version 1**. If your system sends orders with the POS and kiosk structure or the
aggregator structure, use [Create order (v2)](https://docs.fire.rest/en/api-reference/create-order-v2.md). Both versions are
current and end up in the same place: same validations, same response.

Once created, the order follows the same lifecycle as any Fire order: taxes, business day, fiscal
document, and [events](https://docs.fire.rest/en/events/overview.md).

## Authentication

**x-api-key** `string` *required*

Your Fire API key with the `orders:write` scope. `Authorization: Bearer <api_key>` is also accepted.
The key **must be bound to your account and to a vendor**. You don't need to send the `account` header.

## Body

The body is the one from [Inject order](https://docs.fire.rest/en/api-reference/orders.md), in Fire format (camelCase, with
prices and totals). The minimum fields are:

**orderId** `string` *required*

The order's identifier in your system.

**orderCode** `string` *required*

Unique order code. If an order with that code already exists for your vendor, the response is `409`.

**accountId** `number` *required*

The order's account.

**createdAt** `string` *required*

Sale date.

**selectedShippingMethod** `string` *required*

`delivery` or `pickup`.

**client** `object` *required*

Customer: `uid`, `name`, `lastName`.

**store** `object` *required*

Store: `id`, `code`, `vendorId`.

**order** `object` *required*

`products[]` with at least one product.

**payments** `object` *required*

`totals[]` and `paymentMethods[]`, with at least one item each. The payments' `transactionStatus`
decides whether the order is closed (`APPROVED`) or stays open, pending payment (`PENDING`).

## Response

**success** `boolean`

`true` when the order was created.

**data** `object`

**data**

**id** `string`

Order ID in Fire. Use it to look the order up, update it, or cancel it.

**external\_order\_id** `string`

The `orderId` you sent.

**status** `string`

`COMPLETED` or `OPEN`.

**payment\_status** `string`

`SUCCEEDED` or `PENDING`.

**business\_day\_date** `string`

The store's business day, `YYYY-MM-DD`.

**created\_at** `string`

Creation date in Fire (ISO 8601).

## Errors

| HTTP | `error` / `code` | When |
| - | - | - |
| `400` | `VALIDATION_ERROR` | `orderCode` is missing or the body is not in Fire format |
| `400` | `BUSINESS_ERROR` | Store inactive, business day closed, or the order breaks a validation rule enabled for your vendor (`ORDER_INVARIANT_VIOLATION`) |
| `404` | `NOT_FOUND` | The store doesn't exist |
| `401` | `UNAUTHORIZED` | Invalid, expired, or revoked API key |
| `403` | `FORBIDDEN` | API key without the `orders:write` scope or not bound to your account |
| `409` | `CONFLICT` / `DUPLICATE_ORDER` | The order already existed for your vendor. `data` carries the existing order's `id`, `externalOrderId`, and `status` |

> [!NOTE]
>
> Every request is recorded in Fire with its body and the rejection reason, including rejected
> ones. If you retry an order that was already created, the response is `409` and it isn't duplicated.

```bash cURL theme={null}
curl -X POST https://app.fire.rest/api/v1/external/orders \
  -H "x-api-key: $FIRE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "orderId": "ORD-000123",
    "orderCode": "ORD-000123",
    "accountId": 11,
    "account": "",
    "createdAt": "2026-10-29 14:57:41",
    "selectedShippingMethod": "pickup",
    "client": { "uid": "customer-0001", "name": "CONSUMIDOR", "lastName": "FINAL" },
    "store": { "id": "11.6.1350.50", "code": "K000", "vendorId": "11.6.1350" },
    "channel": { "uid": "c784d4ba-23c7-4929-b2f0-1a1960d9cdc2", "code": "KIOSK" },
    "service": { "uid": "726c4892-48b9-45da-b066-2a8e83d2cb78", "code": "Dine-In" },
    "order": {
      "products": [{
        "productId": "7abdd4e5-d685-43ff-ba79-5e8b2f700b5b",
        "product": "12 Tiras de Frango",
        "quantity": 1,
        "price": {
          "unitPrice": { "currencyCode": "BRL", "subtotalWithoutTaxes": 64.9, "taxValue": 0, "total": 64.9 },
          "totalPrice": { "currencyCode": "BRL", "subtotalWithoutTaxes": 64.9, "taxValue": 0, "total": 64.9 }
        },
        "modifierGroups": []
      }]
    },
    "payments": {
      "totals": [{ "currencyCode": "BRL", "total": 64.9 }],
      "paymentMethods": [{ "processor": "CREDIT", "currencyCode": "BRL", "transactionStatus": "APPROVED", "totalBill": 64.9 }]
    }
  }'
```

```json 201 theme={null}
{
  "success": true,
  "data": {
    "id": "6f1c2b9e-3a1d-4c55-9b7e-0d2f6a7c8e10",
    "external_order_id": "ORD-000123",
    "status": "COMPLETED",
    "payment_status": "SUCCEEDED",
    "business_day_date": "2026-10-29",
    "created_at": "2026-10-29T14:57:44.330Z"
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": "VALIDATION_ERROR",
  "message": "orderCode is required and must be a non-empty string"
}
```

```json 409 theme={null}
{
  "success": false,
  "error": "CONFLICT",
  "code": "DUPLICATE_ORDER",
  "message": "Order with external id ORD-000123 already exists for this vendor.",
  "data": { "id": "6f1c2b9e-3a1d-4c55-9b7e-0d2f6a7c8e10", "externalOrderId": "ORD-000123", "status": "COMPLETED" }
}
```


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