Skip to Content
API ReferenceDeclaration Submit API

Declaration Submit API

The Declaration Submit API lets you create import and export declarations with full customs data and optionally submit them directly to Dutch Customs (DMS 4.0 and 4.1).

Required Scopes: declarations:write to create declarations, declarations:submit to auto-submit to customs.


Endpoints

MethodEndpointDescription
POST/api/v1/declarations/createCreate (and optionally submit) an import or export declaration
POST/api/v1/declarations/create/validateValidate a declaration without saving

Set declaration.imex to "IM" for import or "EX" for export.


Customer Master Lookup

For any party block (importer, exporter, buyer, seller, consignor, consignee), you can provide only a customer_code instead of repeating the full name, address, and EORI. Borderbolt will look up the party details from the Customer Master automatically.

"importer": { "customer_code": "ACME-NL" }

Any fields you provide explicitly always take precedence over the Customer Master values. If the customer_code is not found, a warning is logged and the inline fields are used as-is.


Submit Import Declaration

POST /api/v1/declarations/submit

Full Request Example — Import 40 00

{ "reference": "IMP-2026-00124", "application_reference": "APP-IMP-00124", "submit_when_valid": false, "representation_type": "2", "applyChainProcedure": false, "daysDelayBeforeSubmit": 0, "declaration": { "office": "NL000012", "language": "NL", "symbol": "A", "imex": "IM", "procedure": { "current": "40", "previous": "00", "special": null }, "importer": { "customer_code": "ACME-NL", "eori": "NL123456789B01", "name": "Acme Netherlands B.V.", "address": { "street": "Havenstraat 42", "city": "Rotterdam", "postal_code": "3011 AA", "country": "NL" } }, "exporter": { "eori": "CN987654321", "name": "Shenzhen Goods Co. Ltd.", "address": { "street": "Industrial Zone 8, Longhua", "city": "Shenzhen", "postal_code": "518000", "country": "CN" } }, "buyer": { "customer_code": "ACME-NL", "eori": "NL123456789B01", "name": "Acme Netherlands B.V.", "address": { "street": "Havenstraat 42", "city": "Rotterdam", "postal_code": "3011 AA", "country": "NL" } }, "seller": { "eori": "CN987654321", "name": "Shenzhen Goods Co. Ltd.", "address": { "street": "Industrial Zone 8, Longhua", "city": "Shenzhen", "postal_code": "518000", "country": "CN" } }, "transport": { "border": { "mode": "1", "nationality": "NL", "identification": "MSCZOE123456", "identification_type": "41" }, "containers": [ { "number": "MSCU1234567", "seals": ["SEAL001", "SEAL002"] } ] }, "goods_location": { "type": "A", "identification_type": "U", "country": "NL", "postal_code": "3011 AA", "city": "Rotterdam", "address": null, "house_number": null }, "incoterms": { "code": "CIF", "country": "NL", "location": "Rotterdam" }, "transaction_nature": 11, "total_packages": 36, "total_invoice_value": 18500.00, "total_invoice_currency": "USD", "warehouse": { "licence": null, "licence_type": null }, "authorizations": [ { "type_code": "CGU", "id": "NL-CGU-2026-00042" }, { "type_code": "C506", "id": "NLDPONL000568-2024-D-UZH140607" } ], "domestic_duty_tax_party": { "id": null, "role": null }, "items": [ { "sequence": 1, "description": "Electronic control units, programmable", "sku": "ECU-PRG-001", "hs_code": "85371099", "taric": "00", "additional_taric1": "4099", "additional_taric2": null, "country_of_origin": "CN", "preferential_country_of_origin": null, "gross_weight": 320.50, "net_weight": 295.00, "supplementary_quantity": 150, "invoice_value": 12000.00, "invoice_currency": "USD", "statistical_value": 13200.00, "previous_code": "00", "duty_regime": "100", "valuation": { "method": "1", "charge_deductions": [ { "code": "AK", "currency": "USD", "amount": 1.84 }, { "code": "AH", "currency": "USD", "amount": 3.91 } ] }, "packaging": [ { "type": "CT", "quantity": 12, "marks": "ACME/2026/001-012" } ], "containers": [ { "number": "MSCU1234567" } ], "supporting_documents": [ { "type": "N271", "id": "INV-2026-SZ-0042", "line": 1, "expiry_date": null, "value": 12000.00, "currency": "USD", "quantity": null, "uom": null }, { "type": "N705", "id": "BL-MSCROT2026001", "line": null, "expiry_date": null, "value": null, "currency": null, "quantity": null, "uom": null }, { "type": "C644", "id": "CERT-CONF-2026-001", "line": 1, "expiry_date": "2026-12-31", "value": null, "currency": null, "quantity": 150, "uom": "NAR" } ], "additional_references": [ { "type": "Y900", "value": "LIC-NL-2026-0042" }, { "type": "GRN", "value": "26NL0000000000001A1" } ], "previous_documents": [ { "type": "355", "id": "MRN2500001NL000012", "line": 1 } ], "sku_details": [ { "sku": "ECU-PRG-001-A", "description": "ECU variant A", "quantity": 100, "unit_value": 75.00, "unit_value_currency": "USD", "unit_gross_weight": 2.10, "unit_net_weight": 1.95, "country_of_origin": "CN" }, { "sku": "ECU-PRG-001-B", "description": "ECU variant B", "quantity": 50, "unit_value": 90.00, "unit_value_currency": "USD", "unit_gross_weight": 2.20, "unit_net_weight": 2.00, "country_of_origin": "CN" } ] }, { "sequence": 2, "description": "Cable harnesses for automotive use", "sku": "CBL-AUTO-022", "hs_code": "85443010", "taric": "00", "additional_taric1": null, "additional_taric2": null, "country_of_origin": "CN", "preferential_country_of_origin": null, "gross_weight": 180.00, "net_weight": 168.00, "supplementary_quantity": null, "invoice_value": 6500.00, "invoice_currency": "USD", "statistical_value": 7150.00, "previous_code": "00", "duty_regime": "100", "valuation": { "method": "1" }, "packaging": [ { "type": "BX", "quantity": 24, "marks": "ACME/2026/013-036" } ], "containers": [ { "number": "MSCU1234567" } ], "supporting_documents": [ { "type": "N271", "id": "INV-2026-SZ-0042", "line": 2, "expiry_date": null, "value": 6500.00, "currency": "USD", "quantity": null, "uom": null }, { "type": "N705", "id": "BL-MSCROT2026001", "line": null, "expiry_date": null, "value": null, "currency": null, "quantity": null, "uom": null } ], "additional_references": [ { "type": "Y900", "value": "LIC-NL-2026-0043" } ], "previous_documents": [ { "type": "355", "id": "MRN2500001NL000012", "line": 2 } ], "sku_details": [] } ] } }

