Skip to main content

Get All Brands

Retrieve a list of all brands with optional filtering and pagination.
curl -X GET "https://cemac-api.vercel.app/brands?search=&page=1&limit=50" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Authentication: Required (Bearer Token) Method: GET Endpoint: /brands

Query Parameters

Search term to filter brands by name
page
number
Page number for pagination
limit
number
Number of brands per page

Response

success
boolean
Indicates if the request was successful
brands
array
Array of brand objects
total
number
Total number of brands
message
string
Response message

Create Brand

Create a new brand.
curl -X POST https://cemac-api.vercel.app/brands \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "TechPro",
    "description": "Premium technology products and accessories"
  }'
Authentication: Required (Bearer Token) Method: POST Endpoint: /brands

Request Body

name
string
required
Brand name (max 100 characters)
description
string
Description of the brand (max 500 characters)

Response

success
boolean
Indicates if the brand was created successfully
brand
object
Created brand object
message
string
Success message

Update Brand

Update an existing brand’s information.
curl -X PUT https://cemac-api.vercel.app/brands/BRAND_ID \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "TechPro Elite",
    "description": "Premium technology products, accessories, and solutions"
  }'
Authentication: Required (Bearer Token) Method: PUT Endpoint: /brands/{brandId}

Path Parameters

brandId
string
required
Unique identifier of the brand

Request Body

name
string
Updated brand name (max 100 characters)
description
string
Updated description (max 500 characters)

Response

success
boolean
Indicates if the brand was updated successfully
brand
object
Updated brand object
message
string
Success message

Delete Brand

Delete a brand from the system.
curl -X DELETE https://cemac-api.vercel.app/brands/BRAND_ID \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Authentication: Required (Bearer Token) Method: DELETE Endpoint: /brands/{brandId}

Path Parameters

brandId
string
required
Unique identifier of the brand to delete

Response

success
boolean
Indicates if the brand was deleted successfully
brandId
string
ID of the deleted brand
message
string
Success message

Get Brand Statistics

Retrieve detailed statistics for a specific brand.
curl -X GET https://cemac-api.vercel.app/brands/BRAND_ID/stats \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Authentication: Required (Bearer Token) Method: GET Endpoint: /brands/{brandId}/stats

Path Parameters

brandId
string
required
Unique identifier of the brand

Response

success
boolean
Indicates if the request was successful
brand
object
Brand details
stats
object
Brand statistics
message
string
Response message

Build docs developers (and LLMs) love