Brand 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.

Create a brand

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

API Reference
curl -i -X POST 
  https://api.emporix.io/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 asset endpoint. The brandId is necessary to provide.

API Reference

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 product endpoint.

API Reference

Last updated

Was this helpful?