Skip to main content
POST
/
orders
/
create
cURL
curl --request POST \
  --url https://{company}.datatruck.io/api/v1/openapi/orders/create/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "load_id": "LD-987654",
  "load_pay": "5000.00",
  "customer": "ABC Logistics",
  "mc_number": "Armitage",
  "weight": "2000kg",
  "goods": "Furniture",
  "rate_confirmation": "base64_encoded_string",
  "stops": [
    {
      "company_name": "Test Company",
      "address": "123 Street",
      "zip_code": "10001",
      "enter_time": "2025-02-06T08:30:00Z",
      "exit_time": "2025-02-06T09:30:00Z",
      "reference_id": "REF-001",
      "seal_number": "SEAL-789",
      "stop_type": "pickup"
    }
  ]
}
'
{
  "id": 12345,
  "shipment_id": "SHIP-987654",
  "customer": "ABC Logistics",
  "status": "In Progress",
  "mc_number": "Armitage",
  "load_id": "LD-987654",
  "references_id": "REF-123456",
  "load_pay": "5000.00",
  "total_miles": "1500.75",
  "per_mile_revenue": "3.25",
  "special_instruction": "Handle with care",
  "tags": [
    {
      "name": "Urgent"
    }
  ]
}

Authorizations

Authorization
string
header
required

Body

application/json

Request Body

load_id
string | null

Unique identifier for the load

Example:

"LD-987654"

load_pay
string<decimal> | null

Payment amount for the load

Example:

"5000.00"

customer
string | null

Customer associated with the load

Example:

"ABC Logistics"

mc_number
string

Motor Carrier number for the shipment

Example:

"Armitage"

weight
string | null

Weight of the goods being transported

Example:

"2000kg"

goods
string | null

Type of goods being transported

Example:

"Furniture"

rate_confirmation
string | null

Rate confirmation document in base64 format or use global url of the file)

Example:

"base64_encoded_string"

stops
object[] | null

List of stops along the route

Response

Successful order creation response

id
integer

Unique order ID

Example:

12345

shipment_id
string

Shipment identifier

Example:

"SHIP-987654"

customer
string

Customer associated with the shipment

Example:

"ABC Logistics"

status
string

Current status of the load

Example:

"In Progress"

mc_number
string

Motor Carrier number for the shipment

Example:

"Armitage"

load_id
string

Unique identifier for the load

Example:

"LD-987654"

references_id
string

Reference ID for the load

Example:

"REF-123456"

load_pay
string<decimal>

Total payment amount for the load

Example:

"5000.00"

total_miles
string<decimal>

Total miles covered for the load

Example:

"1500.75"

per_mile_revenue
string<decimal> | null

Revenue per mile (optional)

Example:

"3.25"

special_instruction
string | null

Any special instructions for the load

Example:

"Handle with care"

tags
object[]

List of tags associated with the order