Skip to main content

Order Details

Retrieve detailed information about a specific order including items and payments.

HTTP Request

GET/api/shop/customers/me/orders/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Authenticated Customer
  • Authentication: Token-based (`Authorization: Token <your_api_key>`)

Path Parameters

ParameterTypeRequiredDescription
idintegerYesUnique ID of the order

Example Requests

1import requests
2
3# Get order details
4response = requests.get('http://www.example.com/api/shop/customers/me/orders/123', 
5  headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())

Status Codes

CodeDescription
200Order Items retrieved successfully
401Unauthorized — authentication required
400Bad request — validation errors
500Internal server error

Response Fields (Order Details)

FieldTypeDescription
idintegerUnique ID of the order
keystringOrder tracking key
statusstringCurrent order status
customerobjectCustomer details
payment_methodobjectPayment method details
shipping_methodobjectShipping method details
shipping_costdecimalCost of shipping
notesstringOrder notes
created_atstring (ISO 8601)Order creation timestamp
updated_atstring (ISO 8601)Order last update timestamp
billing_countryobjectBilling country details
billing_stateobjectBilling state details
billing_cityobjectBilling city details
billing_addressstringBilling address
billing_postal_codestringBilling postal code
billing_national_codestringBilling national code
billing_mobile_numberstringBilling mobile number
billing_first_namestringBilling first name
billing_last_namestringBilling last name
countintegerNumber of different products
quantityintegerTotal quantity of items
items_subtotaldecimalSubtotal of all items
items_discountdecimalTotal discount on items
subtotaldecimalOrder subtotal
total_discountdecimalTotal discount amount
totaldecimalFinal order total
amount_paiddecimalAmount already paid
amount_outstandingdecimalOutstanding amount
is_paidbooleanWhether order is fully paid
is_payablebooleanWhether order can be paid
itemsarrayArray of order items with product details
paymentsarrayArray of payment transactions for this order

Order Items Structure

Each item in the items array contains:

FieldTypeDescription
idintegerUnique ID of the order item
product_dataobjectSnapshot of product data at time of order
unit_priceintegerPrice per unit (in smallest currency unit)
unit_discountintegerDiscount per unit (in smallest currency unit)
quantityintegerQuantity ordered
notesstringItem-specific notes
subtotalintegerCalculated subtotal (computed field)
discountintegerTotal discount for this item (computed field)
totalintegerFinal total for this item (computed field)
created_atstring (ISO 8601)Item creation timestamp
updated_atstring (ISO 8601)Item last update timestamp

Order Payments Structure

Each payment in the payments array contains:

FieldTypeDescription
idintegerUnique ID of the payment
payment_methodobjectPayment method details
approvedbooleanWhether payment is approved
amountintegerPayment amount (in smallest currency unit)
transaction_idstringExternal transaction identifier
notesstringPayment-specific notes
created_atstring (ISO 8601)Payment creation timestamp
updated_atstring (ISO 8601)Payment last update timestamp

Payment Method Structure

The payment_method object contains:

FieldTypeDescription
idintegerPayment method ID
namestringPayment method name
imageobjectPayment method icon/logo

Customer Structure

The customer object contains:

FieldTypeDescription
idintegerCustomer ID
usernamestringCustomer username
full_namestringCustomer's full name

Geographic Data Structures

Country, state, and city objects contain:

Country/State:

FieldTypeDescription
idintegerUnique ID of the country/state
activebooleanWhether the country/state is active
namestringName of the country/state
codestringCode of the country/state (e.g., ISO code)

City:

FieldTypeDescription
idintegerCity ID
activebooleanWhether city is active
namestringCity name

Notes

    • If is_payable is false, the order cannot be paid (e.g., canceled or refunded)
    • If is_paid is true, amount_outstanding will be zero