oTMS-openapi en
  1. oTMS API
oTMS-openapi en
  • oTMS API
    • Order Import
      PUT
    • orderOutbound
      POST
    • shipPointImport
      PUT
    • Delete delivery point
      DELETE
    • Order Assignment to Driver
      POST
    • TruckAndDriverImport
      PUT
    • Assign Driver to Order
      POST
    • Job Sheet Import
      PUT
    • Delete Job Sheet
      PUT
    • Order Recall
      POST
    • Share Link
      PUT
    • Carrier Export
      POST
    • Order Update
      PUT
    • Order Dispatch
      POST
    • Order Revoke
      PUT
    • Order Rating
      POST
    • Order Handover Creation
      PUT
    • Oorder Custom Update
      POST
    • Price File Matching
      POST
    • Order cost update
      POST
    • Shipper/Receiver export
      POST
    • Job Sheet Outbound
      POST
    • Job Sheet Recall
      PUT
    • TruckPosition
      POST
    • GPS Device
      POST
    • Jobsheet To Driver
      PUT
    • TrackandTrace
      POST
    • H5 Link
      PUT
  1. oTMS API

TruckAndDriverImport

PUT
/ws/truckAndDriverImport
Truck and Driver Import

Configuration Instructions#

oTMS provides Web Service interfaces in both production and testing environments, where the testing environment is primarily used for integration testing. In both environments, API account credentials must be assigned by the oTMS system administrator before they can be used.

Important Notes#

Please use the public interfaces reasonably. If abnormal calls or any issues affecting system performance are detected, we will impose restrictions on the API account calls, or even deactivate them.

Call Limitations#

Currently, the call limit for this interface is set to a maximum of 10 requests per second per company.

Request

Header Params
Authorization
string 
optional
Basic Authorization. If not empty, this value will be used for authentication first. Otherwise, the username and password in the request message will be used.
Default:
Body Params application/xml
version
string 
required
Version number of the request. Current version number is 0.1
login
string 
optional
Username. Used for API caller authentication. If the Authorization header is not empty, this value will be ignored.
password
string 
optional
Password. Used for API caller authentication. If the Authorization header is not empty, this value will be ignored.
drivers
array[object (DriverImport) {7}] 
optional
List of drivers to be imported. The maximum number of imports per request is 100.
sequence
integer <int32>
required
Sequence number
name
string 
required
Driver's name. If the driver has already registered on the mobile app, the driver's name in the system will be changed to the name registered at that time.
mobile
string 
required
Driver's mobile phone number. In the oTMS system, this is the unique identifier for the driver. After a successful import, the system will immediately send an invitation to this mobile number. It must be a valid single mobile phone number.
Match pattern:
\d{11}
remarks
string 
optional
Remarks
trustedDriver
boolean 
optional
Whether the driver is a trusted driver. Default value is false.
Default:
false
idCard
string 
optional
Driver's ID card number, optional.
updateExists
boolean 
optional
Update if the driver already exists. Default value is false.
Default:
false
trucks
array[object (TruckImport) {9}] 
optional
List of trucks to be imported. The maximum number of imports per request is 100.
sequence
integer <int32>
required
Sequence number
licensedFor
enum<string> 
required
Cargo types the truck is licensed for, can take the following values:
1 - General Cargo
2 - Temperature-Controlled Cargo
3 - Hazardous Materials
4 - Hazardous Materials and Temperature-Controlled Cargo
Allowed values:
TYPE_1TYPE_1_1TYPE_1_2TYPE_2TYPE_3TYPE_3_1TYPE_4
truckType
enum<string> 
required
Type of the truck, can take the following values:
0 - Open Truck
1 - Box Truck
3 - Car Carrier
Allowed values:
OPENCLOSEDANYCAR_TRAILEROIL_TANK_TRUCKFLYING_WING_TRUCKHIGH_TRUCKFLATBED_TRUCKTANK_TRUCKREFRIGERATION_TRUCKSEMI_TRUCK
truckLength
number 
optional
Length of the truck. If it exists, it must be selected from predefined values. If the truck type is not a car carrier, this field is mandatory.
>= 0<= 100
truckCbmCapacity
number 
optional
Truck loading capacity (cubic meters). If it exists, it must be selected from predefined values, based on truck length.
>= 0<= 150
truckMtCapacity
number 
optional
Truck loading capacity (tons). If it exists, it must be selected from predefined values, based on truck length.
>= 0<= 1000
truckPlate
string 
required
Truck license plate number. Must be a valid single license plate number. In the oTMS system, the license plate number is the unique identifier for the truck.
Match pattern:
[一-龥]{1}[a-zA-Z0-9]{6,7}
trailerPlate
string 
optional
Trailer license plate number. Must be a valid single license plate number.
Match pattern:
[一-龥]{1}[a-zA-Z0-9]{5}[一-龥]{1}
remarks
string 
optional
Remarks
connects
array[object (DriverTruckBindDto) {3}] 
optional
List of driver-truck binding relationships to be imported. The maximum number of imports per request is 100.
sequence
integer <int32>
required
Sequence number
truckPlate
string 
required
Truck license plate number. Must be a valid single license plate number. In the oTMS system, the license plate number is the unique identifier for the truck.
Match pattern:
[一-龥]{1}[a-zA-Z0-9]{6,7}
driverMobile
string 
required
Driver's mobile phone number. In the oTMS system, this is the unique identifier for the driver.
Match pattern:
\d{11}
xml
optional
Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<truckAndDriverImportRequest version="0.1" login="login" password="password">
  <drivers>
    <driver sequence = "1">
      <name>AA</name>
      <mobile>147258369</mobile>
      <remarks>remark</remarks>
    </driver>
  </drivers>
  <trucks>
    <truck sequence="1">
      <licensedFor>1</licensedFor>
      <truckType>abcd5</truckType>
      <truckLength>13.8</truckLength>
      <truckCbmCapacity>85</truckCbmCapacity>
      <truckMtCapacity>48</truckMtCapacity>
      <truckPlate>Th11071</truckPlate>
      <remarks>remark</remarks>
    </truck>
  </trucks>
