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 or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Query Parameters

ParameterTypeDefaultDescription
limitinteger10Number of results per page
offsetinteger0Number of results to skip
searchstringSearch term to filter results by `id`, `name` and `description`
orderingstringOrder results by field (`id`, `name`, `order`, `active`, `created_at`, `updated_at`)
activebooleanFilter by active status
order_minintegerMinimum order value to filter results by
order_maxintegerMaximum order value to filter results by
has_imagebooleanFilter results to only include shipping methods with an associated image
has_formulabooleanFilter results to only include shipping methods with a formula defined
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)

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

Status Codes

CodeDescription
200Shipping methods retrieved successfully
400Bad request — invalid parameters
401Unauthorized — authentication required
403Forbidden — insufficient permissions
500Internal server error

Response Fields

FieldTypeDescription
idintegerUnique ID of the shipping method
activebooleanWhether the shipping method is active
orderintegerThe order in which the shipping method appears
namestringName of the shipping method
image_dataobjectImage data associated with the shipping method (id, type, name, size, human_readable_size, f, width, height, mode)
descriptionstringDescription of the shipping method
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 Object Fields:

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (read-only, auto-detected)
nameStringOriginal filename
sizeIntegerFile size in bytes (read-only)
human_readable_sizeStringHuman-readable file size (e.g., "2.5 MB")
fStringFile URL/path
widthIntegerImage width in pixels (images only, read-only)
heightIntegerImage height in pixels (images only, read-only)
modeStringImage color mode (images only, read-only)