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 cost update

POST
/ws/orderRevenue
Order Update

Order Cost Update Interface#

Through the Order Cost Update Interface, trunk line costs for orders can be updated in bulk. The maximum number of orders that can be updated in a single request is 100.

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 20 requests per second per company.

Request

Header Params
Authorization
string 
optional
Basic Authorization. If not empty, this value will be prioritized for authentication. Otherwise, the username and password in the request body 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. This value will be ignored if the Authorization header is not empty.
password
string 
optional
Password. Used for API caller authentication. This value will be ignored if the Authorization header is not empty.
orders
array[object (UpdatedOrderRevenue) {6}] 
required
List of orders to be updated. A single request can update up to 100 orders.
erpNumber
string 
optional
Unique order number in the external system
orderNumber
string 
optional
oTMS order number. If erpNumber is provided, the oTMS order number is considered invalid.
lineHaul
string 
optional
Base rate, precise to 12 digits with 2 decimal places
Match pattern:
0?|((([1-9]\d{0,9})|0)(\.\d{1,2})?|10000000000(.0{1,2})?)
chargingLtlUnit
enum<string> 
optional
Base freight charge unit, including the following constants:
CBM - Cubic meters
MT - Tons
KG - Kilograms
CUSTOM - Other
Allowed values:
CBMMTKGLDMCUSTOMCARGOCATEGORYCATEGORY_BY_CBMCATEGORY_BY_KGCATEGORY_BY_MTCONTAINERKM
revokeCompensation
boolean 
optional
Whether to revoke compensation, default is FALSE
Default:
false
revokeSpecial
boolean 
optional
Whether to revoke special fees, default is FALSE
Default:
false
Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orderRevenueUpdateRequest version="0.1" login="login" password="password">
    <orders>
        <order sequence="1">
            <orderNumber>YLDFCNYP000264</orderNumber>
            <lineHaul>912.11</lineHaul>
        </order>
    </orders>
</orderRevenueUpdateRequest>

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/orderRevenue' \
--header 'Authorization;' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orderRevenueUpdateRequest version="0.1" login="login" password="password">
    <orders>
        <order sequence="1">
            <orderNumber>YLDFCNYP000264</orderNumber>
            <lineHaul>912.11</lineHaul>
        </order>
    </orders>
</orderRevenueUpdateRequest>'

Responses

🟢200成功
application/xml
successful operation
Body
version
string 
required
Response version number
responseCode
string 
optional
Global feedback code
processedOrders
string 
optional
Number of processed orders
orders
array[object (UpdateResult) {7}] 
optional
List of processed orders
sequence
integer <int32>
optional
Sequence number
erpNumber
string 
optional
Order ERP number
orderNumber
string 
optional
oTMS order number
updateStatus
string 
optional
DRAFT - Order is in draft status after update
UPDATED - Order updated successfully
FAILED - Order update failed
NOT UPDATED - No changes to the order
strResponseCodes
array[string]
optional
errorColumnName
string 
optional
Corresponding field name
strErrorMsgs
array[string]
optional
Error code prompt
object 
optional
Single request feedback code
7001
string 
optional
is an invalid data type.
7008
string 
optional
Orders with received receipts are not allowed to be updated.
7009
string 
optional
Order does not exist.
7054
string 
optional
order optimization in progress, update rejected.
7055
string 
optional
integrated orders are not allowed to be updated.
7056
string 
optional
Orders with already included in the shipping document cannot be updated.
7100
string 
optional
other errors.
Example
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <version>string</version>
  <responseCode>string</responseCode>
  <processedOrders>string</processedOrders>
  <order>
    <orders>
      <sequence>
        <_content>0</_content>
      </sequence>
      <erpNumber>string</erpNumber>
      <orderNumber>string</orderNumber>
      <updateStatus>string</updateStatus>
      <strResponseCodes>
        <strResponseCodes>string</strResponseCodes>
      </strResponseCodes>
      <errorColumnName>string</errorColumnName>
      <strErrorMsgs>
        <strErrorMsgs>string</strErrorMsgs>
      </strErrorMsgs>
    </orders>
  </order>
  <Error code prompt>
    <7001>string</7001>
    <7008>string</7008>
    <7009>string</7009>
    <7054>string</7054>
    <7055>string</7055>
    <7056>string</7056>
    <7100>string</7100>
  </Error code prompt>
</root>
Previous
Price File Matching
Next
Shipper/Receiver export
Built with