- 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
Update a Custom Declaration
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
PATCH
/api/v1/customs_declarations/{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
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