Skip to main content

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

ParameterTypeDefaultDescription
limitinteger10Number of results per page
offsetinteger0Number of results to skip
searchstringSearch term to lookup results by`id`, `name` and `description`
orderingstring-created_atOrder results by field (`id`, `name`, `order`, `active`, `created_at`, `updated_at`)
id_minintegerMinimum ID to filter results by
id_maxintegerMaximum ID to filter results by
created_datestringFilter results by creation date (e.g., 2023-01-01)
updated_datestringFilter results by last updated date (e.g., 2023-01-01)
created_fromstringFilter results by creation date range start (e.g., 2023-01-01)
created_tostringFilter results by creation date range end (e.g., 2023-12-31)
updated_fromstringFilter results by last updated date range start (e.g., 2023-01-01)
updated_tostringFilter results by last updated date range end (e.g., 2023-12-31)
activebooleanFilter by active status
order_minintegerMinimum row-order value to filter results by
order_maxintegerMaximum row-order value to filter results by
has_imagebooleanFilter shipping methods by having/not having images
has_formulabooleanFilter results to include/exclude shipping methods with a formula defined

Example Requests

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())

Response Fields

FieldTypeDescription
countIntegerTotal number of categories
nextStringURL for the next page of results
previousStringURL for the previous page of results
resultsArray[Object]Array of shipping method objects

Shipping Method Object Structure

FieldTypeDescription
idintegerUnique ID of the shipping method
activebooleanWhether the shipping method is active
orderintegerThe display row order of the shipping method (nullable)
namestringName of the shipping method (unique)
image_dataobjectImage data associated with the shipping method(nullable)
descriptionstringDescription of the shipping method (nullable)
formulastringFormula for calculating shipping costs
created_atstring (ISO 8601)Timestamp when the shipping method was created
updated_atstring (ISO 8601)Timestamp when the shipping method was last updated

Image Data Structure

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (e.g., image/jpeg)
nameStringOriginal file name
sizeIntegerFile size in bytes
human_readable_sizeStringHuman readable file size (e.g., 2.5 MB)
fStringURL to access the image file
widthIntegerImage width in pixels
heightIntegerImage height in pixels
modeStringColor mode (e.g., RGB, CMYK)
thumbnailsList of thumbnail objectsImgae thumbnails

Thumbnail Data Structure

FieldTypeDescription
idIntegerUnique ID of the thumbnail (unique)
fStringURL to access the thumbnail file
sizeIntegerFile 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"
}
]
}