1. Customs 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
        • Create an Ens Declaration from JSON
        • Update an NCTS Declaration
        • Download an NCTS Declaration
        • List Timelines of NCTS Declaration
        • List Messages of NCTS Decalaration
      • Customs Declarations
        • List all Customs Declarations
          GET
        • Retrieve a Custom Declaration
          GET
        • Create a Customs Declaration
          POST
        • Update a Custom Declaration
          PATCH
        • Delete a Custom Declaration
          DELETE
        • Retrieve a Declaration History
          GET
        • Retrieve an MRN Status of Declaration
          GET
      • Declaration Requests
        • List all Declaration Orders
        • Retrieve a Declaration Request
        • Create a Declaration Request
        • Update a Declaration Request
        • Delete a Declaration Request
    • 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. Customs Declarations

Update a Custom Declaration

Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
PATCH
/api/v1/customs_declarations/{id}
Updates a Customs Declaration by its transaction ID.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
string 
required
Transaction ID of the Customs Declaration you want to update.
Example:
287629
Body Params application/json
customs_declaration
object 
optional
declaration_data
object 
required
Example
{
  "customs_declaration": {
    "declaration_data": {
      "other_amounts": 1242,
      "other_amounts_curr": "TRY"
    }
  }
}

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 PATCH 'https://demo.modaltrans.com/api/v1/customs_declarations/287629' \
--header 'Content-Type: application/json' \
--data-raw '{
  "customs_declaration": {
    "declaration_data": {
      "other_amounts": 1242,
      "other_amounts_curr": "TRY"
    }
  }
}'

Responses

🟢200OK
application/json
Body
customs_declaration
object 
optional
declaration_data
object 
required
Example
{
    "customs_declaration": {
        "declaration_data": {
            "auto_send": true,
            "badge_code": "string",
            "service_code": "cds",
            "doc_type": "export",
            "declaration_type": "EXA",
            "commercial_ref": "string",
            "ducr": "sadasd",
            "mucr": "string",
            "ducr_part": "string",
            "declarant_eori": "string",
            "declarant_name": "string",
            "declarant_address": "string",
            "declarant_city_name": "string",
            "declarant_country_id": "string",
            "declarant_postcode": "string",
            "declarant_rep": "No Representation",
            "export_country_id": "string",
            "consignor_eori": "string",
            "consignor_name": "string",
            "consignor_address": "string",
            "consignor_city_name": "string",
            "consignor_country_id": "string",
            "consignor_postcode": "string",
            "multiple_consignor": true,
            "import_country_id": "string",
            "consignee_eori": "string",
            "consignee_name": "string",
            "consignee_address": "string",
            "consignee_city_name": "string",
            "consignee_country_id": "string",
            "consignee_postcode": "string",
            "multiple_consignee": true,
            "invoice_amount": 0,
            "invoice_curr": "string",
            "goods_location": "string",
            "border_transport_type": "1",
            "border_vehicle_code": "string",
            "border_vehicle_coun": "string",
            "inland_transport_type": "1",
            "container_no": "string",
            "gvms_interested": true,
            "freight_amount": 0,
            "freight_curr": "string",
            "payment_method": "string",
            "carrier_eori": "string",
            "carrier_name": "string",
            "carrier_address": "string",
            "carrier_city_name": "string",
            "carrier_country_id": "string",
            "carrier_postcode": "string",
            "total_packages": 0,
            "nature_of_transaction": "1",
            "premises_code": "string",
            "first_dan_no": "string",
            "second_dan_no": "string",
            "insurance_amount": 0,
            "other_amounts": 0,
            "airport_code": "string",
            "apportment_indicator": "string",
            "total_gross_weight": 0,
            "total_net_weight": 0,
            "airfreight_cost": 0,
            "insurance_curr": "string",
            "other_amounts_curr": "string",
            "vat_adjustment": 0,
            "vat_adjustment_curr": "string",
            "discount_amount": 0,
            "discount_curr": "string",
            "discount_rate": 0,
            "warehouse_type": "string",
            "incoterm": "CFR",
            "incoterm_location": "string",
            "trader_ref": "string",
            "arrival_transport_type": "10",
            "guarantee_code": "string",
            "guarantee_reference": "string",
            "evrim_xml": "string",
            "goods_attributes": [
                {
                    "line_no": 0,
                    "commodity": "string",
                    "gtip_code": "string",
                    "gtip_language": "string",
                    "brut_wg": 0,
                    "net_wg": 0,
                    "sender_name": "string",
                    "sender_address": "string",
                    "sender_city": "string",
                    "sender_country_id": "string",
                    "sender_postcode": "string",
                    "sender_eori_code": "string",
                    "consignee_name": "string",
                    "consignee_address": "string",
                    "consignee_city": "string",
                    "consignee_country_id": "string",
                    "consignee_postcode": "string",
                    "consignee_eori_code": "string",
                    "invoice_amount": 0,
                    "invoice_curr": "string",
                    "third_quantity_type": "string",
                    "cpc_code": "string",
                    "container_no": "string",
                    "preferential_country_id": "string",
                    "cus_code": "string",
                    "additional_cpc_code": "string",
                    "nature_of_transaction": "string",
                    "additional_commodity_codes": "string",
                    "origin_country_id": "string",
                    "preference_request": "string",
                    "quota_desc": "string",
                    "valuation_method": "string",
                    "valuation_adjustment": "string",
                    "third_quantity": 0,
                    "supplementary_unit": 0,
                    "packs_attributes": [
                        {
                            "pack_type": "AE",
                            "pack_count": 0,
                            "notes": "string"
                        }
                    ],
                    "documents_attributes": [
                        {
                            "doc_type": "T1",
                            "doc_no": "string",
                            "pre_post": "string"
                        }
                    ],
                    "produced_documents_attributes": [
                        {
                            "code": "string",
                            "reference": "string",
                            "status": "string",
                            "reason": "string",
                            "quantity": 0
                        }
                    ],
                    "additional_codes_attributes": [
                        {
                            "code": "string",
                            "notes": "string"
                        }
                    ]
                }
            ],
            "parties_attributes": [
                {
                    "party_role": "string",
                    "party_code": "string",
                    "eori_code": "string"
                }
            ],
            "trader_additions_attributes": [
                {
                    "code": "string",
                    "amount": 0,
                    "curr": "string",
                    "rate_code": 0
                }
            ]
        }
    }
}
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
🟠422Unprocessable Entity
Modified at 2025-03-25 10:50:34
Previous
Create a Customs Declaration
Next
Delete a Custom Declaration
Built with