Submit Export Declaration

POST /api/v1/declarations/submit

Full Request Example — Export 10 00

{ "reference": "EXP-2026-00456", "application_reference": "APP-EXP-00456", "submit_when_valid": false, "representation_type": "2", "declaration": { "office": "NL000510", "exit_office": "NL000834", "language": "NL", "symbol": "A", "imex": "EX", "procedure": { "current": "10", "previous": "00", "special": null }, "consignor": { "customer_code": "ACME-NL", "eori": "NL123456789B01", "name": "Acme Netherlands B.V.", "address": { "street": "Havenstraat 42", "city": "Rotterdam", "postal_code": "3011 AA", "country": "NL" } }, "consignee": { "eori": "US123456789", "name": "Acme North America Inc.", "address": { "street": "500 Commerce Drive", "city": "Chicago", "postal_code": "60601", "country": "US" } }, "seller": { "customer_code": "ACME-NL", "eori": "NL123456789B01", "name": "Acme Netherlands B.V.", "address": { "street": "Havenstraat 42", "city": "Rotterdam", "postal_code": "3011 AA", "country": "NL" } }, "buyer": { "eori": "US123456789", "name": "Acme North America Inc.", "address": { "street": "500 Commerce Drive", "city": "Chicago", "postal_code": "60601", "country": "US" } }, "transport": { "border": { "mode": "1", "nationality": "PA", "identification": "EVERGREEN999", "identification_type": "41" }, "departure": { "mode": "3", "nationality": "NL", "identification": "AB-12-CD", "identification_type": "11" }, "containers": [ { "number": "EVGU8765432", "seals": ["SEAL100"] } ] }, "goods_location": { "type": "A", "identification_type": "U", "country": "NL", "postal_code": "3011 AA", "city": "Rotterdam", "address": null, "house_number": null }, "incoterms": { "code": "FOB", "country": "NL", "location": "Rotterdam" }, "destination_country": "US", "export_country": "NL", "transaction_nature": 11, "total_packages": 18, "total_invoice_value": 22400.00, "total_invoice_currency": "EUR", "warehouse": { "licence": null, "licence_type": null }, "authorizations": [ { "type_code": "CWP", "id": "NL-CWP-2026-00099" } ], "domestic_duty_tax_party": { "id": null, "role": null }, "items": [ { "sequence": 1, "description": "Industrial hydraulic pumps, max 350 bar", "sku": "HYD-PUMP-350", "hs_code": "84135020", "taric": "00", "additional_taric1": null, "additional_taric2": null, "country_of_origin": "NL", "preferential_country_of_origin": null, "gross_weight": 840.00, "net_weight": 790.00, "supplementary_quantity": 12, "invoice_value": 14400.00, "invoice_currency": "EUR", "statistical_value": 14400.00, "previous_code": "00", "duty_regime": "100", "valuation": { "method": "1" }, "packaging": [ { "type": "CR", "quantity": 12, "marks": "PUMP/EXP/2026/001-012" } ], "containers": [ { "number": "EVGU8765432" } ], "supporting_documents": [ { "type": "N380", "id": "INV-2026-EXP-0099", "line": 1, "expiry_date": null, "value": 14400.00, "currency": "EUR", "quantity": null, "uom": null }, { "type": "N703", "id": "PL-2026-EXP-0099", "line": null, "expiry_date": null, "value": null, "currency": null, "quantity": 12, "uom": "NAR" }, { "type": "N935", "id": "EXA-2026-NL-00099", "line": 1, "expiry_date": "2027-06-30", "value": 14400.00, "currency": "EUR", "quantity": 12, "uom": "NAR" } ], "additional_references": [ { "type": "Y023", "value": "NL-DGA-2026-AUTH-001" } ], "previous_documents": [], "sku_details": [ { "sku": "HYD-PUMP-350-STD", "description": "Hydraulic pump 350 bar standard", "quantity": 12, "unit_value": 1200.00, "unit_value_currency": "EUR", "unit_gross_weight": 70.00, "unit_net_weight": 65.83, "country_of_origin": "NL" } ] }, { "sequence": 2, "description": "Spare parts kit for hydraulic pumps", "sku": "HYD-PARTS-KIT", "hs_code": "84139100", "taric": "00", "additional_taric1": null, "additional_taric2": null, "country_of_origin": "NL", "preferential_country_of_origin": null, "gross_weight": 120.00, "net_weight": 112.00, "supplementary_quantity": null, "invoice_value": 8000.00, "invoice_currency": "EUR", "statistical_value": 8000.00, "previous_code": "00", "duty_regime": "100", "valuation": { "method": "1" }, "packaging": [ { "type": "BX", "quantity": 6, "marks": "PARTS/EXP/2026/001-006" } ], "containers": [ { "number": "EVGU8765432" } ], "supporting_documents": [ { "type": "N380", "id": "INV-2026-EXP-0099", "line": 2, "expiry_date": null, "value": 8000.00, "currency": "EUR", "quantity": null, "uom": null } ], "additional_references": [], "previous_documents": [], "sku_details": [] } ] } }

