Purchases
Create a DRAFT customs import declaration; customs value, VAT base and VAT are computed server-side. Honours Idempotency-Key. (scope: purchases:write)
POST
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
application/json- body
number?stringLength
length <= 50mrn?stringLength
length <= 21customs_office?stringLength
length <= 120regime*stringValue in
"PAID_AT_CUSTOMS""DEFERRED"nir_document_id?stringGoods receipt whose stock absorbs the customs cost. Required to confirm.
Format
uuidsupplier_id?stringFormat
uuiddeclaration_date*stringFormat
datecurrency?stringDefault EUR.
Length
3 <= length <= 3customs_exchange_rate*stringMatch
^\d{1,6}(\.\d{1,6})?$customs_duty?stringRON, decimal as a string.
Match
^-?\d{1,13}(\.\d{1,2})?$excise?stringRON, decimal as a string.
Match
^-?\d{1,13}(\.\d{1,2})?$customs_commission?stringRON, decimal as a string.
Match
^-?\d{1,13}(\.\d{1,2})?$accessory_costs?stringRON, decimal as a string.
Match
^-?\d{1,13}(\.\d{1,2})?$vat_rate*numberRange
0 <= value <= 100notes?stringLength
length <= 4000lines*array<>Items
1 <= items <= 500OK
application/json- response
data?error?nullcurl -X POST "https://example.com/purchases/import-declarations" \ -H "Content-Type: application/json" \ -d '{ "regime": "PAID_AT_CUSTOMS", "declaration_date": "2019-08-24", "customs_exchange_rate": "string", "vat_rate": 0, "lines": [ { "description": "string", "quantity": "string", "invoice_value_currency": "string" } ] }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "DRAFT", "customs_value": "string", "vat_base": "string", "vat_amount": "string" }, "error": null}Confirm a DRAFT declaration: posts the customs journal entry (Dr 371/607 = Cr 446; VAT Dr 4426 = Cr 446 or 4427), raises the cost of the stock still held, and flips the status — atomically. Runs inline; 202 with the result. 409 not_draft; 422 no_reception / no_period / no_journal / missing_account / period_closed. Requires Idempotency-Key. (scope: purchases:confirm) POST
Previous Page
Get a customs import declaration with its lines and cost allocation (scope: purchases:read) GET
Next Page