- Introduction
- Getting Started
- Authentication
- Error Handling
- Contact Support
- Modaltrans API
- Get Auth Token
- Accounting
- Customs
- Logistics
- Bookings
- Locations
- Positions
- Tracking
- Shipments
- Depot
- Fleet Management
- CRM
- Timelines
- S3 Files
- Notifications
- User Details
Create a Booking
Developing
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/bookings
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
booking
object
required
trans_mode
enum<string>
required
Allowed values:
roadairseacourier
load_type
enum<string>
required
Allowed values:
PK
in_container
enum<string>
required
Allowed values:
at_containerout_of_container
total_pack
number
optional
Example:
10
brut_wg
number
optional
Example:
8700
volume
number
optional
Example:
4.5
price_wg
number
optional
Example:
132.58
operation_code
string
required
Example:
fb9a753c22d59af6
company_no
string
optional
Example:
21321432
company_name
string | null
required
Example:
Demo Uk
company_taxno
string
optional
Example:
UK411981167
company_country_id
string
required
Examples:
GBUSCH
sender_name
string
optional
Example:
Test Consignor Co
sender_eori
string
optional
Example:
GB987654312000
load_place_type
enum<string>
required
Allowed values:
airseaportcompanyother
load_place_code
string
optional
Examples:
GBSOULHR
load_place
string
optional
Example:
WINCHESTER ROAD ,CHANDLERS FORD
dep_zipcode
string
optional
Example:
SO53 2PZ
load_state_name
string
optional
Example:
Winchester
load_coun
string
required
Examples:
GBUSCN
consignee_name
string
optional
Example:
Test Consignee Co
consignee_eori
string
optional
Example:
GB987654312000
unload_place_type
enum<string>
required
Allowed values:
airseaportcompanyother
unload_place_code
string
optional
Examples:
GBSOULHR
unload_place
string
optional
Example:
NO 27 XIANXING ROAD, XIANLIN
arv_zipcode
string
optional
Example:
710075
unload_state_name
string
optional
Example:
Nanjing
unload_coun
string
required
Examples:
CNGBUS
incoterm
string
required
Example:
CPT
packages_attributes
array [object {7}]
optional
containers_attributes
array [object {8}]
optional
Example
{
"booking": {
"trans_mode": "sea",
"load_type": "P",
"in_container": "out_of_container",
"total_pack": 10,
"brut_wg": 8700,
"volume": 6.4,
"price_wg": 8700,
"operation_code": "fb9a753c22d59af6",
"company_no": "21321432",
"company_name": "Demo Uk",
"company_taxno": "UK411981167",
"company_country_id": "UK",
"sender_name": "Test Consignor Co",
"sender_eori": "GB987654312000",
"load_place_type": "other",
"load_place_code": "2214325324",
"load_place": "WINCHESTER ROAD ,CHANDLERS FORD",
"dep_zipcode": "SO53 2PZ",
"load_state_name": "Winchester",
"load_coun": "GB",
"consignee_name": "Test Consignee Co",
"consignee_eori": "GB987654312000",
"unload_place_type": "other",
"unload_place_code": "32412321",
"unload_place": "NO 27 XIANXING ROAD, XIANLIN",
"arv_zipcode": "710075",
"unload_state_name": "Nanjing",
"unload_coun": "CN",
"incoterm": "CPT",
"packages_attributes": [
{
"total": 97021,
"pack_code": "BI",
"dimension1": 50,
"dimension2": 50,
"dimension3": 50,
"brutwg": 124213,
"volume": 100,
"pack_type": "Airpods"
}
]
}
}
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 POST 'https://demo.modaltrans.com/api/v1/bookings' \
--header 'Content-Type: application/json' \
--data-raw '{
"booking": {
"trans_mode": "sea",
"load_type": "P",
"in_container": "out_of_container",
"total_pack": 10,
"brut_wg": 8700,
"volume": 6.4,
"price_wg": 8700,
"operation_code": "fb9a753c22d59af6",
"company_no": "21321432",
"company_name": "Demo Uk",
"company_taxno": "UK411981167",
"company_country_id": "UK",
"sender_name": "Test Consignor Co",
"sender_eori": "GB987654312000",
"load_place_type": "other",
"load_place_code": "2214325324",
"load_place": "WINCHESTER ROAD ,CHANDLERS FORD",
"dep_zipcode": "SO53 2PZ",
"load_state_name": "Winchester",
"load_coun": "GB",
"consignee_name": "Test Consignee Co",
"consignee_eori": "GB987654312000",
"unload_place_type": "other",
"unload_place_code": "32412321",
"unload_place": "NO 27 XIANXING ROAD, XIANLIN",
"arv_zipcode": "710075",
"unload_state_name": "Nanjing",
"unload_coun": "CN",
"incoterm": "CPT",
"packages_attributes": [
{
"total": 97021,
"pack_code": "BI",
"dimension1": 50,
"dimension2": 50,
"dimension3": 50,
"brutwg": 124213,
"volume": 100,
"pack_type": "Airpods"
}
]
}
}'
Responses
🟢201Created
application/json
Body
array of:
transaction_id
integer
required
uuid
string
required
reference
string
required
branch_id
integer
required
company_uuid
string
required
company_name
string
required
customer_ref
string
required
agent_ref
string
required
consignee_name
string
required
sender_name
string
required
load_place_id
integer
required
load_city
string
required
load_zipcode
string
required
load_coun
string
required
load_place
string
required
load_date
string <date-time>
required
unload_place_id
integer
required
unload_city
string
required
unload_zipcode
string
required
unload_coun
string
required
unload_place
string
required
unload_date
string
required
brut_wg
number
required
volume
number
required
ladameter
number
required
status
string
required
commodity
string
required
category
string
required
group_id
integer
required
price_wg
number
required
teu
integer
required
saler_name
string
required
saler_email
string
required
saler_office_tel
string
required
total_pack
number
required
carrier_name
string
required
waybill_no
string
required
container_nos
array [object {2}]
required
size
string
required
container_no
string
required
timelines
array [object {26}]
required
id
integer
required
parent_type
string
required
parent_id
integer
required
status_date
string <date-time>
required
status_code
string
required
place_id
integer
required
city_id
integer
required
country_id
string
required
notes
string
required
source
string
required
group_id
integer
required
user_id
integer
required
patron_id
integer
required
customer_inform_type
boolean
required
customer_inform_status
string
required
created_at
string <date-time>
required
updated_at
string <date-time>
required
lng
number
required
lat
number
required
place_name
string
required
notify_senders
boolean
required
notify_consignees
boolean
required
notify_companies
boolean
required
tenant_id
integer
required
icon_code
string
required
system_location
string
required
Example
[
{
"transaction_id": 0,
"uuid": "string",
"reference": "string",
"branch_id": 0,
"company_uuid": "string",
"company_name": "string",
"customer_ref": "string",
"agent_ref": "string",
"consignee_name": "string",
"sender_name": "string",
"load_place_id": 0,
"load_city": "string",
"load_zipcode": "string",
"load_coun": "string",
"load_place": "string",
"load_date": "2019-08-24T14:15:22Z",
"unload_place_id": 0,
"unload_city": "string",
"unload_zipcode": "string",
"unload_coun": "string",
"unload_place": "string",
"unload_date": "string",
"brut_wg": 0,
"volume": 0,
"ladameter": 0,
"status": "string",
"commodity": "string",
"category": "string",
"group_id": 0,
"price_wg": 0,
"teu": 0,
"saler_name": "string",
"saler_email": "string",
"saler_office_tel": "string",
"total_pack": 0,
"carrier_name": "string",
"waybill_no": "string",
"container_nos": [
{
"size": "string",
"container_no": "string"
}
],
"timelines": [
{
"id": 0,
"parent_type": "string",
"parent_id": 0,
"status_date": "2019-08-24T14:15:22Z",
"status_code": "string",
"place_id": 0,
"city_id": 0,
"country_id": "string",
"notes": "string",
"source": "string",
"group_id": 0,
"user_id": 0,
"patron_id": 0,
"customer_inform_type": true,
"customer_inform_status": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"lng": 0,
"lat": 0,
"place_name": "string",
"notify_senders": true,
"notify_consignees": true,
"notify_companies": true,
"tenant_id": 0,
"icon_code": "string",
"system_location": "string"
}
]
}
]
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
🟠422Unprocessable Entity
Modified at 2025-03-04 09:48:50