Field Reference

Top-Level Fields

FieldRequiredTypeMaxDescription
dms_versionYesstringDMS version: 4.0 or 4.1.
referenceNostring255Your internal reference. Auto-generated if omitted.
application_referenceNostring50Application-level tracking reference.
submit_when_validNobooleanIf true, automatically submits to customs when validation passes. Default: false.
representation_typeNostring2 = Direct representation, 3 = Indirect representation. Default: 2.

declaration — Header Fields

FieldRequiredTypeAllowed values / MaxDescription
officeYesstring20Customs office of lodgement (e.g. NL000012).
exit_officeNostring20Office of exit. Export only.
languageNostringNL EN DE PLDeclaration language.
imexNostringIM EXDirection: IM for import (default), EX for export.
symbolNostringA B C D E F ZDeclaration variant — see Declaration Variants. Defaults to A.
procedure.currentYesstring2Current procedure code (e.g. 40, 10).
procedure.previousYesstring2Previous procedure code (e.g. 00, 71).
procedure.specialNostring3Special procedure code (e.g. F01).
transaction_natureNointegerNature of transaction code (e.g. 11 = outright purchase/sale).
total_packagesNointegerTotal number of packages in the shipment.
total_invoice_valueNonumberTotal invoice value. Overrides the sum of line values.
total_invoice_currencyNostring3ISO 4217 currency code (e.g. EUR, USD).
destination_countryNostring2ISO country code of final destination. Export only.
export_countryNostring2ISO country code goods are dispatched from. Export only.

