# Label

## Retrieving labels

> Retrieves all tenant labels.

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"parameters":{"qParam":{"in":"query","name":"q","description":"A standard query parameter is used to search for specific values. \n\nSee: [Standard practises - Query parameter](https://developer.emporix.io/api-references/standard-practices/q-param)\n","schema":{"type":"string"}},"pageSize":{"schema":{"type":"string"},"in":"query","name":"pageSize","description":"The number of documents to be retrieved per page."},"pageNumber":{"schema":{"type":"string"},"in":"query","name":"pageNumber","description":"The page number to be retrieved. The size of the pages should be specified by the pageSize parameter."},"sort":{"schema":{"type":"string"},"in":"query","name":"sort","description":"List of properties used to sort the results, separated by colons."},"fields":{"schema":{"type":"string"},"in":"query","name":"fields","description":"Fields to be returned in the response."},"xTotalCount":{"schema":{"type":"boolean"},"in":"header","name":"X-Total-Count","description":"Flag indicating whether the total number of retrieved results should be returned."}},"schemas":{"label":{"properties":{"id":{"type":"string","description":"Unique ID of the label."},"name":{"type":"string","description":"Name of the label."},"mediaId":{"type":"string","description":"Id of the media."},"image":{"type":"string","description":"Image URL."},"cloudinaryUrl":{"type":"string","description":"Cludinary path."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"overlay":{"description":"If present and `isTrue` is actually true the label should be printed on associated products on the described position.","properties":{"isTrue":{"type":"boolean"},"position":{"type":"number"}},"required":["position"]},"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}},"responses":{"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels":{"get":{"tags":["Label"],"summary":"Retrieving labels","description":"Retrieves all tenant labels.","operationId":"GET-label-list-labels","parameters":[{"in":"query","name":"justOverlay","schema":{"type":"boolean"},"description":"Restricts the labels to just the ones which should be printed on the Products as overlay. If the parameter is true, then only the labels with overlay.position >= 1 will be shown. Otherwise, all the labels will be shown.","required":false},{"in":"header","name":"Accept-Language","required":false,"schema":{"type":"string"},"description":"The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred."},{"$ref":"#/components/parameters/qParam"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/pageNumber"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/xTotalCount"}],"responses":{"200":{"description":"The request was successful. List of labels is returned.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/label"}}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```

## Creating a label

> Creates a new label.<br>

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"schemas":{"labelCreation":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the label. It will be auto-generated if not provided."}}},{"$ref":"#/components/schemas/labelUpdate"}]},"labelUpdate":{"properties":{"name":{"type":"string","description":"Name of the label."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."}},"required":["name","description"]},"overlay":{"description":"If present and `isTrue` is actually true the label should be printed on associated products on the described position.","properties":{"isTrue":{"type":"boolean"},"position":{"type":"number"}},"required":["position"]},"label":{"properties":{"id":{"type":"string","description":"Unique ID of the label."},"name":{"type":"string","description":"Name of the label."},"mediaId":{"type":"string","description":"Id of the media."},"image":{"type":"string","description":"Image URL."},"cloudinaryUrl":{"type":"string","description":"Cludinary path."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}},"responses":{"bad_request_400":{"description":"Request was syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"messageTemplate":{"type":"string"},"path":{"type":"string"}}}}}}},"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"forbidden_403":{"description":"Access forbidden. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"conflict_409":{"description":"Label with given ID already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object","properties":{"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels":{"post":{"tags":["Label"],"summary":"Creating a label","description":"Creates a new label.\n","operationId":"POST-label-create-label","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/labelCreation"}}}},"responses":{"201":{"description":"The label was successfully created.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/label"}}}},"400":{"$ref":"#/components/responses/bad_request_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/forbidden_403"},"409":{"$ref":"#/components/responses/conflict_409"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```

## Retrieving a label

> Retrieves a label with the specified label ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"schemas":{"label":{"properties":{"id":{"type":"string","description":"Unique ID of the label."},"name":{"type":"string","description":"Name of the label."},"mediaId":{"type":"string","description":"Id of the media."},"image":{"type":"string","description":"Image URL."},"cloudinaryUrl":{"type":"string","description":"Cludinary path."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"overlay":{"description":"If present and `isTrue` is actually true the label should be printed on associated products on the described position.","properties":{"isTrue":{"type":"boolean"},"position":{"type":"number"}},"required":["position"]},"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}},"responses":{"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"not_found_404":{"description":"Requested resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object","properties":{"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels/{labelId}":{"get":{"tags":["Label"],"summary":"Retrieving a label","description":"Retrieves a label with the specified label ID.\n","operationId":"GET-label-retrieve-label","responses":{"200":{"description":"The label was successfully retrieved.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/label"}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"404":{"$ref":"#/components/responses/not_found_404"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```

## Updating a label

> Updates a label with the specified label ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"schemas":{"labelUpdate":{"properties":{"name":{"type":"string","description":"Name of the label."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."}},"required":["name","description"]},"overlay":{"description":"If present and `isTrue` is actually true the label should be printed on associated products on the described position.","properties":{"isTrue":{"type":"boolean"},"position":{"type":"number"}},"required":["position"]},"label":{"properties":{"id":{"type":"string","description":"Unique ID of the label."},"name":{"type":"string","description":"Name of the label."},"mediaId":{"type":"string","description":"Id of the media."},"image":{"type":"string","description":"Image URL."},"cloudinaryUrl":{"type":"string","description":"Cludinary path."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}},"responses":{"bad_request_400":{"description":"Request was syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"messageTemplate":{"type":"string"},"path":{"type":"string"}}}}}}},"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"forbidden_403":{"description":"Access forbidden. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"not_found_404":{"description":"Requested resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object","properties":{"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels/{labelId}":{"put":{"tags":["Label"],"summary":"Updating a label","description":"Updates a label with the specified label ID.\n","operationId":"PUT-label-update-label","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/labelUpdate"}}}},"responses":{"200":{"description":"The label was successfully updated.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/label"}}}},"400":{"$ref":"#/components/responses/bad_request_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/forbidden_403"},"404":{"$ref":"#/components/responses/not_found_404"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```

## Deleting a label

> Deletes a label with the specified label ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"responses":{"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"forbidden_403":{"description":"Access forbidden. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"not_found_404":{"description":"Requested resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object","properties":{"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels/{labelId}":{"delete":{"tags":["Label"],"summary":"Deleting a label","description":"Deletes a label with the specified label ID.\n","operationId":"DELETE-label-remove-label","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":false},"responses":{"204":{"description":"The label was successfully deleted."},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/forbidden_403"},"404":{"$ref":"#/components/responses/not_found_404"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```

## Partially updating a label

> Partially updates a label with the specified label ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Label Service","version":"0.0.1"},"tags":[{"name":"Label"}],"servers":[{"url":"https://api.emporix.io/label"}],"security":[{"OAuth2":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"label.label_manage":"Needed to manage labels and label medias.","label.label_read":"Needed to read labels."}}}}},"schemas":{"labelUpdate":{"properties":{"name":{"type":"string","description":"Name of the label."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."}},"required":["name","description"]},"overlay":{"description":"If present and `isTrue` is actually true the label should be printed on associated products on the described position.","properties":{"isTrue":{"type":"boolean"},"position":{"type":"number"}},"required":["position"]},"label":{"properties":{"id":{"type":"string","description":"Unique ID of the label."},"name":{"type":"string","description":"Name of the label."},"mediaId":{"type":"string","description":"Id of the media."},"image":{"type":"string","description":"Image URL."},"cloudinaryUrl":{"type":"string","description":"Cludinary path."},"overlay":{"$ref":"#/components/schemas/overlay"},"description":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"type":"string"}}],"description":"Localized resource description in a form of a map of translations."},"metadata":{"$ref":"#/components/schemas/metadata"}}},"metadata":{"title":"Metadata","description":"Metadata","type":"object","properties":{"createdAt":{"description":"The creation date.","type":"string"},"modifiedAt":{"description":"The modification date.","type":"string"},"version":{"description":"The document version number.","type":"integer"}}}},"responses":{"unauthorized_401":{"description":"Unauthorized. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"forbidden_403":{"description":"Access forbidden. The caller is not allowed to access this resource.","content":{"application/json":{"schema":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"not_found_404":{"description":"Requested resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object","properties":{"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}},"internal_server_error_500":{"description":"Some server side error occurred.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"},"details":{"type":"object"}}}}}}}},"paths":{"/labels/{labelId}":{"patch":{"tags":["Label"],"summary":"Partially updating a label","description":"Partially updates a label with the specified label ID.\n","operationId":"PATCH-label-update-label","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/labelUpdate"}}}},"responses":{"200":{"description":"The label was successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/label"}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/forbidden_403"},"404":{"$ref":"#/components/responses/not_found_404"},"500":{"$ref":"#/components/responses/internal_server_error_500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/products-labels-and-brands/label-service/api-reference/label.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
