Add Brands

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Allows you to create product brands in bulk. The API automatically processes parent brands before child brands. You can add up to 100 brands per request. This limit is controlled by the CONF_PRODUCT_CREATE_UPDATE_BATCH_SIZE configuration. To modify this limit, raise a JIRA ticket to the Capillary Product Support team.

An organization can maintain a hierarchy with a depth of up to 5 levels, and each parent brand can have a maximum of 50 child brands. These limits are controlled by the following configurations:

ConfigurationDefaultDescription
org_brand_max_children_limit50Maximum number of child brands a parent brand can have.
org_brand_max_depth_limit5Maximum hierarchy depth for brand relationships.

To modify these limits for your organization, raise a JIRA ticket to the Capillary Product Support team.

Example request

curl --location 'https://{Host}/v2/product/brands' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlcmFqa3Jpc2h2VhNmU1ODlhM2U0M2JhODdkMTFkMTM2ODI2NmMxOQ==' \
--data '[
    {
        "code": "BRAND-parentcode",
        "name": "Brand-parent",
        "description": "This is the parent brand"
    }
]'
curl --location 'https://{Host}/v2/product/brands' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlcmFqa3Jpc2huYTpkY2VhNmU1ODlhM2U0M2JhODdkMTFkMTM2ODI2NmMxOQ==' \
--data '[
    {
        "code": "BRAND-child",
        "name": "Brand-child",
       "parentCode": "BRAND-parentcode",
        "description": "parent test"
    }
]'
curl --location 'https://nightly.intouch.capillarytech.com/v2/product/brands' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '[
    {
        "code": "BRAND-parent1",
        "name": "Brand 2",
        "description": "This is parent brand"
    },
    {
        "code": "BRAND-parent2",
        "name": "Brand 33",
        "description": "This is parent brand"
    }
]'
curl --location 'https://nightly.intouch.capillarytech.com/v2/product/brands' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlcmFqa3Jpc2huY1ODlhM2U0M2JhODdkMTFkMTM2ODI2NmMxOQ==' \
--data '[
    {
        "code": "BRAND-child1",
        "name": "Brand",
        "parentCode": "BRAND-parentcode",
        "description": "This is the child brand 1"
    },
    {
        "code": "BRAND-child2",
        "name": "Brand",
        "parentCode": "BRAND-parentcode",
        "description": "This is the child brand 2"
    }
]'
curl --location 'https://{Host}/v2/product/brands' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlcmFqa3Jpc2huYTpkY2VhJhODdkMTFkMTM2ODI2NmMxOQ==' \
--data '[
    {
        "code": "BRAND002child-1",
        "name": "Brand 2",
        "parentCode": "BRAND002parent",
        "description": "parent test"
    },
    {
        "code": "BRAND002child-2",
        "name": "Brand 2",
        "parentCode": "BRAND002parentjo",
        "description": "parent test"
    },
     {
        "code": "BRAND00parent001",
        "name": "Brand 2",
        "description": "parent test"
    }
]

]'

Prerequisites

Body parameters

[!IMPORTANT]
You must provide both the brand name and label when adding a product brand. If you provide only the name without a label, the brand is not stored and does not appear in the user interface, even if a success message is shown.

FieldTypeRequiredDescription
codestringYesDefines the unique identifier for the brand. A maximum of 50 characters is supported. Codes are validated case-insensitively. For example, "BRAND1" and "brand1" are treated as duplicates. The same code can exist for different organizational units (ouCode).
namestringYesDefines a display name of the brand. There is no strict character limit.
labelstringYesDefines the label for the brand. This field is required. If you do not provide a label, the brand is not stored and does not appear in the user interface, even if a success message is shown. The label helps identify the brand in the UI.
descriptionstringOptionalDefines a summary of the brand. There is no strict character limit.
ouCodestringOptionalSpecifies the concept code of the organisation unit. This is applicable only if OU support for product inventory is enabled. For more information, see OU support for product inventory.
parentCodestringOptionalCode of the parent brand. Parent brand must be already created or be in the same request body.

API quick reference

{{https://{Host}/v2/product/brands}}
   └─ {{RequestBody}} (Batch Array)
      ├─ {{code}} (string)
      ├─ {{name}} (string)
      ├─ {{label}} (string)
      ├─ {{description}} (string)
      ├─ {{ouCode}} (string)
      ├─ {{parentCode}} (string)
      └─ {{ResponseBody}}
          ├─ {{created}} []
          │   ├─ {{responseId}} (integer)
          │   ├─ {{responseOuId}} (integer)
          │   └─ {{responseCode}} (string)
          ├─ {{summary}}
          │   ├─ {{totalRequested}} (integer)
          │   ├─ {{successCount}} (integer)
          │   └─ {{failureCount}} (integer)
          ├─ {{warnings}} []
          └─ {{errors}} []

Example response

{
    "created": [
        {
            "id": 1242752,
            "ouId": -1,
            "code": "BRAND_001"
        },
        {
            "id": 1242753,
            "ouId": 15041271,
            "code": "BRAND_002"
        }
    ],
    "summary": {
        "totalRequested": 2,
        "successCount": 2,
        "failureCount": 0
    },
    "warnings": [],
    "errors": []
}

Response parameters

FieldTypeDescription
createdarrayIndicates the list of successfully created brand objects.
.idintegerIndicates the system-generated unique ID for the brand.
.ouIdintegerIndicates the ID of the Organization Unit (-1 for Org level).
.codestringIndicates the brand code is provided in the request.
summaryobjectRepresents the high-level statistics and meta-information for the bulk operation.
.totalRequestedintegerSpecifies the total count of brand records submitted in the request payload.
.successCountintegerTracks the number of brand entities that passed validation and were successfully created.
.failureCountintegerSpecifies the number of brand records that failed validation and were rejected.
warningsarrayHighlights non-blocking issues or ignored parameters encountered during processing.
errorsarrayList of error objects for failed records.

Error codes

CodeDescription
9182Organization-level brand limit reached. Contact support to increase the limit.
9170Brand code exceeds the maximum length of 50 characters.
10001Invalid ouCode provided. Use a valid concept code.
10002OU level product filtering is disabled for your organization, but an ouCode was provided.
10051At least one brand must be present in the request.
10052Request exceeds the limit of 100 brands.
10053Brand code cannot be empty. Provide a valid string for the code field.
10054Brand code already exists in the database. Codes are checked case-insensitively.
10055Brand name cannot be empty. Provide a valid string for the name field.
10056Duplicate brand codes found within the same request payload (for the same organizational unit). Codes are checked case-insensitively.
10057The specified parentCode does not exist.
10058Parent brand has exceeded the maximum number of child brands.
10059Hierarchy depth exceeds the 5-level limit.
Body Params
Responses
200

Successful response

400

Bad request. Possible error codes:

  • 10054 (ERR_BRAND_CODE_EXISTS): Brand code already exists in the database. Codes are checked case-insensitively.
  • 10056 (ERR_BRAND_DUPLICATE_CODE_IN_PAYLOAD): Duplicate brand codes found within the same request payload (for the same organizational unit). Codes are checked case-insensitively.
Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!