Skip to main content

Retrieve Brand

Retrieves detailed information about a specific brand by its unique ID.

HTTP Request

GET/api/products/brands/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the brand to retrieve

Example Requests

1import requests
2
3# Retrieve a specific brand
4response = requests.get('http://www.example.com/api/products/brands/123', 
5  headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())

Status Codes

CodeDescription
200Brand retrieved successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Not found — brand does not exist
500Internal server error

Response Fields

FieldTypeDescription
idIntegerUnique ID of the brand
image_dataObjectBrand image details (read-only)
orderIntegerDisplay order for brand sorting
nameStringBrand name (unique)
slugStringURL-friendly version of the brand name
descriptionStringBrand description (max 500 characters)
products_countIntegerNumber of products associated with brand
created_atString (ISO 8601)Timestamp when brand was created
updated_atString (ISO 8601)Timestamp when brand was last updated

Image Data Structure

FieldTypeDescription
idIntegerImage ID
typeStringFile type
nameStringImage file name
sizeIntegerFile size in bytes
human_readable_sizeStringHuman readable file size
fStringImage file URL
widthIntegerImage width in pixels
heightIntegerImage height in pixels
modeStringImage color mode