Category Assignment Resources
Manage Category Assignments
Assigns resources (such as products) to a specified category in bulk. Creates new assignments if they do not exist and updates existing ones.
The maximum batch size is 200.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Multi-status.
ID of generated document.
ID of the product.
Index of the item in the array.
HTTP status' code.
HTTP status.
Error message which is present only when creation of the assignment failed.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist.
PUT /category/{tenant}/categories/{categoryId}/assignments/references/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
[
{
"ref": {
"id": "1639265"
}
},
{
"ref": {
"id": "1639266"
}
}
][
{
"assignmentId": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae",
"productId": "123456",
"index": 0,
"code": 201,
"status": "CREATED"
},
{
"assignmentId": "e333dc9e-a3f6-4573-bb01-a8ae21d2d443",
"productId": "234567",
"index": 1,
"code": 201,
"status": "CREATED"
}
]Assigns resources (such as products) to a specified category.
The maximum batch size is 200.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Multi-status.
ID of generated document.
ID of the product.
Index of the item in the array.
HTTP status' code.
HTTP status.
Error message which is present only when creation of the assignment failed.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
POST /category/{tenant}/categories/{categoryId}/assignments/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 85
[
{
"ref": {
"id": "1639265",
"type": "PRODUCT"
}
},
{
"ref": {
"id": "1639266",
"type": "PRODUCT"
}
}
][
{
"assignmentId": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae",
"productId": "123456",
"index": 0,
"code": 201,
"status": "CREATED"
},
{
"assignmentId": "e333dc9e-a3f6-4573-bb01-a8ae21d2d443",
"productId": "234567",
"index": 1,
"code": 201,
"status": "CREATED"
}
]Retrieves resources (such as products) assigned to a specified category. The localizedName field contains the resource (product) name. This information is attached to the assignment asynchronously and is visible in the response when retrieved.
Additional scope info
category.category_read_unpublished- Only required if the category has not been published.
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Resource type assigned to the category. Possible values:
PRODUCT
PRODUCTPossible values: Localized name of the item assigned to the category.
TwixIdentifier of the item assigned to the category.
5c3348bda9812100098ffaa3If set to true, resources assigned to not published categories are retrieved as well.
Possible values:
truefalse
Note: To get unpublished categories you need to have category.category_read_unpublished scope.
falseExample: trueIf set to true, resources assigned to subcategories are retrieved as well.
Possible values:
truefalse
falseExample: trueList of segment IDs used to filter assignments — only category assignments will be returned, where the category is assigned to the provided list of segments.
segmentId1,segmentId2Page 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.
1Number of export files to be retrieved per page.
60List 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.
{fieldName}:ASC,{fieldName2}:DESCIf set to true only assignments with published products will be returned. The default value is false
falseList 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.
*Example: `*`, `en`, `en,de,fr`, `en-EN`, `fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7`The header value indicates if the total count of entities should be returned. Possible values:
truefalseDefault value:false
falseExample: trueThe request was successful. The category assignments are returned.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
GET /category/{tenant}/categories/{categoryId}/assignments HTTP/1.1
Host: api.emporix.io
Accept: */*
[
{
"id": "d7d1745d-6b46-40a7-87d8-ecb60b8260f6",
"categoryId": "d7d1745d-6b46-40a7-87d8-ecb60b8260f5",
"ref": {
"id": "521266ca-a411-4550-a7ab-aeeb4ce74133",
"type": "PRODUCT",
"localizedName": {
"en": "product name"
}
}
}
]Assigns a resource to a specified category.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94The resource has been successfully assigned to the category.
ID of generated document.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
POST /category/{tenant}/categories/{categoryId}/assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"ref": {
"id": "1639265",
"type": "PRODUCT"
}
}{
"id": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}Deletes all assignments for a specified category.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Resource type assigned to the category. Possible values:
PRODUCT
PRODUCTPossible values: Assignments has been successfully deleted
No content
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
DELETE /category/{tenant}/categories/{categoryId}/assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Deletes an assignment from a specified category.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Assignment unique identifier
1256792345Assignment has been successfully deleted.
No content
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
DELETE /category/{tenant}/categories/{categoryId}/assignments/{assignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Creates or updates an assignment of a resource to a specified category. If any assignment with given categoryId and referenceId does not exist then a new assignment is created.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Assignment reference unique identifier, for example: productId.
084bcaf6-66b8-4ddd-9489-65c5f6449e94The resource has been successfully assigned to the category.
ID of generated document.
The resource assignment to the category has been updated.
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
PUT /category/{tenant}/categories/{categoryId}/assignments/references/{referenceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "e243dc9e-a3f6-4573-bb01-a8ae21d2d4ae"
}Deletes an assignment from a specified category.
- : Manage a category
Your Emporix tenant name.
Note: The tenant should always be written in lowercase.
saasdev2Category unique identifier generated when the category is created.
084bcaf6-66b8-4ddd-9489-65c5f6449e94Assignment reference unique identifier, for example: productId.
1256792345Assignment has been successfully deleted.
No content
Request was syntactically incorrect. Details will be provided in the response payload
Permission denied due to insufficient rights. This may happen when request does not contain sufficient scopes for given query values.
Category with the specified categoryId does not exist
DELETE /category/{tenant}/categories/{categoryId}/assignments/references/{referenceId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?

