Skip to main content

Overview

To validate a complete order integration flow, test orders must be created so that logistics documents can be retrieved and fulfillment trackings can be sent. These endpoints are available only in the sandbox environment and are intended for testing purposes.
These APIs are NOT available in production environment. They are intended for sandbox validation only.

Sandbox Endpoints

Use the following APIs to create test orders and set them to the desired status (READY_TO_SHIP):
  1. Create Order - Create a test order
  2. Approve Order - Approve the order for processing
  3. Start Handling Order - Set the order as ready to be handled
After completing these steps, an order will automatically go through several other steps until it reaches READY_TO_SHIP status. This should take no more than a few minutes (usually a few seconds).
The authorization token is the same one you already use for other API calls. These endpoints use the same authentication mechanism.

Create Order

Create a test order in the sandbox environment.
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": "{}"
  }'

Request Parameters

salesChannelOrderId
string
required
The order ID in the website. Must be unique.
value
number
required
The final order value. Must be the sum of all product prices (with discounts applied) plus shipping (with discounts applied).
totals
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
items
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
  • salePrice - Unit price with discounts applied
  • quantity - Quantity of items
deliveries
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)
payments
array
required
Payment information. Do not change anything other than the value:
  • value - Payment value (should match order value)
  • type - Payment method type

Response

If the order is created successfully, you will receive an order JSON response that contains the field orderId, generated by the system. This is the value you need for the next steps (approve/start handling).

Approve Order

Approve the order for processing.
curl -X POST 'https://order.api.e-cross.tech/orders/SB_MODDO-ECOM-Sandbox-0001/approve' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "approvalDate": "2025-03-26T18:45:00.00000+00:00"
  }'

Request Parameters

orderId
string
required
The order ID returned from the Create Order endpoint.
approvalDate
string
required
The approval date and time in ISO 8601 format. This is just informative and doesn’t go through any validation.

Start Handling Order

Set an order as ready to be handled (picked and packed).
curl -X POST 'https://order.api.e-cross.tech/orders/SB_MODDO-ECOM-Sandbox-0001/startHandling' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "startHandlingDate": "2025-03-26T18:45:00.00000+00:00"
  }'

Request Parameters

orderId
string
required
The order ID returned from the Create Order endpoint.
startHandlingDate
string
required
The start handling date and time in ISO 8601 format. This is just informative and doesn’t go through any validation.

Complete Workflow

1

Create Order

Create a test order using the Create Order endpoint. Save the orderId from the response.
2

Approve Order

Approve the order using the Approve Order endpoint with the orderId from step 1.
3

Start Handling

Set the order as ready to be handled using the Start Handling Order endpoint with the same orderId.
4

Wait for Auto-progression

The order will automatically progress through several statuses (PACKED, INVOICED, READY_TO_SHIP) within a few minutes.
5

Retrieve Documents

Once the order reaches READY_TO_SHIP status, you can retrieve order documents and proceed with fulfillment testing.
After completing these steps, your test order will be ready for integration validation, allowing you to test document retrieval and tracking event updates.

Introduction

Back to: API Overview