Update the assignment
Changes the status of one or more assignments for the specified products in the given taxonomy. Assignments changed through this endpoint are recorded with the MANUAL assignment strategy.
The request body must include the current assignmentVersion for each product. Concurrent updates that would overwrite each other are rejected. If an auto-assignment is in progress when this request is received, it is aborted.
| Action | Result status | Required parameters | Notes |
|---|---|---|---|
ASSIGN | APPROVED or REJECTED | productClass, applications | Status depends on whether the class covers all supported countries |
APPROVE | APPROVED | applications | Requires prior ASSIGNED or APPROVED status |
REJECT | REJECTED | applications, actionReason | |
DENY | DENIED | applications, actionReason | |
RECONFIRM | REJECTED | applications, actionReason | Transitions from DENIED back to REJECTED |
UNASSIGN | UNASSIGNED | actionReason | Removes the product class from the assignment |
Authorization
bearerAuth In: header
Path Parameters
The classification system to use.
TARIC: The Integrated Tariff of the European Union, used for EU customs classification.TARES: The Swiss customs tariff, used for goods imported into Switzerland.UKGT: The UK Global Tariff, used for goods imported into the United Kingdom.
"TARIC" | "TARES" | "UKGT"Query Parameters
The action to apply to the assignments.
"ASSIGN" | "UNASSIGN" | "APPROVE" | "REJECT" | "DENY" | "RECONFIRM"The eClear services to apply this action to. Accepts multiple values as repeated parameters or as a comma-separated list.
The product class code to assign to the products. Required when assignmentAction is ASSIGN.
Request Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/assignments/TARIC?assignmentAction=ASSIGN" \ -H "Content-Type: application/json" \ -d '{ "products": [ { "productId": "product124", "shopIds": [ 220001, 230004 ], "assignmentVersion": { "vatRules": 1, "clearVat": 3 } }, { "productId": "productxyz", "shopIds": [ 250008 ], "assignmentVersion": { "vatRules": 1, "clearCustoms": 2 } } ] }'{
"data": [
{
"productId": "pid-12345",
"subscribedEclearServices": {
"clearVat": {
"assignmentStatus": "ASSIGNED",
"assignmentVersion": 1,
"actionReason": "Initial assignment"
},
"vatRules": {
"assignmentStatus": "ASSIGNED",
"assignmentVersion": 1,
"actionReason": "Initial assignment"
}
}
},
{
"productId": "pid-67890",
"subscribedEclearServices": {
"clearVat": {
"assignmentStatus": "UNASSIGNED",
"assignmentVersion": 2,
"actionReason": "Update for new version"
}
}
}
]
}{
"code": "BadRequest",
"message": "Bad request.",
"status": "BAD_REQUEST"
}{
"code": "NotFound",
"message": "The requested resource could not be found. Either no object exists with the ID provided in the path, or the path is incorrect.",
"status": "NOT_FOUND"
}{
"status": "CONFLICT",
"code": "CONFLICT_ENTITY_MODIFIED",
"message": "Conflict.",
"timestamp": "2024-06-21T12:36:37.900574",
"path": "/path"
}{
"status": "UNPROCESSABLE_ENTITY",
"timestamp": "2024-02-05T18:04:28Z",
"code": "INVALID_DATA_EXCEPTION",
"message": "The request entity cannot be processed.",
"path": "/path"
}