graduation-capBrand Tutorial

How to create a brand with media files

To create a brand with media files and add it to a product created beforehand, follow the process below:

Before you start

Ensure that you have created a product.

circle-exclamation

Create a brand

To create a brand and add media files to it, you need to send a request to the Adding a new brandarrow-up-right endpoint.

circle-check
rectangle-terminalAPI Referencechevron-right
curl -i -X POST 
  https://api.emporix.io/brand/brands 
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' 
  -H 'Content-Language: en' 
  -H 'Content-Type: application/json' 
  -d '{
    "name": "Sample brand",
    "description": "Description of the sample brand.",
    "localizedName": {
        "en": "Brand one"
    },
    "localizedDescription": {
        "en": "Description of <strong>Brand one</strong> in HTML."
    }
}'

Executing a request to create a brand returns a response that includes an "id" field, which should then be used when uploading an image.

Upload an image

To include an image for a brand, you need to upload the image to the database by sending a multipart request to the Creating an assetarrow-up-right endpoint. The brandId is necessary to provide.

rectangle-terminalAPI Referencechevron-right

Update an existing product with brand information

To specify a brand for a product, you need to provide the brandId field on product level which should be used. You can add brands either during the creation of the product, or by updating a product that already exists in the system.

To update the existing product with brand information, you need to send a request to the Partially updating a productarrow-up-right endpoint.

rectangle-terminalAPI Referencechevron-right

Last updated

Was this helpful?