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.

POST/api/v1/order/

URL parameters

NameTypeRequiredDescription
placebooleanSet to 1 to place the order (default: 0)

JSON body parameters

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

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",
"street": "123 Shipping St",
"zip": "10001",
"city": "New York",
"country": "US"
},
"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"
}