Declaration Variants

symbolVariantDescription
AStandardSingle-step: submit → accepted → released.
BIncomplete — incidentalSubmit incomplete → accepted → send supplementary within 1 month.
CIncomplete — regular (authorised)As B, under standing authorisation.
DAdvance (pre-lodged)Submit before goods arrive → send advance notification on arrival.
EIncomplete advance — incidentalAdvance notification required before supplementary can be sent.
FIncomplete advance — regular (authorised)As E, under standing authorisation.
ZIIAA (Entry in Declarant’s Records)DMS 4.1 only. Entry registered in declarant’s own records.

Variants B through F require follow-up calls after initial submission. See the Declaration Lifecycle API.


Party Blocks

Each party block supports a customer_code shorthand. When provided, Borderbolt looks up the party details from the Customer Master. Explicit fields always override Customer Master values.

Import uses importer, exporter, buyer, seller. Export uses consignor, consignee, buyer, seller.

FieldRequiredTypeMaxDescription
customer_codeNostring100Customer Master code. Hydrates name, address, and EORI automatically.
eoriNostring20EORI number (e.g. NL123456789B01).
nameNo*string255Party name. *Required if customer_code is not provided.
address.streetNostring255Street address.
address.cityNostring100City.
address.postal_codeNostring20Postal/ZIP code.
address.countryNostring2ISO country code.

Import party roles:

BlockCustoms roleCommercial role
importerCustoms declarant / importer of record
exporterForeign supplier
buyerCommercial buyer (Box 8)
sellerCommercial seller (Box 2)

Export party roles:

BlockCustoms roleCommercial role
consignorExporter of record (must have EORI)
consigneeForeign receiver
sellerCommercial seller (Box 2)
buyerCommercial buyer (Box 8)

buyer and seller are the commercial transaction parties (SAD boxes 2 and 8). They are separate from the customs importer/consignor and exporter/consignee. If the commercial and customs parties are the same entity, you can use customer_code on both blocks to avoid duplication.


transport

The border block describes the active means of transport at the EU external border — the sea vessel, aircraft, or train. Used for both import and export.

The departure block describes the inland means of transport:

  • Import: the truck or vehicle that collects the goods from the port/airport and delivers them inland (“Vervoermiddel bij aankomst”).
  • Export: the truck or vehicle that moves the goods from the premises to the port or airport of exit.
FieldRequiredTypeMaxDescription
transport.border.modeNostring2Transport mode at the EU border: 1=Sea, 2=Rail, 3=Road, 4=Air, 7=Pipeline, 9=Own propulsion.
transport.border.nationalityNostring2ISO country code of the flag/registration of the means of transport at the border.
transport.border.identificationNostring35Vessel name, flight number, vehicle registration, etc.
transport.border.identification_typeNostring210=IMO ship no., 11=Vehicle reg., 20=IATA flight no., 30=Rail car no., 41=Container no., 80=EORI, 99=Unknown.
transport.departure.modeNostring2Inland transport mode. Import: arrival truck at port. Export: departure truck to port. Same values as border mode.
transport.departure.nationalityNostring2Nationality of the inland means of transport.
transport.departure.identificationNostring35Identification of the inland means of transport (e.g. truck licence plate).
transport.departure.identification_typeNostring2Type code for the inland transport identification.
transport.containersNoarrayContainers at header level. If only one container is provided, it is automatically assigned to all lines.
transport.containers[].numberYes*string17Container number (e.g. MSCU1234567). *Required per container entry.
transport.containers[].sealsNoarrayList of seal numbers (strings, max 20 chars each).

goods_location

FieldRequiredTypeMaxDescription
goods_location.typeNostring1Location type: A=Designated location, B=Authorised place, C=Approved place, D=Other.
goods_location.identification_typeNostring1Identification qualifier: U=UN/LOCODE, Y=Authorisation no., Z=Free text.
goods_location.countryNostring2ISO country code.
goods_location.postal_codeNostring20Postal code of the goods location.
goods_location.cityNostring100City of the goods location.
goods_location.addressNostring255Street address of the goods location.
goods_location.house_numberNostring20House/building number.

incoterms

FieldRequiredTypeMaxDescription
incoterms.codeNostring3Incoterms code: EXW, FCA, FAS, FOB, CFR, CIF, CPT, CIP, DAP, DPU, DDP.
incoterms.countryNostring2ISO country code of the delivery point.
incoterms.locationNostring35Named place of delivery (e.g. Rotterdam).