</truckAndDriverImportRequest>

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 PUT 'https://login.otms.com/ws/truckAndDriverImport' \
--header 'Authorization;' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<truckAndDriverImportRequest version="0.1" login="login" password="password">
  <drivers>
    <driver sequence = "1">
      <name>AA</name>
      <mobile>147258369</mobile>
      <remarks>remark</remarks>
    </driver>
  </drivers>
  <trucks>
    <truck sequence="1">
      <licensedFor>1</licensedFor>
      <truckType>abcd5</truckType>
      <truckLength>13.8</truckLength>
      <truckCbmCapacity>85</truckCbmCapacity>
      <truckMtCapacity>48</truckMtCapacity>
      <truckPlate>Th11071</truckPlate>
      <remarks>remark</remarks>
    </truck>
  </trucks>
</truckAndDriverImportRequest>'

Responses

🟢200成功
application/xml
successful operation
Body
version
string 
required
Response version number
responseCode
string 
optional
Global feedback code
importedTrucks
integer <int32>
required
Number of successfully imported trucks
importedDrivers
integer <int32>
required
Number of successfully imported drivers
bindDriverTrucks
integer <int32>
required
Number of successfully bound relationships
truckDetails
array[object (TruckImportResponse) {4}] 
optional
Detailed information about the truck import results
sequence
integer <int32>
required
Sequence number
importStatus
string 
required
Result of the truck import
responseCodes
array[string]
optional
List of response codes. Contains detailed information about the import result.
truckPlate
string 
optional
License plate number, taken from the request.
driverDetails
array[object (DriverImportResponse) {5}] 
optional
Detailed information about the driver import results
sequence
integer <int32>
required
Sequence number
importStatus
string 
required
Result of the driver import
responseCodes
array[string]
optional
List of response codes. Contains detailed information about the import result.
name
string 
optional
Driver's name. If the import is successful and the driver has already registered on the mobile app, this name will be the one registered by the driver. Otherwise, it will be taken from the request.
mobile
string 
optional
Driver's mobile phone number, taken from the request.
connects
array [object {5}] 
optional
Detailed information about the driver import results
sequence
integer <int32>
required
Sequence number
importStatus
string 
required
Result of the driver import
responseCodes
array [object {11}] 
optional
List of response codes. Contains detailed information about the import result.
name
string 
optional
Driver's name. If the import is successful and the driver has already registered on the mobile app, this name will be the one registered by the driver. Otherwise, it will be taken from the request.
mobile
string 
optional
Driver's mobile phone number, taken from the request.
xml
optional
Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<truckAndDriverImportResponse version="0.1">
    <responseCode></responseCode>
    <importedTrucks>0</importedTrucks>
    <importedDrivers>1</importedDrivers>
    <bindDriverTrucks>0</bindDriverTrucks>
    <driverDetails>
        <driver sequence="1">
            <importStatus>SUCCEED</importStatus>
            <name>AA</name>
            <mobile>147258369</mobile>
        </driver>
    </driverDetails>
</truckAndDriverImportResponse>
Previous
Order Assignment to Driver
Next
Assign Driver to Order
Built with