Label Tutorial
How to add a label to a product
To label a product with a specific information, follow these steps:
Create a label
Add a label image
Update a product with the label information
Create a label
To create a new label, send the request to the Creating a label endpoint.
To test the endpoint, open the API reference or check the example of a curl request.
curl -i -X POST
https://api.emporix.io/label/labels
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
-H 'Content-Type: application/json'
-d '{
"name": "Worldwide Shipment",
"description": "<p>Worldwide Shipment</p>"
}'Executing a request to create a label returns a response that includes an "id" field, which should then be used in the next steps.
Add a label image
Firstly, create and add an image for a new label. Design the image and upload it to your media repository. Send a request to the Creating an asset endpoint.
The labelId is necessary to provide.
To test the endpoint, open the API reference or check the example of a curl request.
Update a product with a new label
You can now update a product with a newly created label to indicate that shipping is available worldwide for this product. Send the request to the Partially updating a product endpoint.
To specify a brand for a product, you need to provide the labelId 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 test the endpoint, open the API reference or check the example of a curl request.
As a result, the product is marked with a new label.
Last updated
Was this helpful?

