Retrieve Shipping Method
Retrieves the details of a specific shipping method by its ID.
HTTP Request
GET/api/shipping/methods/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique ID of the shipping method |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3response = requests.get('http://www.example.com/api/shipping/methods/1', headers={
4 'Authorization': 'Token <your_api_key>'
5})
6print(response.json())1curl -X GET "http://www.example.com/api/shipping/methods/1" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 200 | Shipping method retrieved successfully |
| 400 | Bad request — invalid input |
| 404 | Shipping method not found |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| id | integer | Unique ID of the shipping method |
| active | boolean | Whether the shipping method is active |
| order | integer | The order in which the shipping method appears |
| name | string | Name of the shipping method |
| image_data | object | Image data associated with the shipping method (id, type, name, size, human_readable_size, f, width, height, mode) |
| description | string | Description of the shipping method |
| 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 Object Fields:
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the image |
| type | String | File type (read-only, auto-detected) |
| name | String | Original filename |
| size | Integer | File size in bytes (read-only) |
| human_readable_size | String | Human-readable file size (e.g., "2.5 MB") |
| f | String | File URL/path |
| width | Integer | Image width in pixels (images only, read-only) |
| height | Integer | Image height in pixels (images only, read-only) |
| mode | String | Image color mode (images only, read-only) |