Skip to main content

Retrieve Order

Retrieve a specific order item by its unique ID.

HTTP Request

GET/api/orders/:id

Authorization

Authorization

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

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the order to retrieve

Example Requests

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

Status Codes

CodeDescription
200Products retrieved successfully
400Bad request — invalid parameters
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — product does not exist
500Internal server error

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