1. Ens Declarations
  • Introduction
  • Getting Started
  • Authentication
  • Error Handling
  • Contact Support
  • Modaltrans API
    • Get Auth Token
      • Get Bearer Token
    • Accounting
      • Invoices
        • Retrieve an Invoice
        • List all Invoices
    • Customs
      • NCTS Declarations
        • List all NCTS Declarations
        • Retrieve an NCTS Declaration
        • Create an NCTS Declaration with XML Data
        • Update an NCTS Declaration
        • Download an NCTS Declaration
        • List Timelines of NCTS Declaration
        • List Messages of NCTS Decalaration
      • Customs Declarations
        • List all Customs Declarations
        • Retrieve a Custom Declaration
        • Create a Customs Declaration
        • Update a Custom Declaration
        • Delete a Custom Declaration
        • Retrieve a Declaration History
        • Retrieve an MRN Status of Declaration
      • Declaration Requests
        • List all Declaration Orders
        • Retrieve a Declaration Request
        • Create a Declaration Request
        • Update a Declaration Request
        • Delete a Declaration Request
      • Ens Declarations
        • Create an Ens Declaration
          POST
        • Download an Ens Declaration
          GET
    • Logistics
      • Bookings
        • Retrieve a Booking
        • List all Bookings
        • Create a Booking
        • Update a Booking
      • Locations
        • List all Locations
        • Retrieve a Location
      • Positions
        • Update a Transport
      • Tracking
        • Available Shipping Lines
        • Retrieve a Tracking Data
        • Subscribe to Tracking
      • Shipments
        • Retrieve a Shipment
        • List All Shipments
        • Retrieve Financials of Shipment
        • List Contacts of the Shipment
        • Create a Shipment
        • Update a Shipment
    • Depot
      • Orders
        • Retrieve an Order
        • List all Orders
        • Create an Order
        • Update an Order
      • Products
        • Retrieve a Product
        • List all Products
        • Create a Product
        • Update a Product
        • List Product Stocks
      • Inventories
        • List all Inventories
    • Fleet Management
      • Drivers
        • Retrieve a Driver
        • Retrieve a Driver's Vehicle
        • List Driver Positions
        • Update a Driver
      • Vehicles
        • Retrieve a Vehicle
        • Update a Vehicle
      • Gps Service Controller
        • Create Gps Responses
      • Service Logs
        • List all Service Logs
        • Retrieve a Service Log
        • Create a Service Log
        • Delete a Service Log
        • Update a Service Log
      • Periodic Documents
        • Retrieve a Periodic Document
        • Update a Periodic Document
        • Create a Periodic Document
    • CRM
      • Companies
        • List all Companies
        • Retrieve a Company
        • Create a Company
        • Update a Company
        • Delete a Company
    • Timelines
      • Retrieve a Timeline
      • List Timelines
      • Create a Timeline
    • S3 Files
      • List all S3Files
      • Create an S3File
      • Delete an S3File
    • Notifications
      • List all Notifications
      • Update a Notification Status
    • User Details
      • List User Details
      • Update User Details
  1. Ens Declarations

