Apply Customs Duty Category to Bill Lines
POST/api/v2/cost-categories/duty-line-candidates/apply
Put reviewed bill lines in your customs duty category. Each bill is updated the same way as editing its lines, so its allocations, inventory cost and accounting postings follow the normal edit rules.
settings:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Requires the accounting.manage_settings permission (PAT scopes settings:write and purchase-orders:write).
Body
| Field | Type | Rules |
|---|---|---|
| bill_line_ids | integer[] | required, 1–1000 distinct ids |
Ids that are no longer candidates (already categorised, or not duty-like) are ignored. Lines on bills dated in a locked period are never changed and are returned in skipped_locked. A bill whose update is refused (for example because it would change inventory cost inside a locked period) is listed in errors and the others still apply.
Returns 422 on customs_duty_cost_category_id when no active customs duty category is designated.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.