Docs
Assignment APIAssignment

Update the assignment

Security groups:AssignersDeniers
PATCH
/assignments/{taxonomy}

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.

ActionResult statusRequired parametersNotes
ASSIGNAPPROVED or REJECTEDproductClass, applicationsStatus depends on whether the class covers all supported countries
APPROVEAPPROVEDapplicationsRequires prior ASSIGNED or APPROVED status
REJECTREJECTEDapplications, actionReason
DENYDENIEDapplications, actionReason
RECONFIRMREJECTEDapplications, actionReasonTransitions from DENIED back to REJECTED
UNASSIGNUNASSIGNEDactionReasonRemoves the product class from the assignment

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

taxonomy*string

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.
Value in"TARIC" | "TARES" | "UKGT"

Query Parameters

assignmentAction*string

The action to apply to the assignments.

Value in"ASSIGN" | "UNASSIGN" | "APPROVE" | "REJECT" | "DENY" | "RECONFIRM"
applications?array<>

The eClear services to apply this action to. Accepts multiple values as repeated parameters or as a comma-separated list.

productClass?string

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"
}