1. Shipments
  • 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
          GET
        • List All Shipments
          GET
        • Retrieve Financials of Shipment
          GET
        • List Contacts of the Shipment
          GET
        • Create a Shipment
          POST
        • Update a Shipment
          PATCH
    • 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
    • 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
  1. Shipments

Create a Shipment

Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/shipments
Creates a Shipment and links a Booking to it in a single call.
There are two ways to use this endpoint please pick one:
Create a new booking together with the shipment
Send position + booking. The booking is created and linked to the shipment automatically. Use this when the booking is not created in the system yet.
Attach an existing booking to a new shipment
Send position + loading_id (or loading_reference). Use this when the booking was already created earlier (e.g. through the Create a Booking endpoint) and you only need a shipment for it. Do not resend the booking data.
Send either booking or loading_id/loading_reference, never both such requests are rejected with 422.
On success (201) the two records are linked: the booking's status follows the shipment's status, carrier/waybill/voyage and date fields are copied from the shipment onto the booking.

Request

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

Examples
{
  "position": {
    "trans_method": "road",
    "status": "planning",
    "estimated_dep_date": "2026-07-15 10:00:00",
    "estimated_arv_date": "2026-07-25 09:00:00",
    "dep_country_id": "GB",
    "arv_country_id": "TR"
  },
  "booking": {
    "trans_mode": "road",
    "load_type": "P",
    "total_pack": 10,
    "brut_wg": 8700,
    "volume": 6.4,
    "company_name": "Demo Uk 3",
    "company_taxno": "UK411981161",
    "company_country_id": "GB",
    "company_city_name": "Manchester",
    "load_place_type": "other",
    "load_place": "WINCHESTER ROAD, CHANDLERS FORD",
    "load_coun": "GB",
    "unload_place_type": "other",
    "unload_place": "NO 27 XIANXING ROAD, XIANLIN",
    "unload_coun": "CN"
  }
}

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
curl --location 'https://demo.modaltrans.com/api/v1/shipments' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "position": {
    "trans_method": "road",
    "status": "planning",
    "estimated_dep_date": "2026-07-15 10:00:00",
    "estimated_arv_date": "2026-07-25 09:00:00",
    "dep_country_id": "GB",
    "arv_country_id": "TR"
  },
  "booking": {
    "trans_mode": "road",
    "load_type": "P",
    "total_pack": 10,
    "brut_wg": 8700,
    "volume": 6.4,
    "company_name": "Demo Uk 3",
    "company_taxno": "UK411981161",
    "company_country_id": "GB",
    "company_city_name": "Manchester",
    "load_place_type": "other",
    "load_place": "WINCHESTER ROAD, CHANDLERS FORD",
    "load_coun": "GB",
    "unload_place_type": "other",
    "unload_place": "NO 27 XIANXING ROAD, XIANLIN",
    "unload_coun": "CN"
  }
}'

Responses

🟢201Success
application/json
Bodyapplication/json

