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

# Create order (Sandbox)

> Create a test order in the sandbox environment

<Warning>
  This API is **NOT available in production environment**. It is intended for sandbox validation only.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://order.api.e-cross.tech/orders' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
      "salesChannel": "ECOM",
      "currency": "BRL",
      "salesChannelOrderId": "Sandbox-0001",
      "value": 859.27,
      "creationDate": "2025-03-25T19:32:30.000Z",
      "totals": {
        "itemsGross": 759.27,
        "itemsDiscount": 0,
        "shippingGross": 100,
        "shippingDiscount": 0
      },
      "items": [
        {
          "id": "1",
          "salesChannelSkuId": "69372-elena_hdz_avelon_new-35",
          "quantity": 1,
          "name": "Botas Blogger AUDIOSLAVE 35",
          "listPrice": 759.27,
          "salePrice": 759.27
        }
      ],
      "customer": {
        "type": "PERSON",
        "document": "89414423036",
        "firstName": "Severino",
        "lastName": "Ryan Antonio Caldeira",
        "email": "severino.caldeira@e-cross.tech",
        "billingAddress": {
          "addressName": "Billing Address",
          "city": "Sao Paulo",
          "complement": "Quinto andar",
          "country": "BR",
          "neighborhood": "Centro",
          "number": "31",
          "state": "SP",
          "street": "Rua Benfica",
          "postalCode": "12244000",
          "receiverName": "Severino Ryan Antonio Caldeira"
        },
        "phone": {
          "countryCode": "55",
          "areaCode": "11",
          "number": "999999999"
        }
      },
      "shipping": {
        "deliveryAddress": {
          "addressName": "Billing Address",
          "city": "Sao Paulo",
          "complement": "Quinto andar",
          "country": "BR",
          "neighborhood": "Centro",
          "number": "31",
          "state": "SP",
          "street": "Rua Benfica",
          "postalCode": "12244000",
          "receiverName": "Severino Ryan Antonio Caldeira"
        },
        "deliveries": [
          {
            "name": "Default",
            "company": "Standard",
            "listPrice": 100,
            "salePrice": 100,
            "deliveryTime": 31,
            "deliveryEstimateDate": "2025-04-15T00:00:00.000Z",
            "items": ["1"]
          }
        ]
      },
      "payments": [
        {
          "type": "PIX",
          "value": 859.27
        }
      ],
      "salesChannelOrderData": "{}"
    }'
  ```
</RequestExample>

### Request Parameters

<ParamField body="salesChannelOrderId" type="string" required>
  The order ID in the website. Must be unique.
</ParamField>

<ParamField body="value" type="number" required>
  The total order value. Must be the sum of all product prices (with discounts applied) plus shipping (with discounts applied).
</ParamField>

<ParamField body="totals" type="object" required>
  Order totals breakdown:

  * `itemsGross` - Total product value without discounts
  * `itemsDiscount` - Total product discount value
  * `shippingGross` - Shipping value without discounts
  * `shippingDiscount` - Total shipping discount value
</ParamField>

<ParamField body="items" type="array" required>
  Items in this order. Each item must have:

  * `id` - Unique ID for this shopping cart line (must match IDs in delivery items array)
  * `salesChannelSkuId` - Unique SKU ID (use any SKU that has been approved)
  * `listPrice` - Unit price with no discounts applied (optional)
  * `salePrice` - Unit price with discounts applied
  * `quantity` - Quantity of items
</ParamField>

<ParamField body="deliveries" type="array" required>
  Deliveries in this order. Always an array with one element:

  * `listPrice` - Shipping value with no discounts applied
  * `salePrice` - Shipping value with discounts applied
  * `items` - Array of item IDs that are in this delivery (must match item IDs)
</ParamField>

<ParamField body="payments" type="array" required>
  Payment information. Do not change anything other than the value:

  * `value` - Payment value (should match order value)
  * `type` - Payment method type
</ParamField>

### Response

The response returns the complete order object. Refer to the [Get order by ID](/api-reference/orders/get-order-by-id) endpoint for the response fields.