Create an Ens Declaration

Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/ens_declarations
Creates an ens declaration.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "ens_declaration": {
        "doc_type": "ENS",
        "doc_date": "2025-04-21",
        "vehicle_code": "269AC04",
        "vehicle_coun": "KZ",
        "trailer_code": "220AAG04",
        "trailer_coun": "KZ",
        "container": "",
        "seal_info": "",
        "transit_date": null,
        "departure_custom_code": "LV000731",
        "dispatch_country_id": "CN",
        "load_place": "CN",
        "goods_location": "",
        "arrival_custom_code": "BE532000",
        "destination_country_id": "BE",
        "unload_place": "BE",
        "transit_countries_codes": "LV,LT,PL,DE,BE",
        "carrier_name": "TOO \"MR-Logistic Group\"",
        "carrier_address": "avenue A. Moldagulova,house 56 D, build.1, n.p. 6 BIN 130940016232",
        "carrier_postcode": "030000",
        "carrier_city": "AKTOBE",
        "carrier_country_id": "KZ",
        "carrier_taxno": "",
        "carrier_eori_code": "LTKZ0000000009193",
        "trans_method": "road",
        "roro_operator_code": "",
        "ics_type": "ics1",
        "notes": null,
        "goods_attributes": [
            {
                "line_no": "1",
                "gtip_code": "961000",
                "commodity": "clipboard",
                "brut_wg": 10.75,
                "net_wg": 10.56,
                "sender_name": "BAI SUI JIA E-COMMERCE CO LTD",
                "sender_country_id": "CN",
                "sender_city": "SHANGHAI",
                "sender_address": "NO 1058 GUMEI ROAD,MINHANG",
                "sender_postcode": "null",
                "consignee_name": "0001_Kreshnik hamiti",
                "consignee_postcode": "50126",
                "consignee_country_id": "IT",
                "consignee_city": "Firenze",
                "consignee_address": "via giampaolo Orsini 81r",
                "packs_attributes": [
                    {
                        "pack_count": "3",
                        "pack_type": "PK"
                    }
                ],
                "produced_documents_attributes": [
                    {
                        "code": "N730",
                        "reference": "AZCFD250405",
                        "scope": "Transport Document"
                    },
                    {
                        "code": "N380",
                        "reference": "AZCFD250405",
                        "scope": "Supporting Document"
                    }
                ]
            },
            {
                "line_no": "2",
                "gtip_code": "940519",
                "commodity": "lamp",
                "brut_wg": 12.61,
                "net_wg": 12.47,
                "sender_name": "BAI SUI JIA E-COMMERCE CO LTD",
                "sender_country_id": "CN",
                "sender_city": "SHANGHAI",
                "sender_address": "NO 1058 GUMEI ROAD,MINHANG",
                "sender_postcode": "null",
                "consignee_name": "0002_lu yang",
                "consignee_postcode": "31040",
                "consignee_country_id": "IT",
                "consignee_city": "trevignano(TV)",
                "consignee_address": "via palladio 20",
                "packs_attributes": [
                    {
                        "pack_count": "4",
                        "pack_type": "PK"
                    }
                ],
                "produced_documents_attributes": [
                    {
                        "code": "N730",
                        "reference": "AZCFD250405",
                        "scope": "Transport Document"
                    },
                    {
                        "code": "N380",
                        "reference": "AZCFD250405",
                        "scope": "Supporting Document"
                    }
                ]
            }
        ]
    }
}

Request Code 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/ens_declarations' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ens_declaration": {
        "doc_type": "ENS",
        "doc_date": "2025-04-21",
        "vehicle_code": "269AC04",
        "vehicle_coun": "KZ",
        "trailer_code": "220AAG04",
        "trailer_coun": "KZ",
        "container": "",
        "seal_info": "",
        "transit_date": null,
        "departure_custom_code": "LV000731",
        "dispatch_country_id": "CN",
        "load_place": "CN",
        "goods_location": "",
        "arrival_custom_code": "BE532000",
        "destination_country_id": "BE",
        "unload_place": "BE",
        "transit_countries_codes": "LV,LT,PL,DE,BE",
        "carrier_name": "TOO \"MR-Logistic Group\"",
        "carrier_address": "avenue A. Moldagulova,house 56 D, build.1, n.p. 6 BIN 130940016232",
        "carrier_postcode": "030000",
        "carrier_city": "AKTOBE",
        "carrier_country_id": "KZ",
        "carrier_taxno": "",
        "carrier_eori_code": "LTKZ0000000009193",
        "trans_method": "road",
        "roro_operator_code": "",
        "ics_type": "ics1",
        "notes": null,
        "goods_attributes": [
            {
                "line_no": "1",
                "gtip_code": "961000",
                "commodity": "clipboard",
                "brut_wg": 10.75,
                "net_wg": 10.56,
                "sender_name": "BAI SUI JIA E-COMMERCE CO LTD",
                "sender_country_id": "CN",
                "sender_city": "SHANGHAI",
                "sender_address": "NO 1058 GUMEI ROAD,MINHANG",
                "sender_postcode": "null",
                "consignee_name": "0001_Kreshnik hamiti",
                "consignee_postcode": "50126",
                "consignee_country_id": "IT",
                "consignee_city": "Firenze",
                "consignee_address": "via giampaolo Orsini 81r",
                "packs_attributes": [
                    {
                        "pack_count": "3",
                        "pack_type": "PK"
                    }
                ],
                "produced_documents_attributes": [
                    {
                        "code": "N730",
                        "reference": "AZCFD250405",
                        "scope": "Transport Document"
                    },
                    {
                        "code": "N380",
                        "reference": "AZCFD250405",
                        "scope": "Supporting Document"
                    }
                ]
            },
            {
                "line_no": "2",
                "gtip_code": "940519",
                "commodity": "lamp",
                "brut_wg": 12.61,
                "net_wg": 12.47,
                "sender_name": "BAI SUI JIA E-COMMERCE CO LTD",
                "sender_country_id": "CN",
                "sender_city": "SHANGHAI",
                "sender_address": "NO 1058 GUMEI ROAD,MINHANG",
                "sender_postcode": "null",
                "consignee_name": "0002_lu yang",
                "consignee_postcode": "31040",
                "consignee_country_id": "IT",
                "consignee_city": "trevignano(TV)",
                "consignee_address": "via palladio 20",
                "packs_attributes": [
                    {
                        "pack_count": "4",
                        "pack_type": "PK"
                    }
                ],
                "produced_documents_attributes": [
                    {
                        "code": "N730",
                        "reference": "AZCFD250405",
                        "scope": "Transport Document"
                    },
                    {
                        "code": "N380",
                        "reference": "AZCFD250405",
                        "scope": "Supporting Document"
                    }
                ]
            }
        ]
    }
}'

