List All Orders
Retrieve customer's order history with detailed information.
HTTP Request
GET/api/shop/customers/me/orders
Authorization
Authorization
- Required: Yes
- Permission: Authenticated Customer
- Authentication: Token-based (`Authorization: Token <your_api_key>`)
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Number of results to return per page |
| offset | integer | 0 | Number of results to skip |
| search | string | — | Search in `id`, `key`, `notes`, `billing_country__name`, `billing_state__name`, `billing_city__name`, `billing_first_name`, `billing_last_name`, `billing_mobile_number` |
| ordering | string | — | Order results by (`id`, `created_at`, `updated_at`, `status`, `shipping_cost`, `billing_country__name`, `billing_state__name`, `billing_city__name`, `payment_method__name`, `shipping_method__name`) |
| status | string | — | Filter by order status. (`new`, `hold`, `failed`, `cancelled`, `processing`, `shipped`, `completed`, `refunded`) |
| status_in | string | — | Filter by multiple order statuses (comma-separated) (`new`, `hold`, `failed`, `cancelled`, `processing`, `shipped`, `completed`, `refunded`, `deleted`) |
| payment_method | integer | — | Filter by payment method ID |
| payment_method_in | string | — | Filter by multiple payment methods (comma-separated) |
| shipping_method | integer | — | Filter by shipping method ID |
| shipping_method_in | string | — | Filter by multiple shipping methods (comma-separated) |
| billing_country | integer | — | Filter by billing country ID |
| billing_state | integer | — | Filter by billing state ID |
| billing_city | integer | — | Filter by billing city ID |
| billing_country_in | string | — | Filter by multiple billing countries (comma-separated) |
| billing_state_in | string | — | Filter by multiple billing states (comma-separated) |
| billing_city_in | string | — | Filter by multiple billing cities (comma-separated) |
| has_notes | boolean | — | Filter orders with/without notes |
| id_min | integer | — | Minimum ID filter |
| id_max | integer | — | Maximum ID filter |
| created_date | string | — | Filter by creation date |
| updated_date | string | — | Filter by last updated date |
| created_from | string | — | Filter by creation date range start |
| created_to | string | — | Filter by creation date range end |
| updated_from | string | — | Filter by last updated date range start |
| updated_to | string | — | Filter by last updated date range end |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List customer orders
4response = requests.get('http://www.example.com/api/shop/customers/me/orders',
5 params={
6 'ordering': '-created_at',
7 'limit': 20,
8 'status': 'completed'
9 },
10 headers={'Authorization': 'Token <your_api_key>'}
11)
12print(response.json())
13
14# Filter orders by payment method and date
15response = requests.get('http://www.example.com/api/shop/customers/me/orders',
16 params={
17 'payment_method': 1,
18 'created_from': '2024-01-01',
19 'status_in': 'pending,processing,completed'
20 },
21 headers={'Authorization': 'Token <your_api_key>'}
22)
23print(response.json())1# List customer orders with filters
2curl "http://www.example.com/api/shop/customers/me/orders?ordering=-created_at&status=completed&limit=20" -H "Authorization: Token <your_api_key>"
3
4# Filter orders by multiple criteria
5curl "http://www.example.com/api/shop/customers/me/orders?payment_method=1&created_from=2024-01-01&status_in=pending,processing" -H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| count | Integer | Total number of categories |
| next | String | URL for the next page of results |
| previous | String | URL for the previous page of results |
| results | Array[Object] | Array of Order objects |
Order Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | integer | Unique ID of the order |
| key | string | Unique key of the order |
| status | string | Current order status (choices: `new`, `hold`, `failed`, `cancelled`, `processing`, `shipped`, `completed`, `refunded`) |
| customer | object | Customer details (nullable) |
| payment_method | object | Payment method details (nullable) |
| shipping_method | object | Shipping method details (nullable) |
| shipping_cost | decimal | Cost of shipping (default=0) |
| notes | string | Order notes (nullable) |
| created_at | string (ISO 8601) | Order creation timestamp |
| updated_at | string (ISO 8601) | Order last update timestamp |
| billing_country | object | Billing country details (nullable) |
| billing_state | object | Billing state details (nullable) |
| billing_city | object | Billing city details (nullable) |
| billing_address | string | Billing address (nullable) |
| billing_postal_code | string | Billing postal code (nullable, valid 10 digit postal code) |
| billing_national_code | string | Billing national code (nullable, valid 10 digit national code) |
| billing_mobile_number | string | Billing mobile number (nullable, valid iranian mobile number) |
| billing_first_name | string | Billing first name (nullable) |
| billing_last_name | string | Billing last name (nullable) |
| count | integer | Number of different products in the order |
| quantity | integer | Total quantity of all items in the order |
| items_subtotal | decimal | Subtotal of all items before discounts |
| items_discount | decimal | Total discount applied to items |
| subtotal | decimal | Order subtotal after item discounts |
| total_discount | decimal | Total discount amount on the order |
| total | decimal | Final order total after all discounts and shipping costs |
| amount_paid | decimal | Amount already paid towards the order |
| amount_outstanding | decimal | Outstanding amount yet to be paid |
| is_paid | boolean | Whether the order is fully paid |
| is_payable | boolean | Whether payments are allowed on the order |
Customer Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the customer |
| username | String | Username of the customer |
| full_name | String | Full name of the customer (computed field) |
Payment Method Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the customer |
| name | String | Name of the payment method |
| image | Object | Image details of the payment method |
Image Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the image |
| type | String | File type (e.g., image/jpeg) |
| name | String | Original file name |
| size | Integer | File size in bytes |
| human_readable_size | String | Human readable file size (e.g., 2.5 MB) |
| f | String | URL to access the image file |
| width | Integer | Image width in pixels |
| height | Integer | Image height in pixels |
| mode | String | Color mode (e.g., RGB, CMYK) |
| thumbnails | List of thumbnail objects | Imgae thumbnails |
Thumbnail Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the thumbnail (unique) |
| f | String | URL to access the thumbnail file |
| size | Integer | File size in bytes (nullable) |
Shipping Method Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the shipping method |
| name | String | Name of the shipping method |
| image | Object | Image details of the shipping method |
Billing Country Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the billing country |
| name | String | Name of the billing country |
| code | String | Code of the billing country |
Billing State Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the billing state |
| name | String | Name of the billing state |
| code | String | Code of the billing state |
Billing City Object Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the billing city |
| name | String | Name of the billing city |
Example Response
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"key": "0c86ab758d3e236cb5a4",
"status": "shipped",
"customer": {
"id": 1,
"username": "behrooz3500",
"full_name": "behrooz ghorbanie"
},
"payment_method": {
"id": 1,
"name": "پرداخت در مخل",
"image": null
},
"shipping_method": {
"id": 1,
"name": "پیک موتور",
"image": {
"id": 8,
"type": "image",
"name": "پیک موتوری",
"size": 808754,
"human_readable_size": "789.80 KB",
"f": "http://127.0.0.1:8000/media/core_media/2025/12/20/Fantasticheskie_kartinki_dlja_monitora_68_63.jpg",
"width": 1920,
"height": 1080,
"mode": "RGB",
"thumbnails": [
{
"id": 213,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_64x64.jpg",
"size": 64
},
{
"id": 214,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_128x128.jpg",
"size": 128
},
{
"id": 215,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_512x512.jpg",
"size": 512
},
{
"id": 216,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_1080x1080.jpg",
"size": 1080
}
]
}
},
"shipping_cost": 75000,
"notes": "Facilis sequi alias optio. Alias ipsam deserunt. At veniam nam et. Et aut id id aut quae non animi. Sed tempora aut ut ipsa dicta vel eveniet et aspernatur.",
"created_at": "2025-12-27T18:17:09.771123Z",
"updated_at": "2025-12-28T11:28:47.290350Z",
"billing_country": {
"id": 1,
"name": "ایران",
"code": "IR"
},
"billing_state": {
"id": 1,
"name": "آذربایجان شرقی",
"code": "EA"
},
"billing_city": {
"id": 1,
"name": "اسکو"
},
"billing_address": "5411 Stokes Grove",
"billing_postal_code": "1234567890",
"billing_national_code": null,
"billing_mobile_number": "09523296536",
"billing_first_name": "پدرام",
"billing_last_name": "زمانی",
"count": 0,
"quantity": 0,
"items_subtotal": 0,
"items_discount": 0,
"subtotal": 0,
"total_discount": 0,
"total": 75000,
"amount_paid": 50000,
"amount_outstanding": 25000,
"is_paid": false,
"is_payable": true
}
]
}
Notes
- If
is_payableis false, the order cannot be paid (e.g.,cancelledorrefunded) - If
is_paidis true,amount_outstandingwill be zero