{
"id": 123,
"external_id": "XY123",
"external_order_id": "EXT-ORD-12345",
"external_reference": "REF-XYZ-789",
"user_id": 123,
"user_type_id": 2,
"user_type": "wholesale",
"shipping_address_id": 12,
"billing_address_id": 23,
"date_bought": "2012-10-15T12:34:56.789Z",
"status": "new" / "confirmed" / "processing" / "manufacturing" / "pending" / "complaint" / "paused" / "change_goods" / "ready_to_ship" / "partially_shipped" / "shipped_pickup_station" / "awaiting_pick_up" / "shipped_unsuccessful" / "shipped" / "returned_to_sender" / "not_valid" / "canceled" / "finished" / "test",
"approval_status": "awaiting_approval" / "approved" / "not_approved",
"payment_status": "awaiting_payment" / "payment_received" / "payment_allocated" / "payment_partially_invoiced" / "payment_canceled" / "payment_failed" / "payment_refunded" / "cash_on_delivery" / "contract_defined",
"domain": "www.example.com",
"locale": "sl" / "en" / "de" / ... ,
"items": [
{
"item_id": 213,
"container_item_id": 15,
"quantity": 10,
"customization": {
"values": {
"key1": {
"type": "text" / "choices",
"value": [ "abc" ]
},
...
},
"configuration": {
// see item
}
},
"price_unconfigured": { complex_price },
"price_single": { complex_price },
"price_total": { complex_price },
"tax_class_id": 12,
"promotion":{
"applied_type":"PRODUCTS",
"type":"DISCOUNT",
"promotion_id":6,
"user_code":"Promotion_User_Code",
"promotion_rate":0.3
}
},
...
],
"shipping": {
"type": "free" / "simple" / "weight_based" / "flat_rate" / "item_number_based" / "price_based" / "international",
"name": { "__": "Shipping name" },
"shipping_id": 123,
"parcels": [
{
"cost": 123.456,
"repeats": 5,
"contents": [
{
"item_id": 123,
"quantity": 10
"weight_grams": 15
},
...
]
},
...
],
"messages": [
"message 1",
...
],
"was_embedded": true / false,
"cost": {
complex_price
},
"tracking": {
"tracking_number": "trackingNumber1234",
"company": "shippingCompany",
"tracking_link": "https://www.example.com/tracking/1234"
},
"pickup_location": {
// AddressInfo structure - same as shipping_address/billing_address
"first_name": "John",
"last_name": "Doe",
"street": "123 Pickup Street",
"city": "Springfield",
"post_code": "12345",
"country_code": "US"
},
"promotion":{
"applied_type":"PRODUCTS",
"type":"DISCOUNT",
"promotion_id":6,
"user_code":"Promotion_Shipping_User_Code",
"promotion_rate":0.3
},
"allows_partial_shipping": true / false
},
"payment": {
"type": "unhandled" / "megapos" / "paypal_wp_standard" / "banka_koper",
"name": { "__": ... },
"payment_id": 123,
"cost": {
complex_price
}
},
"user_notes": "...",
"system_notes": "...",
"merchant_notes": "Customer requested expedited shipping",
"link": {
"url": "https://www.example.com/order/thank-you/123",
"custom_message": { "__": "Thank you for your purchase!" }
},
"purchase_documents": [
{
"id": 1,
"document_name": "invoice.pdf",
"document_hash": "abc123...",
"document": "https://www.example.com/documents/invoice.pdf",
"inserted": 1706428800
}
],
"discounts_breakdown": [
{
"discount_id": 12,
"discount_name": "Promo: Get 10%",
"discount_target": "items",
"item_id": 213,
"coupon_code": "PROMO10",
"base": 100.5,
"rate": 0.1,
"amount": 10.05
},
{
"discount_id": 15,
"discount_name": "Free shipping on orders over $100",
"discount_target": "shipping",
"base": 12.50,
"rate": 1.0,
"amount": 12.50
}
],
"items_total": {
complex_price
},
"grand_total": {
complex_price
},
"tax_conf_snapshot": {
"zone": {
"id": 123,
"name": "EU",
"order_rank": 1,
"territory": {
"include_countries": [
{
"country_code": "US",
"include_states": [ "CA", "NY" ],
"exclude_states": [ "AL" ],
"include_post_code_prefixes": [ "94", "95 ],
"exclude_post_code_prefixes": [ "12" ],
"tax_number": "required" / "forbidden" / "any"
},
...
],
"exclude_countries": [ "GB", "AU" ],
"include_regions": [
{
"region_code": "EU",
"tax_number": "required" / "forbidden" / "any"
}
],
"exclude_regions": [ "EU", "001" ],
"tax_number": "required" / "forbidden" / "any"
},
"users": {
"user_type_ids": [ 1, 2, 3 ],
"include_null_type": true / false
}
},
"rates": [
{
"id": 1,
"name": { "__": "DDV" },
"tax_zone_id": 1,
"order_weight": 5,
"values": [
{ "tax_class_id": 1, "rate": 0.2 },
{ "tax_class_id": 2, "rate": 0.085 }
]
},
...
],
"classes": [
{
"id": 1,
"name": "Izdelki z običajnim DDV"
},
{
"id": 2,
"name": "Izdelki z znižanim DDV"
},
...
]
}
}
complex price:
{
"value": 108.45,
"value_unrounded": 108.454321, // present only in items_total and grand_total
"currency": "EUR",
"base": 100.5,
"base_with_discounts": 90.45,
"base_with_taxes": 120.6,
"base_with_taxes_unrounded": 120.604321, // present only in items_total and grand_total
"discounts_applied": [
{
"discount_id": 12,
"discount_name": "Promo: Get 10%",
"coupon_code": "PROMO10",
"base": 100.5,
"rate": 0.1,
"amount": 10.05,
"amount_unrounded": 10.054321 // present only in totals
},
...
],
"taxes_applied": [
{
"tax_rate_id": 1,
"base": 90.45,
"rate": 0.2,
"amount": 18.09,
"amount_unrounded": 18.094321 // present only in totals
},
...
]
}