- Introduction
- Getting Started
- Authentication
- Error Handling
- Contact Support
- Modaltrans API
- Get Auth Token
- Accounting
- Customs
- Logistics
- Depot
- Fleet Management
- CRM
- Timelines
- S3 Files
- Notifications
- User Details
Create an Order
Developing
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/orders
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
order
object
required
entry_date
string <date>
required
extref
string
optional
input_output
enum<string>
required
Allowed values:
inputoutput
file_no
string
optional
order_no
string
optional
sender_code
string
optional
sender_name
string
optional
consignee_code
string
optional
consignee_name
string
optional
order_address
string
optional
city
string
optional
district
string
optional
warehouse_code
string
required
notes
string
optional
interface_code
string
optional
from_location_code
string
optional
to_location_code
string
optional
status
string
optional
arrival_date
string <date>
optional
process_type
string
optional
orderlines_attributes
array [object {15}]
required
Example
{
"order": {
"input_output": "input",
"warehouse_code": "TEST1212",
"notes": "ApiTest",
"extref": "AT121314",
"entry_date": "2024-08-22",
"sender_name": "Demo Uk",
"consignee_name": "YUMCO COMMERCE DOO",
"order_address": "123 Baker Street, Suite 456, London, Greater London, NW1 6XE, United Kingdom",
"district": "Greater London",
"city": "London",
"orderlines_attributes": [
{
"line_no": "1",
"serial_no": "TA121314",
"weight": "200.0",
"volume": "100.0",
"productName": "TestApi",
"barCode": "TestApi",
"packCount": "10",
"packType": "Box"
}
]
}
}
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/orders' \
--header 'Content-Type: application/json' \
--data-raw '{
"order": {
"input_output": "input",
"warehouse_code": "TEST1212",
"notes": "ApiTest",
"extref": "AT121314",
"entry_date": "2024-08-22",
"sender_name": "Demo Uk",
"consignee_name": "YUMCO COMMERCE DOO",
"order_address": "123 Baker Street, Suite 456, London, Greater London, NW1 6XE, United Kingdom",
"district": "Greater London",
"city": "London",
"orderlines_attributes": [
{
"line_no": "1",
"serial_no": "TA121314",
"weight": "200.0",
"volume": "100.0",
"productName": "TestApi",
"barCode": "TestApi",
"packCount": "10",
"packType": "Box"
}
]
}
}'
Responses
🟢201Created
application/json
Body
order_id
string
required
reference
string
required
assignee_email
string
required
operator_email
string
required
position_id
integer
required
notes
string
required
ncts_declarations
array [object {14}]
required
transaction_id
integer
optional
reference
string
optional
trailer_code
string
optional
vehicle_code
string
optional
container
string
optional
lrn
string
optional
mrn
string
optional
status
string
optional
carrier_name
string
optional
guarantee_price
number
optional
guarantee_curr
string
optional
manifesto_price
number
optional
currency
string
optional
holder_name
string
optional
Example
{
"order_id": "string",
"reference": "string",
"assignee_email": "string",
"operator_email": "string",
"position_id": 0,
"notes": "string",
"ncts_declarations": [
{
"transaction_id": 0,
"reference": "string",
"trailer_code": "string",
"vehicle_code": "string",
"container": "string",
"lrn": "string",
"mrn": "string",
"status": "string",
"carrier_name": "string",
"guarantee_price": 0,
"guarantee_curr": "string",
"manifesto_price": 0,
"currency": "string",
"holder_name": "string"
}
]
}
🟠403Forbidden
🟠404Record Not Found
🟠400Bad Request
🟠422Unprocessable Entity
Modified at 2024-08-28 09:39:58