Skip to main content

Update Brand

Updates an existing brand. Only the fields you send are changed; all other fields keep their current values.

HTTP Request​

  • URL: /brands/{id}
  • Method: PUT
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: None. Any valid access token can call this endpoint.

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the brand to update.

Request Body​

Send a JSON object with the fields you want to change. At least one field is required.

FieldTypeRequiredDescription
nameStringNoName of the brand.
urlStringNoURL slug of the brand page. It is converted to lowercase with hyphens.
descriptionStringNoDescription of the brand. Can be empty or null.
imageStringNoURL of the brand image. The image is copied to your store's media library.
sortOrderNumberNoDisplay order. Lower numbers appear first.
isFeaturedBooleanNoWhether the brand is featured.
isShowBooleanNoWhether the brand is visible on the storefront.
isShowNavBarBooleanNoWhether the brand appears in the navigation bar.
seoObjectNoSEO settings with pageTitle, metaKeywords and metaDescription.
metaFieldsArrayNoCustom field values, each with a code and a value. See Metafields.

cURL Example​

curl --location --request PUT '<BASE_URL>/brands/663a0f1e4587085935a4fa21' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"description": "Hand tools, power tools and accessories.",
"sortOrder": 2,
"isShowNavBar": true
}'

Response​

  • 200 OK: The request was processed. Check success to confirm the brand was updated.
  • 400 Bad Request: The access token is missing or invalid, the brand ID is not valid, or the request body is not valid.

Sample JSON Response​

{
"success": true,
"message": "Brand updated successfully",
"data": {
"id": "663a0f1e4587085935a4fa21",
"name": "Acme Tools",
"url": "acme-tools",
"description": "Hand tools, power tools and accessories.",
"image": "https://cdn.example.com/brands/acme-tools.webp",
"productCount": 128,
"sortOrder": 2,
"isFeatured": true,
"isShow": true,
"isShowNavBar": true,
"seo": {
"pageTitle": "Acme Tools",
"metaKeywords": "acme, tools",
"metaDescription": "Shop Acme Tools products."
},
"metaFields": [],
"createdAt": "2024-05-07T11:13:02.066Z",
"updatedAt": "2024-10-21T08:42:17.512Z"
}
}

Response Details​

FieldTypeDescription
successBooleantrue when the brand was updated.
messageStringConfirmation message.
dataObjectThe updated brand. See Get Single Brand for its fields.

Notes​

  • If no brand matches the ID, the response has success: false and the message Brand not exists!.
  • seo replaces the whole SEO object, so include every SEO field you want to keep.
  • productCount is maintained automatically and cannot be set directly.