Label

Retrieving labels

get

Retrieves all tenant's labels.

Authorizations
Query parameters
justOverlaybooleanOptional

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.

Example: false
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard practises - Query parameter

pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
Accept-LanguagestringOptional

The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred.

X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Responses
200
The request was successful. List of labels is returned.
application/json
get
GET /label/labels HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "66fe65e83132e30001e6be29",
    "name": "Worldwide Shipment",
    "description": "<p>Worldwide Shipment</p>",
    "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
    "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
    "overlay": {
      "position": 0,
      "isTrue": false
    },
    "metadata": {
      "createdAt": "2024-10-03T05:58:08.228Z",
      "modifiedAt": "2024-10-03T05:58:08.228Z",
      "version": 0
    }
  },
  {
    "id": "61ge81e13562e22001h6cf456",
    "name": "Extended Warranty",
    "description": "<p>Warranty with full coverage</p>",
    "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
    "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
    "overlay": {
      "position": 1,
      "isTrue": true
    },
    "metadata": {
      "createdAt": "2024-10-03T09:30:10.548Z",
      "modifiedAt": "2024-10-03T09:30:10.548Z",
      "version": 2
    }
  }
]

Creating a label

post

Creates a new label.

Required scopes

  • label.label_manage

Authorizations
Body
all ofOptional
and
Responses
201
The label was successfully created.
application/json
post
POST /label/labels HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 336

{
  "id": "66fe65e83132e30001e6be29",
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  }
}
{
  "id": "66fe65e83132e30001e6be29",
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  },
  "metadata": {
    "createdAt": "2024-10-03T05:58:08.228Z",
    "modifiedAt": "2024-10-03T05:58:08.228Z",
    "version": 0
  }
}

Retrieving a label

get

Retrieves a label with the specified label ID.

Authorizations
Path parameters
labelIdstringRequired

Unique identifier of the label.

Responses
200
The label was successfully retrieved.
application/json
get
GET /label/labels/{labelId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "66fe65e83132e30001e6be29",
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  },
  "metadata": {
    "createdAt": "2024-10-03T05:58:08.228Z",
    "modifiedAt": "2024-10-03T05:58:08.228Z",
    "version": 0
  }
}

Updating a label

put

Updates a label with the specified label ID.

Required scopes

  • label.label_manage

Authorizations
Path parameters
labelIdstringRequired

Unique identifier of the label.

Body
namestringRequired

Name of the label.

imagestringOptionalDeprecated

Image URL. This field is deprecated. Media assignment should be done through media-service.

cloudinaryUrlstringOptionalDeprecated

Cludinary path. Media assignment should be done through media-service.

descriptionone ofRequired

Localized resource description in a form of a map of translations.

stringOptional
or
Responses
200
The label was successfully updated.
application/json
put
PUT /label/labels/{labelId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 304

{
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  }
}
{
  "id": "66fe65e83132e30001e6be29",
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  },
  "metadata": {
    "createdAt": "2024-10-03T05:58:08.228Z",
    "modifiedAt": "2024-10-03T05:58:08.228Z",
    "version": 0
  }
}

Deleting a label

delete

Deletes a label with the specified label ID.

Required scopes

  • label.label_manage

Authorizations
Path parameters
labelIdstringRequired

Unique identifier of the label.

Responses
204
The label was successfully deleted.
delete
DELETE /label/labels/{labelId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Partailly updating a label

patch

Partially updates a label with the specified label ID.

Required scopes

  • label.label_manage

Authorizations
Path parameters
labelIdstringRequired

Unique identifier of the label.

Body
namestringRequired

Name of the label.

imagestringOptionalDeprecated

Image URL. This field is deprecated. Media assignment should be done through media-service.

cloudinaryUrlstringOptionalDeprecated

Cludinary path. Media assignment should be done through media-service.

descriptionone ofRequired

Localized resource description in a form of a map of translations.

stringOptional
or
Responses
200
The label was successfully updated.
application/json
patch
PATCH /label/labels/{labelId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "name": "Worldwide Shipment"
}
{
  "id": "66fe65e83132e30001e6be29",
  "name": "Worldwide Shipment",
  "description": "<p>Worldwide Shipment</p>",
  "image": "https://res.cloudinary.com/saas-ag/image/upload/v1727903960/tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2.jpg",
  "cloudinaryUrl": "tenant/labels/54fd0a26-fa47-45b7-ae22-8e54e0bb98d2",
  "overlay": {
    "position": 0,
    "isTrue": true
  },
  "metadata": {
    "createdAt": "2024-10-03T05:58:08.228Z",
    "modifiedAt": "2024-10-03T05:58:08.228Z",
    "version": 0
  }
}

Was this helpful?