Assignment Resources

Manage Assignments

Retrieving a list of categories for which the reference id is assigned

get

Retrieves a list of categories for which the reference id is assigned.


Required scopes

  • category.category_read_unpublished

    Note: Only required if the category has not been published.

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Example: saasdev2
referenceIdstringRequired

Assignment's reference unique identifier, for example: productId.

Example: 44170435
Query parameters
showUnpublishedbooleanOptional

If set to true, resources assigned to not published categories are retrieved as well. Possible values:

  • true
  • false Note: To get unpublished categories you need to have category.category_read_unpublished scope.
Default: falseExample: true
expandSupercategoriesIdsbooleanOptional

If set to true, each entry is enriched with supercategoriesIds field containing supercategories ids. Possible values:

  • true
  • false
Default: falseExample: true
pageNumberinteger · int32 · min: 1Optional

Page number to be retrieved. The number of the first page is 1. Note: If the pageNumber parameter is passed, size of the pages must be specified in the pageSize parameter.

Default: 1
pageSizeinteger · int32 · min: 1Optional

Number of export files to be retrieved per page.

Default: 60
sortstringOptional

List of properties used to sort the results, separated by commas. This list is validated against available fields. Sorting by deprecated field is forbidden. Possible values:

  • {fieldName}:ASC
  • {fieldName}:DESC
  • {fieldName}:ASC,{fieldName2}:DESC
  • {internationalizedFieldName.en}:ASC - contains localized field name and extension. Valid only if Accepted-language header contains this extension and it is supported by configuration of the tenant. If all language are accepted (Accept-language='*') then extension must exist in tenant configuration. No other sorting are allowed for this specific internationalized field.
  • {internationalizedFieldName}:ASC - contains only localized field name. Extension will be deducted based on Accept-language header. If all language are accepted (Accept-language='*') then extension is taken from tenant configuration and is equal to default language. In other case the language with highest priority is taken. No other sorting are allowed for this specific localized field.
Example: {fieldName}:ASC,{fieldName2}:DESC
Header parameters
Accept-LanguagestringOptional

List of properties used to project and sort the results, separated by commas. Possible values:

  • * - each internationalized field is returned as a map containing all available (specified in tenant configuration) translations. This is also the default behaviour if the header is not set.
  • en, en,de - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown. First language is the one with highest priority.
  • fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 - each internationalized field is returned as a map containing translation specified by a header value. If translation is not supported by tenant configuration then exception is thrown.
Default: *Example: `*`, `en`, `en,de,fr`, `en-EN`, `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7`
X-VersionstringRequired

To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$

Example: v2Pattern: ^v[1-9][0-9]?$
X-Total-CountbooleanOptional

The header value indicates if the total count of entities should be returned. Possible values:

  • true
  • false Default value: false
Default: falseExample: true
Responses
200
The request was successful. The categories for given reference id are returned.
application/json
get
GET /category/{tenant}/assignments/references/{referenceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
X-Version: v2
Accept: */*
[
  {
    "id": "text",
    "parentId": "text",
    "localizedName": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "localizedDescription": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "localizedSlug": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "code": "text",
    "ecn": [
      "text"
    ],
    "Validity": {
      "from": "2025-07-12T06:46:15.646Z",
      "to": "2025-07-12T06:46:15.646Z"
    },
    "position": 1,
    "published": true,
    "supercategoriesIds": [
      "text"
    ],
    "mixins": {},
    "Metadata": {
      "createdAt": "2025-07-12T06:46:15.646Z",
      "modifiedAt": "2025-07-12T06:46:15.646Z",
      "version": 1,
      "mixins": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "media": [
      {
        "id": "345-12345",
        "url": "https://emporix.com/platform/saas-ag/media/v2/public/files/12345678",
        "contentType": "image/jpeg",
        "metadata": {
          "createdAt": "2022-12-06T06:54:36.834Z"
        },
        "customAttributes": {
          "id": "345-54353",
          "height": 1234,
          "width": 1024,
          "sizeKB": 5,
          "type": "jpg",
          "name": "ima.jpg"
        }
      }
    ]
  }
]

Deleting all assignments by referenceId

delete

Deletes all assignments for a specified referenceId, e.g. all assignments for a given productId.


Required scopes

  • category.category_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Example: saasdev2
referenceIdstringRequired

Assignment's reference unique identifier, for example: productId.

Example: 1256792345
Header parameters
X-VersionstringRequired

To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$

Example: v2Pattern: ^v[1-9][0-9]?$
Responses
204
Assignments has been successfully deleted
application/json
Responseobject
delete
DELETE /category/{tenant}/assignments/references/{referenceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
X-Version: v2
Accept: */*
{}

Was this helpful?