Skip to main content

Create Multiple Brands

Creates several brands in a single request. This is useful when importing brands from another system.

HTTP Request​

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

Request Body​

Send a JSON array. Each item in the array is a brand with the following fields.

FieldTypeRequiredDescription
nameStringYesName of the brand.
urlStringNoURL slug of the brand page. If omitted, it is generated from name.
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. Default is 0.
isFeaturedBooleanNoWhether the brand is featured. Default is false.
isShowBooleanNoWhether the brand is visible on the storefront. Default is true.
isShowNavBarBooleanNoWhether the brand appears in the navigation bar. Default is false.
seoObjectNoSEO settings with pageTitle, metaKeywords and metaDescription.
metaFieldsArrayNoCustom field values, each with a code and a value. See Metafields.

cURL Example​

curl --location '<BASE_URL>/brands/multiple' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '[
{
"name": "Acme Tools",
"url": "acme-tools",
"sortOrder": 1,
"isFeatured": true
},
{
"name": "Northwind Hardware",
"description": "Fasteners and fixings.",
"metaFields": [
{ "code": "country_of_origin", "value": "Japan" }
]
}
]'

Response​

  • 200 OK: The brands were created successfully.
  • 400 Bad Request: The access token is missing or invalid, or the request body is not valid. No brands are created.

Sample JSON Response​

{
"success": true,
"message": "Brands added successfully",
"data": [
{
"id": "663a0f1e4587085935a4fa21",
"name": "Acme Tools",
"url": "acme-tools",
"productCount": 0,
"sortOrder": 1,
"isFeatured": true,
"isShow": true,
"isShowNavBar": false,
"seo": {},
"metaFields": [],
"createdAt": "2024-05-07T11:13:02.066Z",
"updatedAt": "2024-05-07T11:13:02.066Z"
},
{
"id": "663a0f1e4587085935a4fa22",
"name": "Northwind Hardware",
"url": "northwind-hardware",
"description": "Fasteners and fixings.",
"productCount": 0,
"sortOrder": 0,
"isFeatured": false,
"isShow": true,
"isShowNavBar": false,
"seo": {},
"metaFields": [
{
"metaFieldId": "6650c2a1f1d2e83a1b9c0d11",
"code": "country_of_origin",
"label": "Country of Origin",
"displayStorefront": true,
"value": "Japan",
"valueType": "text"
}
],
"createdAt": "2024-05-07T11:13:02.066Z",
"updatedAt": "2024-05-07T11:13:02.066Z"
}
]
}

Response Details​

FieldTypeDescription
successBooleantrue when the brands were created.
messageStringConfirmation message.
dataArrayThe new brands, in the same order as the request. See Get Single Brand for the brand fields.

Notes​

  • productCount starts at 0 for every new brand.