List Shipping Methods
Retrieve a list of shipping methods with optional filtering and pagination.
HTTP Request
GET/api/shipping/methods
Authorization
Authorization
- Required: Yes
- Permission: Staff with ShippingMethodPermission or Admin
- Permission Code: 2602
- Authentication: Token-based (Authorization: Token <your_api_key>)
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Number of results per page |
| offset | integer | 0 | Number of results to skip |
| search | string | — | Search term to lookup results by`id`, `name` and `description` |
| ordering | string | -created_at | Order results by field (`id`, `name`, `order`, `active`, `created_at`, `updated_at`) |
| id_min | integer | — | Minimum ID to filter results by |
| id_max | integer | — | Maximum ID to filter results by |
| created_date | string | — | Filter results by creation date (e.g., 2023-01-01) |
| updated_date | string | — | Filter results by last updated date (e.g., 2023-01-01) |
| created_from | string | — | Filter results by creation date range start (e.g., 2023-01-01) |
| created_to | string | — | Filter results by creation date range end (e.g., 2023-12-31) |
| updated_from | string | — | Filter results by last updated date range start (e.g., 2023-01-01) |
| updated_to | string | — | Filter results by last updated date range end (e.g., 2023-12-31) |
| active | boolean | — | Filter by active status |
| order_min | integer | — | Minimum row-order value to filter results by |
| order_max | integer | — | Maximum row-order value to filter results by |
| has_image | boolean | — | Filter shipping methods by having/not having images |
| has_formula | boolean | — | Filter results to include/exclude shipping methods with a formula defined |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List all shipping methods
4response = requests.get('http://www.example.com/api/shipping/methods',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())
8
9# Filter active shipping methods
10response = requests.get('http://www.example.com/api/shipping/methods', params={
11 'active': True,
12 'ordering': 'order',
13 'limit': 20
14}, headers={'Authorization': 'Token <your_api_key>'})
15print(response.json())
16
17# Search for shipping methods by name
18response = requests.get('http://www.example.com/api/shipping/methods', params={
19 'name': 'Standard',
20 'active': True
21}, headers={'Authorization': 'Token <your_api_key>'})
22print(response.json())1# List all shipping methods
2curl "http://www.example.com/api/shipping/methods" -H "Authorization: Token <your_api_key>"
3
4# Filter active shipping methods
5curl "http://www.example.com/api/shipping/methods?active=true&ordering=order&limit=20" -H "Authorization: Token <your_api_key>"
6
7# Search for shipping methods by name
8curl "http://www.example.com/api/shipping/methods?name=Standard&active=true" -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 shipping method objects |
Shipping Method Object Structure
| Field | Type | Description |
|---|---|---|
| id | integer | Unique ID of the shipping method |
| active | boolean | Whether the shipping method is active |
| order | integer | The display row order of the shipping method (nullable) |
| name | string | Name of the shipping method (unique) |
| image_data | object | Image data associated with the shipping method(nullable) |
| description | string | Description of the shipping method (nullable) |
| formula | string | Formula for calculating shipping costs |
| created_at | string (ISO 8601) | Timestamp when the shipping method was created |
| updated_at | string (ISO 8601) | Timestamp when the shipping method was last updated |
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) |
Example Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"active": true,
"order": 2,
"name": "پیک وانت",
"image_data": null,
"description": "ارسال با وانت",
"formula": "1/2 mv^2",
"created_at": "2025-12-20T16:28:16.221365Z",
"updated_at": "2025-12-20T16:28:16.221369Z"
},
{
"id": 1,
"active": true,
"order": 1,
"name": "پیک موتور",
"image_data": {
"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
}
]
},
"description": "پیک موتوری سراسر شهر",
"formula": "",
"created_at": "2025-12-20T16:27:40.672629Z",
"updated_at": "2025-12-20T16:27:40.672633Z"
}
]
}