authorizations

Customs authorisations held by the declarant that apply to this declaration (e.g. CGU for comprehensive guarantee, CWP for customs warehouse, C506 for deferred payment, C521 for chain procedure).

FieldRequiredTypeMaxDescription
authorizations[].type_codeYes*string4Authorisation type code (e.g. CGU, CWP, C506, C521). *Required per entry.
authorizations[].idYes*string35Authorisation reference number (decision reference). *Required per entry.
authorizations[].holder_idNostring35EORI of the authorisation holder if different from the declarant.

applyChainProcedure / daysDelayBeforeSubmit

Top-level fields (not inside declaration) that control the Ketenregeling (chain procedure) settings for EIDR declarations.

FieldRequiredTypeDescription
applyChainProcedureNobooleanSet to true to apply the chain procedure (Ketenregeling). Requires a C521 authorisation.
daysDelayBeforeSubmitNointegerNumber of days delay before the supplementary declaration is submitted. Default: 0.

warehouse

FieldRequiredTypeMaxDescription
warehouse.licenceNostring35Customs warehouse licence number. Required for procedures involving warehousing (e.g. 71 00, 78 71).
warehouse.licence_typeNostring1Warehouse type code (e.g. U for public warehouse, R for private).

domestic_duty_tax_party

Import only. Not applicable for export declarations.

The party responsible for payment of import duties when different from the importer — for example, a fiscal representative acting on behalf of a non-EU importer.

FieldRequiredTypeDescription
domestic_duty_tax_party.idNostringEORI or identifier of the duty tax party.
domestic_duty_tax_party.roleNostringRole code (e.g. FR for fiscal representative).

Item Fields

FieldRequiredTypeMaxDescription
sequenceNointegerLine sequence number. Auto-incremented if omitted.
descriptionYesstring500Goods description.
skuNostring100Your internal article/SKU code.
hs_codeYesstring88-digit Harmonized System (GN/CN) code (e.g. 85371099).
taric_subheadingNostring22-digit TARIC subheading appended after the 8-digit HS code (e.g. 00).
additional_taric1Nostring4First additional TARIC code (e.g. 4099).
additional_taric2Nostring4Second additional TARIC code.
country_of_originYes (import)string2ISO country code of origin.
preferential_country_of_originNostring2ISO country code when claiming preferential origin.
gross_weightYesnumberGross weight in kg.
net_weightYesnumberNet weight in kg.
supplementary_quantityNonumberQuantity in supplementary units (required for certain HS codes).
invoice_valueYes (import)numberInvoice value for this line.
invoice_currencyNostring3ISO 4217 currency. Defaults to header currency.
statistical_valueNonumberStatistical (CIF) value at NL border. Defaults to invoice_value.
previous_codeNostring2Previous procedure code at line level (e.g. 00).
duty_regimeNostring3Tax calculation regime code (e.g. 100).
valuation.methodNostring1WTO customs valuation method: 1=Transaction value, 2=Identical goods, 3=Similar goods, 4=Deductive, 5=Computed, 6=Fall-back.
valuation.charge_deductionsNoarrayList of valuation adjustments (additions/deductions to customs value).
valuation.charge_deductions[].codeYes*string2Adjustment type code (e.g. AK=freight, AH=insurance). *Required per entry.
valuation.charge_deductions[].currencyNostring3ISO 4217 currency of the adjustment amount.
valuation.charge_deductions[].amountNonumberAdjustment amount.

Item — packaging

FieldRequiredTypeMaxDescription
typeNostring2Package type code (e.g. CT=Carton, BX=Box, CR=Crate, PL=Pallet). Also accepted: soort.
quantityNointegerNumber of packages. Also accepted: aantal.
marksNostring512Shipping marks and numbers. Also accepted: merk.

Item — containers

Line-level container assignment. If the header has exactly one container, it is automatically assigned to all lines — you can omit this field.

FieldRequiredTypeMaxDescription
containers[].numberYes*string17Container number. *Required per entry.

Item — supporting_documents

Supporting documents (N-codes, C-codes) associated with the declaration line.

