auto_send: true to submit it to customs in the same request (CDS declarations only; badge_code is required). Declarations with more than 50 items are queued and submitted in the background; follow them with Retrieve an MRN Status of Declaration.auto_send is sent, the response carries the outcome in api_notes (and, for invalid_for_sending, the blocking validation messages in auto_send_errors):api_notes | Meaning |
|---|---|
| (not present) | Submitted to customs (or auto_send was not requested) |
will_be_submitted | Queued; will be submitted in the background (more than 50 items), or handed over to the badge owner |
queued_for_submission | Submission in progress |
invalid_for_sending | Data required for submission is missing; see auto_send_errors |
submission_failed | Customs rejected the submission; see error_messages |
badge_missing | badge_code was not provided |
service_not_supported | auto_send is supported for CDS declarations only |
already_submitted | Already submitted, has an MRN, or is being submitted by another request |
Authorization: Bearer ********************{
"declaration_data": {
"service_code": "cds",
"doc_type": "export",
"declaration_type": "EXA",
"badge_code": "CDS",
"auto_send": true,
"commercial_ref": "INV-2026-0042",
"ducr": "6GB123456789000-INV20260042",
"declarant_eori": "GB123456789000",
"declarant_name": "ACME CUSTOMS SERVICES LTD",
"declarant_address": "1 DOCK ROAD",
"declarant_city_name": "LONDON",
"declarant_country_id": "GB",
"declarant_postcode": "N1 1AA",
"declarant_rep": "2",
"export_country_id": "GB",
"consignor_eori": "GB987654321000",
"consignor_name": "ACME COMPONENTS LTD",
"consignor_address": "12 FACTORY ROAD",
"consignor_city_name": "ESSEX",
"consignor_country_id": "GB",
"consignor_postcode": "CM19 5FA",
"import_country_id": "TR",
"consignee_name": "ORNEK SANAYI VE TICARET AS",
"consignee_address": "OSB 4. CADDE NO 10",
"consignee_city_name": "BALIKESIR",
"consignee_country_id": "TR",
"consignee_postcode": "10100",
"goods_location": "GBAUDEUDEUDEU",
"border_transport_type": "6",
"arrival_transport_type": "30",
"inland_transport_type": "6",
"border_vehicle_code": "TRUCK",
"border_vehicle_coun": "TR",
"nature_of_transaction": "11",
"gvms_interested": true,
"carrier_eori": "GB555666777000",
"carrier_name": "ACME TRANSPORT (UK) LTD",
"carrier_address": "UNIT A11 BELL LANE",
"carrier_city_name": "BUCKINGHAMSHIRE",
"carrier_country_id": "GB",
"carrier_postcode": "HP6 6FA",
"total_packages": 5,
"total_gross_weight": 685.236,
"total_net_weight": 608.436,
"invoice_amount": 8462.8,
"invoice_curr": "GBP",
"goods_attributes": [
{
"line_no": 1,
"commodity": "Electrical lighting or signalling equipment of a kind used for motor vehicles",
"gtip_code": "8512200000",
"brut_wg": 685.236,
"net_wg": 608.436,
"invoice_amount": 8462.8,
"invoice_curr": "GBP",
"cpc_code": "1040",
"additional_cpc_code": "000",
"sender_name": "ACME COMPONENTS LTD",
"sender_address": "12 FACTORY ROAD",
"sender_city": "ESSEX",
"sender_postcode": "CM19 5FA",
"sender_country_id": "GB",
"sender_eori_code": "GB987654321000",
"consignee_name": "ORNEK SANAYI VE TICARET AS",
"consignee_address": "OSB 4. CADDE NO 10",
"consignee_city": "BALIKESIR",
"consignee_postcode": "10100",
"consignee_country_id": "TR",
"packs_attributes": [
{
"pack_type": "PK",
"pack_count": 5,
"notes": "AS ADDRESSED"
}
],
"documents_attributes": [
{
"doc_type": "380",
"doc_no": "INV-2026-0042",
"pre_post": "Z",
"doc_date": "2026-10-14"
}
]
}
]
}
}curl --location 'https://demo.modaltrans.com/api/v1/customs_declarations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"declaration_data": {
"service_code": "cds",
"doc_type": "export",
"declaration_type": "EXA",
"badge_code": "CDS",
"auto_send": true,
"commercial_ref": "INV-2026-0042",
"ducr": "6GB123456789000-INV20260042",
"declarant_eori": "GB123456789000",
"declarant_name": "ACME CUSTOMS SERVICES LTD",
"declarant_address": "1 DOCK ROAD",
"declarant_city_name": "LONDON",
"declarant_country_id": "GB",
"declarant_postcode": "N1 1AA",
"declarant_rep": "2",
"export_country_id": "GB",
"consignor_eori": "GB987654321000",
"consignor_name": "ACME COMPONENTS LTD",
"consignor_address": "12 FACTORY ROAD",
"consignor_city_name": "ESSEX",
"consignor_country_id": "GB",
"consignor_postcode": "CM19 5FA",
"import_country_id": "TR",
"consignee_name": "ORNEK SANAYI VE TICARET AS",
"consignee_address": "OSB 4. CADDE NO 10",
"consignee_city_name": "BALIKESIR",
"consignee_country_id": "TR",
"consignee_postcode": "10100",
"goods_location": "GBAUDEUDEUDEU",
"border_transport_type": "6",
"arrival_transport_type": "30",
"inland_transport_type": "6",
"border_vehicle_code": "TRUCK",
"border_vehicle_coun": "TR",
"nature_of_transaction": "11",
"gvms_interested": true,
"carrier_eori": "GB555666777000",
"carrier_name": "ACME TRANSPORT (UK) LTD",
"carrier_address": "UNIT A11 BELL LANE",
"carrier_city_name": "BUCKINGHAMSHIRE",
"carrier_country_id": "GB",
"carrier_postcode": "HP6 6FA",
"total_packages": 5,
"total_gross_weight": 685.236,
"total_net_weight": 608.436,
"invoice_amount": 8462.8,
"invoice_curr": "GBP",
"goods_attributes": [
{
"line_no": 1,
"commodity": "Electrical lighting or signalling equipment of a kind used for motor vehicles",
"gtip_code": "8512200000",
"brut_wg": 685.236,
"net_wg": 608.436,
"invoice_amount": 8462.8,
"invoice_curr": "GBP",
"cpc_code": "1040",
"additional_cpc_code": "000",
"sender_name": "ACME COMPONENTS LTD",
"sender_address": "12 FACTORY ROAD",
"sender_city": "ESSEX",
"sender_postcode": "CM19 5FA",
"sender_country_id": "GB",
"sender_eori_code": "GB987654321000",
"consignee_name": "ORNEK SANAYI VE TICARET AS",
"consignee_address": "OSB 4. CADDE NO 10",
"consignee_city": "BALIKESIR",
"consignee_postcode": "10100",
"consignee_country_id": "TR",
"packs_attributes": [
{
"pack_type": "PK",
"pack_count": 5,
"notes": "AS ADDRESSED"
}
],
"documents_attributes": [
{
"doc_type": "380",
"doc_no": "INV-2026-0042",
"pre_post": "Z",
"doc_date": "2026-10-14"
}
]
}
]
}
}'{
"error": "Request body could not be read properly."
}