1. Customs
  • Introduction
  • Getting Started
  • Authentication
  • Error Handling
  • Contact Support
  • Modaltrans API
    • Get Auth Token
      • Get Bearer Token
    • Accounting
      • Invoices
        • Retrieve an Invoice
        • List all Invoices
      • Invoice Items
        • List all Invoice Items
        • Deleted Invoice Items
      • Financials
        • Retrieve Financial Information
    • 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
        • Download an Ens Declaration
    • 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
        • Get All Positions
        • Retrieve a Position
      • 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
        • List Company Credit Limits
      • Quotes
        • Retrieve a Quote
        • List All Quotes
        • Update a Quote
        • Create a Quote
        • Accept a Quote
        • Reject a Quote
    • 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
    • Milestones
      • Retrieve a Milestone
      • List Milestones
      • Create a Milestone
      • Delete a Milestone
      • Update a Milestone
  • Webhooks
    • Webhooks
    • Trackings
      • Tracking Webhooks
      • Sea
        • Sea Tracking Event Created
        • Sea Tracking Event Updated
      • Air
        • Air Tracking Event Created
        • Air Tracking Event Updated
    • Customs
      • Customs Declaration Status Changed
      • NCTS Declaration Status Changed
      • ENS Declaration Status Changed
      • GVMS Declaration Status Changed
  1. Customs

ENS Declaration Status Changed

Developing
Webhook
POST
Sent when the status of one of your ENS declarations changes.

Request

Header Params

Body Params application/json

