Skip to main content

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

ParameterTypeRequiredDescription
slugStringYesURL-friendly version of the brand name

Example Requests

1import requests
2response = requests.get('http://www.example.com/api/shop/brands/apple/')
3print(response.json())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the brand
orderIntegerDisplay order of the brand
imageObject or nullBrand image data (`id`, `url`, `name`)
nameStringBrand name
slugStringURL-friendly version of the brand name
descriptionStringBrand description
products_countIntegerNumber of products associated with this brand
created_atString (ISO 8601)Timestamp when brand was created
updated_atString (ISO 8601)Timestamp when brand 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

{
"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 image field may be null if no image is associated with the brand.
    • The description field may be empty if no description is available.
    • The products_count field indicates how many active products are associated with the brand.