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

Order Assignment to Driver

POST
/ws/assignDriver
Order Driver Assignment
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. Otherwise, the username and password in the request body will be used.
Default:
Body Params application/xml
version
string 
required
Request version number. 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.
driverAssignments
array[object (DriverAssignment) {9}] 
optional
List of driver assignments
sequence
integer <int32>
optional
Sequence number
clientCode
string 
optional
Customer code of the order. Only applicable to supplier accounts.
orderNumber
string 
optional
oTMS order number of the order. At least one of this field or the erpNumber field must be provided.
erpNumber
string 
optional
ERP order number of the order. At least one of this field or the orderNumber field must be provided.
branch
string 
optional
Branch name of the order.
ignoreOrderMatch
boolean 
optional
Whether to ignore whether the truck type matches the order, default is false.
Default:
false
driverTruckInfos
array[object (DriverTruckInfo) {4}] 
optional
List of driver and truck information
matchTariff
boolean 
optional
Whether to match tariff files
Default:
false
tariffSelectionMode
enum<string> 
optional
Tariff file matching rule
Allowed values:
CHEAPESTSHORTEST_LEADTIME
Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assignDriverRequest version="0.1" login="login" password="password">
    <driverAssignments>
        <driverAssignment sequence="1">
            <clientCode>WWUTAUAV</clientCode>
            <orderNumber>WWUTAUAV966185</orderNumber>
            <branch></branch>
            <driverTruckInfos>
                <driverTruckInfo>
                    <truckPlate>TA67890</truckPlate>
                    <driverName></driverName>
                    <driverMobile>123456789</driverMobile>
                </driverTruckInfo>
            </driverTruckInfos>
        </driverAssignment>
    </driverAssignments>
</assignDriverRequest>

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://login.otms.com/ws/assignDriver' \
--header 'Authorization;' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assignDriverRequest version="0.1" login="login" password="password">
    <driverAssignments>
        <driverAssignment sequence="1">
            <clientCode>WWUTAUAV</clientCode>
            <orderNumber>WWUTAUAV966185</orderNumber>
            <branch></branch>
            <driverTruckInfos>
                <driverTruckInfo>
                    <truckPlate>TA67890</truckPlate>
                    <driverName></driverName>
                    <driverMobile>123456789</driverMobile>
                </driverTruckInfo>
            </driverTruckInfos>
        </driverAssignment>
    </driverAssignments>
</assignDriverRequest>'

Responses

🟢200成功
application/xml
Successful operation
Body
version
string 
required
Response version number
responseCode
array [object {2}] 
optional
Global feedback code
0
string 
optional
Customer verification failed.
1
string 
optional
Unsupported request version.
successfulAssignments
integer <int32>
required
Number of successful assignment operations
assignResults
array [object {6}] 
optional
List of assignment operations
sequence
integer <int32>
optional
Sequence number
assignStatus
string 
optional
Result of the assignment operation, which can take one of the following two values:
DISPATCHED - Assignment succeeded, no error occurred
FAILED - Assignment failed
assignedOrders
integer <int32>
optional
Number of orders assigned to the driver in this operation.
orderNumbers
array[string]
optional
List of oTMS order numbers representing all orders assigned to the driver in the assignment operation.
responseInfos
array[object (ResponseInfo) {4}] 
optional
List of driver-truck and response code information
responseCodes
array [object {21}] 
optional
Single request feedback code
Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assignDriverResponse version="0.1">
    <responseCode></responseCode>
    <successfulAssignments>0</successfulAssignments>
    <assignResults>
        <assignResult sequence="1">
            <assignStatus>FAILED</assignStatus>
            <responseInfos>
                <responseInfo>
                    <truckPlate>TA67890</truckPlate>
                    <driverName></driverName>
                    <driverMobile>123456789</driverMobile>
                    <responseCodes>
                        <responseCode>1131</responseCode>
                    </responseCodes>
                </responseInfo>
            </responseInfos>
        </assignResult>
    </assignResults>
</assignDriverResponse>
Previous
Delete delivery point
Next
TruckAndDriverImport
Built with