Example
{
  "webhookId": 12,
  "eventName": "ens_declarations/status_changed",
  "deliveryId": "8b4e1f2a-6c97-4d3e-b5a0-2f9c7e1d4b58",
  "eventKey": "6e2a8d4c-1b7f-5c3e-8a9d-4f0b6c2e7a19",
  "sentAt": "2026-10-09T10:42:17Z",
  "recordType": "ens_declarations",
  "previousStatus": "sent",
  "status": "mrn",
  "data": [
    {
      "id": 700789,
      "reference": "ENS2610000789",
      "doc_type": "ENS",
      "doc_date": "2026-10-09",
      "vehicle_code": "16ABC123",
      "vehicle_coun": "TR",
      "trailer_code": "16DEF456",
      "trailer_coun": "TR",
      "container": null,
      "container_type": null,
      "seal_info": null,
      "departure_custom_code": "TR160100",
      "arrival_custom_code": "FR620001",
      "dispatch_country_id": "TR",
      "load_place": "BURSA",
      "destination_country_id": "GB",
      "unload_place": "BIRMINGHAM",
      "trans_method": "road",
      "roro_operator_code": "DFDS",
      "carrier_name": "EXAMPLE TRANSPORT A.S.",
      "carrier_address": "LIMAN YOLU NO 4",
      "carrier_postcode": "16200",
      "carrier_city": "BURSA",
      "carrier_country_id": "TR",
      "carrier_taxno": "1122334455",
      "carrier_eori_code": "TR1122334455",
      "status": "mrn",
      "ens_status": "mrn",
      "api_notes": null,
      "transit_countries_codes": "FR,GB",
      "ics_type": "ics2",
      "lrn": "ENSLRN26000789",
      "mrn": "26FR62000000078912",
      "mrn_date": "2026-10-09T13:41:05.000+03:00",
      "position_no": "EXP-2026-1190",
      "remote_ref": null,
      "notes": null,
      "ens_reference": "ENS-2026-0789",
      "ens_filing_type": "SINGLE",
      "voyage_reference": null,
      "manifesto_price": "25.0",
      "manifesto_curr": "EUR",
      "aeo_price": 0,
      "entry_fee": 0,
      "invoice_status": "pending",
      "entry_account_id": 689,
      "goods": [
        {
          "line_no": 1,
          "gtip_code": "870829",
          "commodity": "VEHICLE BODY PARTS",
          "brut_wg": 12500.0,
          "net_wg": 11800.0,
          "invoice_amount": "48500.0",
          "invoice_curr": "EUR",
          "exp_customs_type": null,
          "exp_customs_partial": null,
          "exp_customs_no": null,
          "manifesto_type": null,
          "dep_country_id": null,
          "arv_country_id": null,
          "container_no": null,
          "container_type": null,
          "sender_taxno": "1234567890",
          "sender_name": "EXAMPLE AUTO PARTS A.S.",
          "sender_address": "ORGANIZE SANAYI BOLGESI 5. CADDE NO 12",
          "sender_postcode": "16140",
          "sender_city": "BURSA",
          "sender_country_id": "TR",
          "sender_eori_code": "TR1234567890",
          "consignee_taxno": null,
          "consignee_name": "EXAMPLE AUTOMOTIVE UK LTD",
          "consignee_address": "UNIT 4 TRADE PARK",
          "consignee_postcode": "B6 7XX",
          "consignee_city": "BIRMINGHAM",
          "consignee_country_id": "GB",
          "consignee_eori_code": "GB123456789000",
          "packs_attributes": [
            {
              "pack_type": "PX",
              "pack_count": "24",
              "notes": "AS ADDRESSED"
            }
          ],
          "documents_attributes": [

          ],
          "produced_documents_attributes": [
            {
              "code": "N380",
              "reference": "INV-2026-0912",
              "reason": null,
              "quantity": "0.0",
              "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 'https://your-api-server.com' \
--header 'X-Modaltrans-Signature: sha256=d55e674078099a696aebbcb1c4e0094a938fd7902667c8d06de366bcdfcc2741' \
--header 'X-Modaltrans-Delivery: 8b4e1f2a-6c97-4d3e-b5a0-2f9c7e1d4b58' \
--header 'X-Modaltrans-Event: ens_declarations/status_changed' \
--header 'User-Agent: Modaltrans-Webhook/1.0' \
--header 'X-Api-Key: 3f9c1ab24e7d05b6c8fa1d3e9b470a52' \
--header 'Content-Type: application/json' \
--data '{
  "webhookId": 12,
  "eventName": "ens_declarations/status_changed",
  "deliveryId": "8b4e1f2a-6c97-4d3e-b5a0-2f9c7e1d4b58",
  "eventKey": "6e2a8d4c-1b7f-5c3e-8a9d-4f0b6c2e7a19",
  "sentAt": "2026-10-09T10:42:17Z",
  "recordType": "ens_declarations",
  "previousStatus": "sent",
  "status": "mrn",
  "data": [
    {
      "id": 700789,
      "reference": "ENS2610000789",
      "doc_type": "ENS",
      "doc_date": "2026-10-09",
      "vehicle_code": "16ABC123",
      "vehicle_coun": "TR",
      "trailer_code": "16DEF456",
      "trailer_coun": "TR",
      "container": null,
      "container_type": null,
      "seal_info": null,
      "departure_custom_code": "TR160100",
      "arrival_custom_code": "FR620001",
      "dispatch_country_id": "TR",
      "load_place": "BURSA",
      "destination_country_id": "GB",
      "unload_place": "BIRMINGHAM",
      "trans_method": "road",
      "roro_operator_code": "DFDS",
      "carrier_name": "EXAMPLE TRANSPORT A.S.",
      "carrier_address": "LIMAN YOLU NO 4",
      "carrier_postcode": "16200",
      "carrier_city": "BURSA",
      "carrier_country_id": "TR",
      "carrier_taxno": "1122334455",
      "carrier_eori_code": "TR1122334455",
      "status": "mrn",
      "ens_status": "mrn",
      "api_notes": null,
      "transit_countries_codes": "FR,GB",
      "ics_type": "ics2",
      "lrn": "ENSLRN26000789",
      "mrn": "26FR62000000078912",
      "mrn_date": "2026-10-09T13:41:05.000+03:00",
      "position_no": "EXP-2026-1190",
      "remote_ref": null,
      "notes": null,
      "ens_reference": "ENS-2026-0789",
      "ens_filing_type": "SINGLE",
      "voyage_reference": null,
      "manifesto_price": "25.0",
      "manifesto_curr": "EUR",
      "aeo_price": 0,
      "entry_fee": 0,
      "invoice_status": "pending",
      "entry_account_id": 689,
      "goods": [
        {
          "line_no": 1,
          "gtip_code": "870829",
          "commodity": "VEHICLE BODY PARTS",
          "brut_wg": 12500.0,
          "net_wg": 11800.0,
          "invoice_amount": "48500.0",
          "invoice_curr": "EUR",
          "exp_customs_type": null,
          "exp_customs_partial": null,
          "exp_customs_no": null,
          "manifesto_type": null,
          "dep_country_id": null,
          "arv_country_id": null,
          "container_no": null,
          "container_type": null,
          "sender_taxno": "1234567890",
          "sender_name": "EXAMPLE AUTO PARTS A.S.",
          "sender_address": "ORGANIZE SANAYI BOLGESI 5. CADDE NO 12",
          "sender_postcode": "16140",
          "sender_city": "BURSA",
          "sender_country_id": "TR",
          "sender_eori_code": "TR1234567890",
          "consignee_taxno": null,
          "consignee_name": "EXAMPLE AUTOMOTIVE UK LTD",
          "consignee_address": "UNIT 4 TRADE PARK",
          "consignee_postcode": "B6 7XX",
          "consignee_city": "BIRMINGHAM",
          "consignee_country_id": "GB",
          "consignee_eori_code": "GB123456789000",
          "packs_attributes": [
            {
              "pack_type": "PX",
              "pack_count": "24",
              "notes": "AS ADDRESSED"
            }
          ],
          "documents_attributes": [

          ],
          "produced_documents_attributes": [
            {
              "code": "N380",
              "reference": "INV-2026-0912",
              "reason": null,
              "quantity": "0.0",
              "scope": "Supporting Document"
            }
          ]
        }
      ]
    }
  ]
}'

Responses

🟢204Accepted
Return any 2xx once you have stored the body. Process it afterwards. A 5xx, 408 or 429, a timeout after 10 seconds or a connection failure is retried once after 5 minutes. Any other status, including redirects, is not retried.
This response does not have a body.
Modified at 2026-10-09 10:51:10
Previous
NCTS Declaration Status Changed
Next
GVMS Declaration Status Changed
Built with