Retrieve Brand by Slug
Retrieve a specific brand by its unique slug.
HTTP Request
GET/api/shop/brands/:slug
Authorization
Authorization
- Required: No
- Permission: None (public access) or Authenticated users
- Authentication: None or Token-based authentication
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| slug | String | Yes | URL-friendly version of the brand name |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2response = requests.get('http://www.example.com/api/shop/brands/apple/')
3print(response.json())1curl -X GET "http://www.example.com/api/shop/brands/apple/" -H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the brand |
| order | Integer | Display order of the brand |
| image | Object or null | Brand image data (`id`, `url`, `name`) |
| name | String | Brand name |
| slug | String | URL-friendly version of the brand name |
| description | String | Brand description |
| products_count | Integer | Number of products associated with this brand |
| created_at | String (ISO 8601) | Timestamp when brand was created |
| updated_at | String (ISO 8601) | Timestamp when brand 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
{
"id": 3,
"order": 2,
"image": {
"id": 12,
"type": null,
"name": "monitora",
"size": 26086,
"human_readable_size": "25.47 KB",
"f": "http://localhost:8000/media/core_media/2026/02/02/e72c4ed0bca30f8fbb3ed7ee2a3a8cf2a9db5bb1_1732347228.webp",
"width": 1920,
"height": 1080,
"mode": "RGB",
"thumbnails": []
},
"name": "Unknown",
"slug": "unknown",
"description": null,
"products_count": 0,
"created_at": "2026-02-02T14:02:15.588109Z",
"updated_at": "2026-02-02T14:02:15.588117Z"
}
Notes
- The
imagefield may be null if no image is associated with the brand. - The
descriptionfield may be empty if no description is available. - The
products_countfield indicates how many active products are associated with the brand.