Brivio API reference
Purchases

Create a DRAFT customs import declaration; customs value, VAT base and VAT are computed server-side. Honours Idempotency-Key. (scope: purchases:write)

POST
/purchases/import-declarations

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key as Bearer token

Request Body

application/json
  1. body
number?string
Lengthlength <= 50
mrn?string
Lengthlength <= 21
customs_office?string
Lengthlength <= 120
regime*string
Value in"PAID_AT_CUSTOMS""DEFERRED"
nir_document_id?string

Goods receipt whose stock absorbs the customs cost. Required to confirm.

Formatuuid
supplier_id?string
Formatuuid
declaration_date*string
Formatdate
currency?string

Default EUR.

Length3 <= length <= 3
customs_exchange_rate*string
Match^\d{1,6}(\.\d{1,6})?$
customs_duty?string

RON, decimal as a string.

Match^-?\d{1,13}(\.\d{1,2})?$
excise?string

RON, decimal as a string.

Match^-?\d{1,13}(\.\d{1,2})?$
customs_commission?string

RON, decimal as a string.

Match^-?\d{1,13}(\.\d{1,2})?$
accessory_costs?string

RON, decimal as a string.

Match^-?\d{1,13}(\.\d{1,2})?$
vat_rate*number
Range0 <= value <= 100
notes?string
Lengthlength <= 4000
lines*array<>
Items1 <= items <= 500

Response Body

OK

application/json
  1. response
data?
error?null
curl -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}