- Introduction
- Getting Started
- Authentication
- Error Handling
- Contact Support
- Modaltrans API
- Get Auth Token
- Accounting
- Customs
- NCTS Declarations
- Customs Declarations
- Declaration Requests
- Logistics
- Depot
- Fleet Management
- CRM
- Timelines
- S3 Files
- Notifications
- User Details
Create an Ens Declaration from JSON
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/ncts_declarations
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Query Params
doc_type
enum<string>
required
Allowed value:
ENS
Body Params application/json
manifesto
object
required
ncts_json_data
object
required
Example
{
"manifesto": {
"ncts_json_data": {
"doc_type": "ENS",
"departure_custom_code": "ES003301",
"arrival_custom_code": "DK004702",
"load_place": "ES",
"unload_place": "DK",
"dispatch_country_id": "ES",
"destination_country_id": "DK",
"trans_method": "air",
"roro_operator_code": "AIR789",
"ens_voyage_no": "VY78901",
"vehicle_code": "SPV4321",
"vehicle_coun": "ES",
"trailer_code": "ES567Z",
"trailer_coun": "ES",
"container": "CNT6789",
"seal_info": "SEAL6789",
"carrier_name": "Sky Logistics S.A.",
"carrier_taxno": "TAX456789",
"carrier_country_id": "ES",
"carrier_city": "Madrid",
"carrier_postcode": "28001",
"carrier_address": "Madrid, Central Hub",
"transit_countries_attributes": [
{
"country_id": "DK"
},
{
"country_id": "FR"
},
{
"country_id": "ES"
}
],
"goods_attributes": [
{
"sender_name": "ABC CHEMICALS LTD.",
"sender_address": "3 Calle de la Paz",
"sender_city": "Madrid",
"sender_postcode": "28010",
"sender_country_id": "ES",
"sender_taxno": "TAX789012",
"consignee_name": "XYZ COMPANY",
"consignee_address": "56 Via Roma",
"consignee_city": "Rome",
"consignee_postcode": "00100",
"consignee_country_id": "DK",
"consignee_taxno": "TAX123987",
"gtip_code": "01022969",
"commodity": "Textiles",
"brut_wg": 3500,
"net_wg": 3400,
"invoice_amount": 50,
"container_no": "CNT1234",
"packs_attributes": [
{
"pack_type": "PK",
"pack_count": 250,
"notes": "Handle with care"
},
{
"pack_type": "BK",
"pack_count": 250,
"notes": "Keep dry"
}
],
"produced_documents_attributes": [
{
"reference": "DOC987654",
"code": "N235",
"quantity": 1,
"reason": "Export for Manufacturing",
"scope": "Supporting Document"
},
{
"reference": "DOC987655",
"code": "N270",
"quantity": 2,
"reason": "Export for Retail",
"scope": "Supporting Document"
},
{
"reference": "DOC987656",
"code": "N842",
"quantity": 3,
"reason": "Export for Trade Show",
"scope": "Supporting Document"
}
]
},
{
"sender_name": "CBA CHEMICALS LTD.",
"sender_address": "10 Av. de la Libertad",
"sender_city": "Barcelona",
"sender_postcode": "08010",
"sender_country_id": "ES",
"consignee_name": "HGB Company LTD.",
"consignee_address": "78 Corso Magenta",
"consignee_city": "Milan",
"consignee_postcode": "20123",
"consignee_country_id": "IT",
"gtip_code": "01022961",
"commodity": "Furniture",
"brut_wg": 5500,
"net_wg": 5300,
"invoice_amount": 75,
"container_no": "CNT2345",
"packs_attributes": [
{
"pack_type": "Box",
"pack_count": 400,
"notes": "Fragile"
},
{
"pack_type": "Box",
"pack_count": 400,
"notes": "Fragile, keep upright"
}
],
"produced_documents_attributes": [
{
"reference": "DOC234567",
"code": "N1234",
"quantity": 1,
"reason": "Import for Resale",
"scope": "Additional Referance"
},
{
"reference": "DOC234568",
"code": "B654",
"quantity": 2,
"reason": "Export for Charity",
"scope": "Additional Referance"
},
{
"reference": "DOC234569",
"code": "C910",
"quantity": 3,
"reason": "Import for Exhibition",
"scope": "Additional Referance"
}
]
}
]
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.modaltrans.com/api/v1/ncts_declarations?doc_type=' \
--header 'Content-Type: application/json' \
--data-raw '{
"manifesto": {
"ncts_json_data": {
"doc_type": "ENS",
"departure_custom_code": "ES003301",
"arrival_custom_code": "DK004702",
"load_place": "ES",
"unload_place": "DK",
"dispatch_country_id": "ES",
"destination_country_id": "DK",
"trans_method": "air",
"roro_operator_code": "AIR789",
"ens_voyage_no": "VY78901",
"vehicle_code": "SPV4321",
"vehicle_coun": "ES",
"trailer_code": "ES567Z",
"trailer_coun": "ES",
"container": "CNT6789",
"seal_info": "SEAL6789",
"carrier_name": "Sky Logistics S.A.",
"carrier_taxno": "TAX456789",
"carrier_country_id": "ES",
"carrier_city": "Madrid",
"carrier_postcode": "28001",
"carrier_address": "Madrid, Central Hub",
"transit_countries_attributes": [
{
"country_id": "DK"
},
{
"country_id": "FR"
},
{
"country_id": "ES"
}
],
"goods_attributes": [
{
"sender_name": "ABC CHEMICALS LTD.",
"sender_address": "3 Calle de la Paz",
"sender_city": "Madrid",
"sender_postcode": "28010",
"sender_country_id": "ES",
"sender_taxno": "TAX789012",
"consignee_name": "XYZ COMPANY",
"consignee_address": "56 Via Roma",
"consignee_city": "Rome",
"consignee_postcode": "00100",
"consignee_country_id": "DK",
"consignee_taxno": "TAX123987",
"gtip_code": "01022969",
"commodity": "Textiles",
"brut_wg": 3500,
"net_wg": 3400,
"invoice_amount": 50,
"container_no": "CNT1234",
"packs_attributes": [
{
"pack_type": "PK",
"pack_count": 250,
"notes": "Handle with care"
},
{
"pack_type": "BK",
"pack_count": 250,
"notes": "Keep dry"
}
],
"produced_documents_attributes": [
{
"reference": "DOC987654",
"code": "N235",
"quantity": 1,
"reason": "Export for Manufacturing",
"scope": "Supporting Document"
},
{
"reference": "DOC987655",
"code": "N270",
"quantity": 2,
"reason": "Export for Retail",
"scope": "Supporting Document"
},
{
"reference": "DOC987656",
"code": "N842",
"quantity": 3,
"reason": "Export for Trade Show",
"scope": "Supporting Document"
}
]
},
{
"sender_name": "CBA CHEMICALS LTD.",
"sender_address": "10 Av. de la Libertad",
"sender_city": "Barcelona",
"sender_postcode": "08010",
"sender_country_id": "ES",
"consignee_name": "HGB Company LTD.",
"consignee_address": "78 Corso Magenta",
"consignee_city": "Milan",
"consignee_postcode": "20123",
"consignee_country_id": "IT",
"gtip_code": "01022961",
"commodity": "Furniture",
"brut_wg": 5500,
"net_wg": 5300,
"invoice_amount": 75,
"container_no": "CNT2345",
"packs_attributes": [
{
"pack_type": "Box",
"pack_count": 400,
"notes": "Fragile"
},
{
"pack_type": "Box",
"pack_count": 400,
"notes": "Fragile, keep upright"
}
],
"produced_documents_attributes": [
{
"reference": "DOC234567",
"code": "N1234",
"quantity": 1,
"reason": "Import for Resale",
"scope": "Additional Referance"
},
{
"reference": "DOC234568",
"code": "B654",
"quantity": 2,
"reason": "Export for Charity",
"scope": "Additional Referance"
},
{
"reference": "DOC234569",
"code": "C910",
"quantity": 3,
"reason": "Import for Exhibition",
"scope": "Additional Referance"
}
]
}
]
}
}
}'
Responses
🟢201Created
application/json
Body
reference
string
required
doc_type
string
required
doc_date
string
required
vehicle_code
string
required
vehicle_coun
string
required
trailer_code
string
required
trailer_coun
string
required
container
string
required
departure_custom_code
string
required
dispatch_country_id
string
required
load_place
string
required
arrival_custom_code
string
required
destination_country_id
string
required
unload_place
string
required
trans_method
string
required
roro_operator_code
string
required
status
string
required
transit_countries_codes
string
required
goods
array [object {30}]
required
line_no
integer
required
gtip_code
string
required
commodity
string
required
brut_wg
integer
required
net_wg
integer
required
invoice_amount
string
required
invoice_curr
null
required
exp_customs_type
null
required
exp_customs_partial
null
required
exp_customs_no
string
required
manifesto_type
null
required
dep_country_id
null
required
arv_country_id
null
required
sender_taxno
string
required
sender_name
string
required
sender_address
string
required
sender_postcode
string
required
sender_city
string
required
sender_country_id
string
required
sender_eori_code
string | null
required
consignee_taxno
string
required
consignee_name
string
required
consignee_address
string
required
consignee_postcode
string
required
consignee_city
string
required
consignee_country_id
string
required
consignee_eori_code
null
required
packs_attributes
array [object {3}]
required
documents_attributes
array[string]
required
produced_documents_attributes
array [object {5}]
required
Example
{
"reference": "SF240047SUPREME",
"doc_type": "ENS",
"doc_date": "2024-12-20",
"vehicle_code": "SPV4321",
"vehicle_coun": "ES",
"trailer_code": "ES567Z",
"trailer_coun": "ES",
"container": "CNT6789",
"departure_custom_code": "ES003301",
"dispatch_country_id": "ES",
"load_place": "ES",
"arrival_custom_code": "DK004702",
"destination_country_id": "DK",
"unload_place": "DK",
"trans_method": "air",
"roro_operator_code": "AIR789",
"status": "pending",
"transit_countries_codes": "DK,FR,ES",
"goods": [
{
"line_no": 1,
"gtip_code": "01022969",
"commodity": "Textiles",
"brut_wg": 3500,
"net_wg": 3400,
"invoice_amount": "50.0",
"invoice_curr": null,
"exp_customs_type": null,
"exp_customs_partial": null,
"exp_customs_no": "",
"manifesto_type": null,
"dep_country_id": null,
"arv_country_id": null,
"sender_taxno": "938472239",
"sender_name": "ABC CHEMICALS LTD.",
"sender_address": "AYDEDE SOK NO 12",
"sender_postcode": "34768",
"sender_city": "İSTANBUL",
"sender_country_id": "TR",
"sender_eori_code": "",
"consignee_taxno": "TAX123987",
"consignee_name": "XYZ COMPANY",
"consignee_address": "56 Via Roma",
"consignee_postcode": "00100",
"consignee_city": "Rome",
"consignee_country_id": "IT",
"consignee_eori_code": null,
"packs_attributes": [
{
"pack_type": "PK",
"pack_count": "250",
"notes": "Handle with care"
},
{
"pack_type": "BK",
"pack_count": "250",
"notes": "Keep dry"
}
],
"documents_attributes": [],
"produced_documents_attributes": [
{
"code": "N235",
"reference": "DOC987654",
"reason": "Export for Manufacturing",
"quantity": 1,
"scope": "Supporting Document"
},
{
"code": "N270",
"reference": "DOC987655",
"reason": "Export for Retail",
"quantity": 2,
"scope": "Supporting Document"
},
{
"code": "N842",
"reference": "DOC987656",
"reason": "Export for Trade Show",
"quantity": 3,
"scope": "Supporting Document"
}
]
},
{
"line_no": 2,
"gtip_code": "01022961",
"commodity": "Furniture",
"brut_wg": 5500,
"net_wg": 5300,
"invoice_amount": "75.0",
"invoice_curr": null,
"exp_customs_type": null,
"exp_customs_partial": null,
"exp_customs_no": "",
"manifesto_type": null,
"dep_country_id": null,
"arv_country_id": null,
"sender_taxno": "",
"sender_name": "CBA CHEMICALS LTD.",
"sender_address": "10 Av. de la Libertad",
"sender_postcode": "08010",
"sender_city": "Barcelona",
"sender_country_id": "ES",
"sender_eori_code": null,
"consignee_taxno": "",
"consignee_name": "HGB COMPANY LTD.",
"consignee_address": "78 Corso Magenta",
"consignee_postcode": "20123",
"consignee_city": "Milan",
"consignee_country_id": "IT",
"consignee_eori_code": null,
"packs_attributes": [
{
"pack_type": "Box",
"pack_count": "400",
"notes": "Fragile"
},
{
"pack_type": "Box",
"pack_count": "400",
"notes": "Fragile, keep upright"
}
],
"documents_attributes": [],
"produced_documents_attributes": [
{
"code": "N1234",
"reference": "DOC234567",
"reason": "Import for Resale",
"quantity": 1,
"scope": "Additional Referance"
},
{
"code": "B654",
"reference": "DOC234568",
"reason": "Export for Charity",
"quantity": 2,
"scope": "Additional Referance"
},
{
"code": "C910",
"reference": "DOC234569",
"reason": "Import for Exhibition",
"quantity": 3,
"scope": "Additional Referance"
}
]
}
]
}
🟠403Forbidden
🟠404Record Not Found
🟠400Bad Request
🟠422Unprocessable Entity
Modified at 2025-03-25 10:48:18