Skip to main content

Get Single Brand

This endpoint retrieves the details of a specific brand by its ID.

Endpoint

  • URL: /brands/{id}
  • Method: GET

Replace {id} with the specific brand ID you want to retrieve.

Authentication

  • Header: accessToken
  • Type: Bearer Token
  • Value: <ACCESS-TOKEN>

Request Headers

HeaderTypeDescription
accessTokenstringAccess token for authentication. (required)

Path Parameters

ParameterTypeDescription
idstringThe unique identifier of the brand to be retrieved.

Example Request

Here is an example using curl to retrieve a brand:

curl --location '<BASE-URL>/brands/brand_id_here' \
--header 'accessToken: <ACCESS-TOKEN>'

Note

  • Replace the placeholder in the URL with the actual brand ID.
  • Ensure you include a valid accessToken in the request to authenticate.

Response

  • Status Code: 200 OK

Success Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful.
dataobjectContains the details of the requested brand.

Example Success Response

{
"success": true,
"data": {
"id": "brand_id",
"name": "Brand Name",
"url": "brand-url",
"description": "Brand description",
"image": "image_url",
"productCount": 10,
"sortOrder": 0,
"isFeatured": false,
"isShow": true,
"isShowNavBar": false,
"seo": {
"pageTitle": "Brand Page Title",
"metaKeywords": "keywords",
"metaDescription": "description"
},
"metaFields": [],
"createdAt": "2024-05-07T11:13:02.066Z",
"updatedAt": "2024-10-09T13:05:59.036Z"
}
}

Brand Data Object

FieldTypeDescription
idstringUnique identifier for the brand.
namestringThe name of the brand.
urlstringURL-friendly slug for the brand.
descriptionstringA brief description of the brand.
imagestringURL to the brand's main image.
productCountnumberNumber of products associated with this brand.
sortOrdernumberOrder for sorting brands. Lower numbers appear first.
isFeaturedbooleanWhether the brand is marked as featured.
isShowbooleanWhether the brand is visible.
isShowNavBarbooleanWhether the brand appears in the navigation bar.
seoobjectSEO metadata for the brand page.
metaFieldsarrayCustom metadata fields associated with the brand.
createdAtdateTimestamp when the brand was created.
updatedAtdateTimestamp when the brand was last updated.

SEO Object

FieldTypeDescription
pageTitlestringTitle for the brand page.
metaKeywordsstringMeta keywords for SEO.
metaDescriptionstringMeta description for SEO.

Error Responses

Status CodeDescription
400Bad Request: Provided data is invalid or malformed.
401Unauthorized: Access token is invalid or missing.
404Not Found: Brand with specified ID does not exist.
500Internal Server Error: An error occurred on the server.

Notes

  • Ensure the ID of the brand you wish to retrieve is valid and exists.
  • You must provide a valid accessToken for authentication.