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

Customs Declaration Status Changed

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

Request

Header Params

Body Params application/json

Example
{
  "webhookId": 12,
  "eventName": "customs_declarations/status_changed",
  "deliveryId": "3b8f2c1e-7d45-4a9b-9e62-0f1d8c7a5b24",
  "eventKey": "9c1d4e7a-2b3f-5a8c-b6d0-4e2f7a9c1b35",
  "sentAt": "2026-10-09T10:42:17Z",
  "recordType": "customs_declarations",
  "previousStatus": "accepted",
  "status": "cleared",
  "data": [
    {
      "transaction_id": "900123",
      "reference": "GB2610000123",
      "doc_date": "2026-10-08",
      "status": "cleared",
      "lrn": null,
      "mrn": "26GB4F7K2M9P1Q3R58",
      "csp_code": null,
      "service_code": "cds",
      "doc_type": "import",
      "declaration_type": "IMD",
      "commercial_ref": "PO-58213",
      "ducr": "6GB123456789000-58213",
      "mucr": null,
      "ducr_part": null,
      "declarant_eori": "GB123456789000",
      "declarant_name": "EXAMPLE FORWARDING LTD",
      "declarant_address": "1 DOCK ROAD",
      "declarant_city_name": "SOUTHAMPTON",
      "declarant_country_id": "GB",
      "declarant_postcode": "SO14 3XX",
      "declarant_rep": "2",
      "export_country_id": "CN",
      "consignor_eori": null,
      "consignor_name": "EXAMPLE MANUFACTURING CO LTD",
      "consignor_address": "88 INDUSTRIAL AVENUE",
      "consignor_city_name": "NINGBO",
      "consignor_country_id": "CN",
      "consignor_postcode": "315000",
      "multiple_consignor": false,
      "import_country_id": "GB",
      "consignee_eori": "GB987654321000",
      "consignee_name": "EXAMPLE IMPORTS LTD",
      "consignee_address": "12 TRADE PARK",
      "consignee_city_name": "LONDON",
      "consignee_country_id": "GB",
      "consignee_postcode": "E16 2XX",
      "multiple_consignee": false,
      "invoice_amount": "2920.00",
      "invoice_curr": "USD",
      "goods_location": "GBAUSOUSOUSOU",
      "border_transport_type": "1",
      "border_vehicle_code": "EXAMPLE VESSEL",
      "border_vehicle_coun": "PA",
      "inland_transport_type": "3",
      "container_no": "ABCU1234567",
      "gvms_interested": false,
      "freight_amount": "450.00",
      "freight_curr": "USD",
      "payment_method": "E",
      "carrier_eori": null,
      "carrier_name": null,
      "carrier_address": null,
      "carrier_city_name": null,
      "carrier_country_id": null,
      "carrier_postcode": null,
      "total_packages": 120,
      "person_in_charge": "J SMITH",
      "premises_code": null,
      "first_dan_no": "1234567",
      "second_dan_no": null,
      "insurance_amount": "0.0",
      "other_amounts": "0.0",
      "apportment_indicator": null,
      "total_gross_weight": "1850.0",
      "total_net_weight": "1700.0",
      "airfreight_cost": "0.0",
      "insurance_curr": null,
      "other_amounts_curr": null,
      "vat_adjustment": "0.0",
      "vat_adjustment_curr": null,
      "discount_amount": "0.0",
      "discount_curr": null,
      "discount_rate": "0.0",
      "warehouse_type": null,
      "incoterm": "FOB",
      "incoterm_location": "NINGBO",
      "trader_ref": "SHP-2026-0458",
      "arrival_transport_type": "1",
      "parties_attributes": [
        {
          "option": "fiscalref",
          "type": "FR1",
          "eori_code": "GB987654321"
        }
      ],
      "additions_deductions_attributes": [

      ],
      "trader_guarantees_attributes": [

      ],
      "tax_infos_attributes": [
        {
          "code": "A00",
          "payment_method": "E",
          "revenue_amount": "112.40"
        },
        {
          "code": "B00",
          "payment_method": "E",
          "revenue_amount": "584.48"
        }
      ],
      "goods_attributes": [
        {
          "line_no": 1,
          "commodity": "PLASTIC STORAGE BOXES",
          "gtip_code": "3923100000",
          "gtip_language": "EN",
          "brut_wg": 1850.0,
          "net_wg": 1700.0,
          "sender_name": null,
          "sender_address": null,
          "sender_city": null,
          "sender_country_id": null,
          "sender_postcode": null,
          "sender_eori_code": null,
          "consignee_name": null,
          "consignee_address": null,
          "consignee_city": null,
          "consignee_country_id": null,
          "consignee_postcode": null,
          "consignee_eori_code": null,
          "invoice_amount": "2920.00",
          "invoice_curr": "USD",
          "exp_customs_no": null,
          "exp_customs_type": null,
          "container_no": "ABCU1234567",
          "dep_country_id": null,
          "sensitive_goods_code": null,
          "additional_info": null,
          "auto_chassis": null,
          "auto_engine_number": null,
          "origin_country_id": "CN",
          "preference_request": "100",
          "quota_desc": null,
          "valuation_method": "1",
          "valuation_adjustment": "0000",
          "packs_attributes": [
            {
              "pack_type": "CT",
              "pack_count": "120",
              "notes": "ADDR"
            }
          ],
          "documents_attributes": [
            {
              "doc_type": "380",
              "doc_no": "INV-58213",
              "pre_post": "Z"
            }
          ],
          "produced_documents_attributes": [
            {
              "code": "N935",
              "reference": "INV-58213",
              "status": "AC",
              "reason": "",
              "quantity": "0.0"
            }
          ],
          "additional_codes_attributes": [

          ],
          "tax_infos_attributes": [
            {
              "code": "A00",
              "payment_method": "E",
              "revenue_amount": "112.40"
            },
            {
              "code": "B00",
              "payment_method": "E",
              "revenue_amount": "584.48"
            }
          ]
        }
      ]
    }
  ]
}

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=4a1f0c9e2b7d63a85e14f0b2c9d7e3a61f58b0c4d2e9a7f13b6c8d0e5f2a9b71' \
--header 'X-Modaltrans-Delivery: 3b8f2c1e-7d45-4a9b-9e62-0f1d8c7a5b24' \
--header 'X-Modaltrans-Event: customs_declarations/status_changed' \
--header 'User-Agent: Modaltrans-Webhook/1.0' \
--header 'X-Api-Key: 3f9c1ab24e7d05b6c8fa1d3e9b470a52' \
--header 'Content-Type: application/json' \
--data '{
  "webhookId": 12,
  "eventName": "customs_declarations/status_changed",
  "deliveryId": "3b8f2c1e-7d45-4a9b-9e62-0f1d8c7a5b24",
  "eventKey": "9c1d4e7a-2b3f-5a8c-b6d0-4e2f7a9c1b35",
  "sentAt": "2026-10-09T10:42:17Z",
  "recordType": "customs_declarations",
  "previousStatus": "accepted",
  "status": "cleared",
  "data": [
    {
      "transaction_id": "900123",
      "reference": "GB2610000123",
      "doc_date": "2026-10-08",
      "status": "cleared",
      "lrn": null,
      "mrn": "26GB4F7K2M9P1Q3R58",
      "csp_code": null,
      "service_code": "cds",
      "doc_type": "import",
      "declaration_type": "IMD",
      "commercial_ref": "PO-58213",
      "ducr": "6GB123456789000-58213",
      "mucr": null,
      "ducr_part": null,
      "declarant_eori": "GB123456789000",
      "declarant_name": "EXAMPLE FORWARDING LTD",
      "declarant_address": "1 DOCK ROAD",
      "declarant_city_name": "SOUTHAMPTON",
      "declarant_country_id": "GB",
      "declarant_postcode": "SO14 3XX",
      "declarant_rep": "2",
      "export_country_id": "CN",
      "consignor_eori": null,
      "consignor_name": "EXAMPLE MANUFACTURING CO LTD",
      "consignor_address": "88 INDUSTRIAL AVENUE",
      "consignor_city_name": "NINGBO",
      "consignor_country_id": "CN",
      "consignor_postcode": "315000",
      "multiple_consignor": false,
      "import_country_id": "GB",
      "consignee_eori": "GB987654321000",
      "consignee_name": "EXAMPLE IMPORTS LTD",
      "consignee_address": "12 TRADE PARK",
      "consignee_city_name": "LONDON",
      "consignee_country_id": "GB",
      "consignee_postcode": "E16 2XX",
      "multiple_consignee": false,
      "invoice_amount": "2920.00",
      "invoice_curr": "USD",
      "goods_location": "GBAUSOUSOUSOU",
      "border_transport_type": "1",
      "border_vehicle_code": "EXAMPLE VESSEL",
      "border_vehicle_coun": "PA",
      "inland_transport_type": "3",
      "container_no": "ABCU1234567",
      "gvms_interested": false,
      "freight_amount": "450.00",
      "freight_curr": "USD",
      "payment_method": "E",
      "carrier_eori": null,
      "carrier_name": null,
      "carrier_address": null,
      "carrier_city_name": null,
      "carrier_country_id": null,
      "carrier_postcode": null,
      "total_packages": 120,
      "person_in_charge": "J SMITH",
      "premises_code": null,
      "first_dan_no": "1234567",
      "second_dan_no": null,
      "insurance_amount": "0.0",
      "other_amounts": "0.0",
      "apportment_indicator": null,
      "total_gross_weight": "1850.0",
      "total_net_weight": "1700.0",
      "airfreight_cost": "0.0",
      "insurance_curr": null,
      "other_amounts_curr": null,
      "vat_adjustment": "0.0",
      "vat_adjustment_curr": null,
      "discount_amount": "0.0",
      "discount_curr": null,
      "discount_rate": "0.0",
      "warehouse_type": null,
      "incoterm": "FOB",
      "incoterm_location": "NINGBO",
      "trader_ref": "SHP-2026-0458",
      "arrival_transport_type": "1",
      "parties_attributes": [
        {
          "option": "fiscalref",
          "type": "FR1",
          "eori_code": "GB987654321"
        }
      ],
      "additions_deductions_attributes": [

      ],
      "trader_guarantees_attributes": [

      ],
      "tax_infos_attributes": [
        {
          "code": "A00",
          "payment_method": "E",
          "revenue_amount": "112.40"
        },
        {
          "code": "B00",
          "payment_method": "E",
          "revenue_amount": "584.48"
        }
      ],
      "goods_attributes": [
        {
          "line_no": 1,
          "commodity": "PLASTIC STORAGE BOXES",
          "gtip_code": "3923100000",
          "gtip_language": "EN",
          "brut_wg": 1850.0,
          "net_wg": 1700.0,
          "sender_name": null,
          "sender_address": null,
          "sender_city": null,
          "sender_country_id": null,
          "sender_postcode": null,
          "sender_eori_code": null,
          "consignee_name": null,
          "consignee_address": null,
          "consignee_city": null,
          "consignee_country_id": null,
          "consignee_postcode": null,
          "consignee_eori_code": null,
          "invoice_amount": "2920.00",
          "invoice_curr": "USD",
          "exp_customs_no": null,
          "exp_customs_type": null,
          "container_no": "ABCU1234567",
          "dep_country_id": null,
          "sensitive_goods_code": null,
          "additional_info": null,
          "auto_chassis": null,
          "auto_engine_number": null,
          "origin_country_id": "CN",
          "preference_request": "100",
          "quota_desc": null,
          "valuation_method": "1",
          "valuation_adjustment": "0000",
          "packs_attributes": [
            {
              "pack_type": "CT",
              "pack_count": "120",
              "notes": "ADDR"
            }
          ],
          "documents_attributes": [
            {
              "doc_type": "380",
              "doc_no": "INV-58213",
              "pre_post": "Z"
            }
          ],
          "produced_documents_attributes": [
            {
              "code": "N935",
              "reference": "INV-58213",
              "status": "AC",
              "reason": "",
              "quantity": "0.0"
            }
          ],
          "additional_codes_attributes": [

          ],
          "tax_infos_attributes": [
            {
              "code": "A00",
              "payment_method": "E",
              "revenue_amount": "112.40"
            },
            {
              "code": "B00",
              "payment_method": "E",
              "revenue_amount": "584.48"
            }
          ]
        }
      ]
    }
  ]
}'

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:37:28
Previous
Air Tracking Event Updated
Next
NCTS Declaration Status Changed
Built with