Skip to main content

Retrieve Order

Retrieve a specific order item by its unique ID.

HTTP Request

GET/api/orders/:order_id/items/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with OrderItemPermission or Admin
  • Permission Code: 2222
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
order_idIntegerYesUnique ID of the order
idIntegerYesUnique ID of the order item to retrieve

Example Requests

1import requests
2
3response = requests.get('http://www.example.com/api/orders/123/items/2', 
4  headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.json())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the order item
productIntegerUnique ID of the product
product_nameStringCurrent Product Name
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

Example Response

{
"id": 8,
"product": 36,
"product_title": "ماوس لاجیتک MX Vertical",
"product_data": {
"id": 36,
"code": "1001001",
"slug": "logitech-mouse-mx-vertical",
"image": {
"f": "http://127.0.0.1:8000/media/core_media/2025/11/22/logitech-mx-1.jpg",
"id": 2,
"mode": "RGB",
"name": "logitech-mx-1",
"size": 4766,
"type": "image",
"width": 225,
"height": 225,
"human_readable_size": "4.65 KB"
},
"title": "ماوس لاجیتک MX Vertical"
},
"unit_price": 9780000,
"unit_discount": 80000,
"quantity": 5,
"notes": "some random note",
"subtotal": 48900000,
"discount": 400000,
"total": 48500000,
"created_at": "2025-12-28T11:29:10.190784Z",
"updated_at": "2025-12-28T11:29:10.190792Z"
}