Example
{
    "position": {
        "uuid": "33333333-3333-4333-8333-333333333333",
        "reference": "TT260320",
        "branch_id": 11,
        "user_id": 100001,
        "status": "planning",
        "contract_type": null,
        "extref": null,
        "freight_price": "0.0",
        "freight_curr": null,
        "truck": null,
        "truck_type": null,
        "trailer": null,
        "trailer_type": null,
        "truck_uuid": null,
        "trailer_uuid": null,
        "driver_name": null,
        "driver_gsm": null,
        "route": null,
        "notes": null,
        "supplier_id": null,
        "supplier_name": null,
        "operator_name": "John Doe",
        "dep_place_name": null,
        "dep_city": null,
        "dep_country_id": "GB",
        "estimated_dep_date": "2026-07-15T10:00:00.000+01:00",
        "departure_date": null,
        "arv_place_name": null,
        "arv_city": null,
        "arv_country_id": "TR",
        "estimated_arv_date": "2026-07-25T09:00:00.000+01:00",
        "arrival_date": null,
        "transit_points": [],
        "untransit_points": [],
        "border_date": null,
        "waybill_type": null,
        "route_km": "0.0",
        "voyage": null,
        "operator_id": null,
        "tracking_eta": null,
        "tracking_etd": null,
        "agent_id": null,
        "departure_ship": [],
        "arrival_ship": [],
        "dep_odemeter": 0,
        "arv_odemeter": 0,
        "dep_place": null,
        "arv_place": null,
        "consigments": [
            {
                "transaction_id": 1000002,
                "uuid": "44444444-4444-4444-8444-444444444444",
                "reference": "KUR2600343",
                "trans_mode": "road",
                "branch_id": 11,
                "company_uuid": "7730b33d-8a64-4468-a1e9-0450ae77ddf2",
                "company_name": "Demo Uk 3",
                "customer_ref": null,
                "agent_ref": null,
                "consignee_name": null,
                "consignee_email": null,
                "sender_name": null,
                "sender_email": null,
                "load_place_id": null,
                "load_city": null,
                "load_zipcode": null,
                "load_coun": "GB",
                "load_place": "WINCHESTER ROAD, CHANDLERS FORD",
                "unload_place_id": null,
                "unload_city": null,
                "unload_zipcode": null,
                "unload_coun": "CN",
                "unload_place": "NO 27 XIANXING ROAD, XIANLIN",
                "departure_date": null,
                "arrival_date": null,
                "delivery_date": null,
                "report_date": "2026-07-06",
                "contract_type": null,
                "brut_wg": 8700.0,
                "volume": 6.4,
                "ladameter": null,
                "status": "planning",
                "commodity": null,
                "category": null,
                "group_id": 2000002,
                "price_wg": null,
                "teu": 0,
                "saler_name": "John Doe",
                "saler_email": "john.doe@example.com",
                "saler_office_tel": "",
                "operator_name": "John Doe",
                "extref": null,
                "freight_price": "0.0",
                "freight_curr": null,
                "total_pack": 10.0,
                "load_date": "2026-07-15T10:00:00.000+01:00",
                "unload_date": "2026-07-25T09:00:00.000+01:00",
                "waybill_no": null,
                "carrier_name": null,
                "container_nos": [],
                "export_import": "transit",
                "truck_type": null,
                "truck_code": null,
                "vessel_code": null,
                "free_time": null,
                "notes": null,
                "main_position_id": 1500002,
                "main_position_reference": "TT260320",
                "total_packs": null,
                "points": [],
                "timelines": [],
                "company_code": null,
                "invoiced_sales": 0.0,
                "uninvoiced_sales": 0.0,
                "invoiced_costs": 0.0,
                "uninvoiced_costs": 0.0,
                "invoiced_sales_eur": 0.0,
                "uninvoiced_sales_eur": 0.0,
                "invoiced_costs_eur": 0.0,
                "uninvoiced_costs_eur": 0.0,
                "contractor_name": null,
                "tag_names": [],
                "invoiced_revenue": "0.0",
                "invoiced_expense": "0.0",
                "estimated_revenue": "0.0",
                "estimated_expense": "0.0",
                "currency": "EUR",
                "operation_responsible": "John Doe",
                "vehicle_procurement_responsible": "John Doe",
                "carrier_company": null
            }
        ]
    },
    "booking": {
        "transaction_id": 1000002,
        "uuid": "44444444-4444-4444-8444-444444444444",
        "reference": "KUR2600343",
        "trans_mode": "road",
        "branch_id": 11,
        "company_uuid": "7730b33d-8a64-4468-a1e9-0450ae77ddf2",
        "company_name": "Demo Uk 3",
        "customer_ref": null,
        "agent_ref": null,
        "consignee_name": null,
        "consignee_email": null,
        "sender_name": null,
        "sender_email": null,
        "load_place_id": null,
        "load_city": null,
        "load_zipcode": null,
        "load_coun": "GB",
        "load_place": "WINCHESTER ROAD, CHANDLERS FORD",
        "unload_place_id": null,
        "unload_city": null,
        "unload_zipcode": null,
        "unload_coun": "CN",
        "unload_place": "NO 27 XIANXING ROAD, XIANLIN",
        "departure_date": null,
        "arrival_date": null,
        "delivery_date": null,
        "report_date": "2026-07-06",
        "contract_type": null,
        "brut_wg": 8700.0,
        "volume": 6.4,
        "ladameter": null,
        "status": "planning",
        "commodity": null,
        "category": null,
        "group_id": 2000002,
        "price_wg": null,
        "teu": 0,
        "saler_name": "John Doe",
        "saler_email": "john.doe@example.com",
        "saler_office_tel": "",
        "extref": null,
        "freight_price": "0.0",
        "freight_curr": null,
        "total_pack": 10.0,
        "load_date": "2026-07-15T10:00:00.000+01:00",
        "unload_date": "2026-07-25T09:00:00.000+01:00",
        "waybill_no": null,
        "carrier_name": null,
        "customs_entry_duty_amount": 0.0,
        "customs_entry_vat_amount": 0.0,
        "customs_entry_mrn": [],
        "container_nos": [],
        "free_time": null,
        "notify1": null,
        "notify2": null,
        "mbl_type": null,
        "carrier_reference": null,
        "eta": "2026-07-25T09:00:00.000+01:00",
        "etd": "2026-07-15T10:00:00.000+01:00",
        "operator_name": null,
        "operator_email": null,
        "agent_name": null,
        "voyage_no": "",
        "ship": [],
        "truck_type": null,
        "truck_code": null,
        "vessel_code": null,
        "export_import": "transit",
        "notes": null,
        "total_packs": null,
        "points": [],
        "timelines": [],
        "company_code": null,
        "invoiced_sales": 0.0,
        "uninvoiced_sales": 0.0,
        "invoiced_costs": 0.0,
        "uninvoiced_costs": 0.0,
        "invoiced_sales_eur": 0.0,
        "uninvoiced_sales_eur": 0.0,
        "invoiced_costs_eur": 0.0,
        "uninvoiced_costs_eur": 0.0,
        "invoiced_sales_usd": 0.0,
        "uninvoiced_sales_usd": 0.0,
        "invoiced_costs_usd": 0.0,
        "uninvoiced_costs_usd": 0.0,
        "contractor_name": null,
        "tag_names": [],
        "invoiced_revenue": "0.0",
        "invoiced_expense": "0.0",
        "estimated_revenue": "0.0",
        "estimated_expense": "0.0",
        "currency": "EUR",
        "operation_responsible": "John Doe",
        "vehicle_procurement_responsible": "John Doe",
        "carrier_company": null
    }
}
🟠400
🟠403
🟠404
🟠422
Modified at 2026-07-06 14:24:23
Previous
List Contacts of the Shipment
Next
Update a Shipment
Built with