Responses

🟢200Success
application/json
Body

Example
{"id":305282,"reference":"SUPBT5175","doc_type":"ENS","doc_date":"2025-04-21","vehicle_code":"269AC04","vehicle_coun":"KZ","trailer_code":"220AAG04","trailer_coun":"KZ","container":"","dispatch_country_id":"CN","load_place":"CN","destination_country_id":"BE","unload_place":"BE","trans_method":"road","roro_operator_code":"","status":"draft","transit_countries_codes":"LV,LT,PL,DE,BE","ics_type":"ics1","goods":[{"line_no":1,"gtip_code":"96100000","commodity":"clipboard","brut_wg":10.75,"net_wg":10.56,"dep_country_id":null,"arv_country_id":null,"sender_taxno":null,"sender_name":"BAI SUI JIA E-COMMERCE CO LTD","sender_address":"NO 1058 GUMEI ROAD,MINHANG","sender_postcode":"null","sender_city":"SHANGHAI","sender_country_id":"CN","sender_eori_code":null,"consignee_taxno":null,"consignee_name":"0001_Kreshnik hamiti","consignee_address":"via giampaolo Orsini 81r","consignee_postcode":"50126","consignee_city":"Firenze","consignee_country_id":"IT","consignee_eori_code":null,"packs_attributes":[{"pack_type":"PK","pack_count":"3","notes":"AS ADDRESSED"}],"produced_documents_attributes":[{"code":"N730","reference":"AZCFD250405","reason":null,"quantity":0,"scope":"Transport Document"},{"code":"N380","reference":"AZCFD250405","reason":null,"quantity":0,"scope":"Supporting Document"}]},{"line_no":2,"gtip_code":"940519","commodity":"lamp","brut_wg":12.61,"net_wg":12.47,"dep_country_id":null,"arv_country_id":null,"sender_taxno":null,"sender_name":"BAI SUI JIA E-COMMERCE CO LTD","sender_address":"NO 1058 GUMEI ROAD,MINHANG","sender_postcode":"null","sender_city":"SHANGHAI","sender_country_id":"CN","sender_eori_code":null,"consignee_taxno":null,"consignee_name":"0002_lu yang","consignee_address":"via palladio 20","consignee_postcode":"31040","consignee_city":"trevignano(TV)","consignee_country_id":"IT","consignee_eori_code":null,"packs_attributes":[{"pack_type":"PK","pack_count":"4","notes":"AS ADDRESSED"}],"produced_documents_attributes":[{"code":"N730","reference":"AZCFD250405","reason":null,"quantity":0,"scope":"Transport Document"},{"code":"N380","reference":"AZCFD250405","reason":null,"quantity":0,"scope":"Supporting Document"}]}]}
🟠403Forbidden
🟠404Record Not Found
🟠400Bad Request
Modified at 2025-07-17 11:33:34
Previous
Delete a Declaration Request
Next
Download an Ens Declaration
Built with