Skip to main content

Order

Order Endpoint

The Order endpoint allows you to create a new order by providing the necessary details such as shipping address, cart items and optional custom reference or additional information.

Important: To place an order, you must set the place parameter to 1. If not set, the order will only be created without being placed. Example: /api/v1/order/?place=1.

Important: If place=1 and the shipping address is not approved yet, the API accepts the request and stores the order for later dispatch. Once the address reaches status COMPLETE, the order is automatically processed.

POST/api/v1/order/

URL parameters

NameTypeRequiredDescription
placebooleanSet to 1 to place the order (default: 0)
modestringSet 'sandbox' for test order (default: live)

JSON body parameters

NameTypeRequiredDescription
shipping_address_idstringUUID of shipping address
cartarrayArray of cart items with quantity and either product_number or fsku
custom_referencestringYour reference for this order
additional_informationstringAdditional order information or notes

Notes:

  • Each cart item must include quantity and at least one of product_number or fsku.
  • If both are provided, product_number wins and fsku is ignored.
  • If an fsku has no mapping for your customer, the API returns HTTP 404.

Example Request

curl -X POST "https://api.axro.com/api/v1/order/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"shipping_address_id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"cart": [
{
"product_number": "CANL055BK",
"quantity": 5
},
{
"product_number": "HP301BK",
"quantity": 10
}
],
"custom_reference": "PO-12345",
"additional_information": "Please deliver to loading dock B"
}'

Example Response

Important The keys uhg_unit and uhg_total will be set if a shipping address in Germany is provided, otherwise they will be set to 0.

More information about the UHG can be found here § 54 UrhG - Vergütungspflicht and § 54a UrhG - Vergütungshöhe.

{
"shipping_address": {
"id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"company": "Example Corp",
"department": "Warehouse",
"firstname": "John",
"lastname": "Doe",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US",
"email": "mail@example.com",
"phone": "+491234567890"
},
"billing_address": {
"company": "Example Corp",
"department": "Accounting",
"street": "456 Billing Ave",
"zip": "10002",
"city": "New York",
"country": "US"
},
"cart": [
{
"product_number": "CANL055BK",
"quantity": 5,
"difference": 0,
"unit_price": 8599,
"uhg_unit": 0,
"uhg_total": 0,
"sub_total": 42995
},
{
"product_number": "HP301BK",
"quantity": 10,
"difference": 0,
"unit_price": 2499,
"uhg_unit": 0,
"uhg_total": 0,
"sub_total": 24990
}
],
"toll": 0,
"freight_costs": 995,
"grand_total": 68980,
"custom_reference": "PO-12345",
"additional_information": "Please deliver to loading dock B",
"order_placed": true,
"place_order_url": "/api/v1/order/?place=1"
}