FieldRequiredTypeMaxDescription
typeYesstring5Document type code (e.g. N271=Commercial invoice, N705=Bill of lading, N380=Commercial invoice export, N703=Packing list, N935=Export accompanying document, C644=Certificate).
idNostring70Document reference number. Also accepted: reference.
lineNointegerLine number within the referenced document. Also accepted: lineNumber.
expiry_dateNodateDocument expiry date (YYYY-MM-DD). Used for licences and certificates. Also accepted: expiryDate.
valueNonumberWritten-off value amount (amount consumed from a licence or quota).
currencyNostring3ISO 4217 currency for the written-off value.
quantityNonumberWritten-off quantity.
uomNostring5Unit of measure for the written-off quantity (e.g. KGM, NAR, LTR). Also accepted: unit_of_measure.

Item — additional_references

Y-codes and Z-codes referencing licences, guarantees, or other authorisations.

FieldRequiredTypeMaxDescription
typeYesstring4Reference type code (e.g. Y900=Licence, GRN=Guarantee reference).
valueNostring70Reference number or identifier.

Item — previous_documents

Prior customs documents that this declaration draws from (e.g. a preceding T1 transit, customs warehouse entry, or previous MRN).

FieldRequiredTypeMaxDescription
typeYesstring4Document type code (e.g. 355=MRN, 720=T1, 740=T2, 825=Summary declaration, NCLE=Warehouse entry).
idNostring70Reference number of the previous document.
lineNointegerLine number within the previous document.

Item — sku_details (Mode B)

Per-SKU breakdown within a single declaration line. Use this when one customs line covers multiple SKUs that need to be tracked individually.

FieldRequiredTypeMaxDescription
skuYesstring100SKU / article code.
descriptionNostring500SKU description.
quantityYesintegerNumber of units of this SKU.
unit_valueNonumberValue per unit.
unit_value_currencyNostring3ISO 4217 currency. Defaults to EUR.
unit_gross_weightNonumberGross weight per unit in kg.
unit_net_weightNonumberNet weight per unit in kg.
country_of_originNostring2ISO country code of origin for this SKU.

SKU Consolidation (Mode A)

Instead of specifying items manually, you can pass a list of SKU codes from the Item Master. Borderbolt resolves all customs details (HS code, description, origin, weights, values) automatically.

{ "reference": "IMP-2026-00125", "declaration": { "office": "NL000012", "imex": "IM", "procedure": { "current": "40", "previous": "00" }, "importer": { "customer_code": "ACME-NL" }, "skus": [ { "sku": "ECU-PRG-001", "quantity": 150 }, { "sku": "CBL-AUTO-022", "quantity": 48 } ] } }

When skus is provided, the items array is not required.


Response

Created (HTTP 201)

{ "success": true, "declaration": { "id": 12347, "reference": "IMP-2026-00124", "application_reference": "APP-IMP-00124", "status": "DRF", "workflow": "import", "declaration_type": "H1", "mrn": null, "validation": { "valid": true, "errors": [] }, "submitted": false, "created_at": "2026-05-04T09:15:00.000000Z" } }

When submit_when_valid: true and validation passes, status becomes NEW and submitted is true:

{ "success": true, "declaration": { "id": 12347, "reference": "IMP-2026-00124", "status": "NEW", "submitted": true, "submitted_at": "2026-05-04T09:15:01.000000Z", "mrn": null, "validation": { "valid": true, "errors": [] }, "created_at": "2026-05-04T09:15:00.000000Z" } }

The MRN is assigned by Dutch Customs after acceptance and delivered via webhook. See Webhooks.


Validation Errors (HTTP 422)

{ "success": false, "error": { "code": "VALIDATION_FAILED", "message": "Request validation failed" }, "validation": { "valid": false, "errors": [ { "field": "declaration.office", "message": "The declaration.office field is required.", "rule": "REQUEST_VALIDATION" }, { "field": "declaration.items.0.hs_code", "message": "The declaration.items.0.hs_code field is required.", "rule": "REQUEST_VALIDATION" }, { "field": "declaration.items.0.country_of_origin", "message": "The declaration.items.0.country_of_origin must be 2 characters.", "rule": "REQUEST_VALIDATION" } ] } }

Validate Without Saving

Use the validate endpoint to check a payload without creating a declaration or submitting to customs:

POST /api/v1/declarations/validate

Same request body as /declarations/submit. Response:

{ "valid": true, "errors": [] }

Or when invalid:

{ "valid": false, "errors": [ { "field": "declaration.procedure.current", "message": "The declaration.procedure.current field is required.", "rule": "REQUEST_VALIDATION" } ] }

Next Steps

Last updated on