TMS API

CommerceLab TMS (CargoHub) Open API enables you to transfer your orders and shipments to the TMS, query suitable carriers and service types for the cart, obtain shipping labels, track shipment status, and manage return processes.

Authentication

  1. Log in with the provided API username and password using POST /openapi/Auth/Login.
  2. Send the returned token value in the Authorization: Bearer <token> header for all subsequent requests.
  3. The token is valid for 24 hours (the expiration field provides the expiry time). Re-login after expiration.

Requests without a token or with an expired token return 401 Unauthorized (no body).

Organization and account codes

Most request bodies expect clientCode (organization code) and accountCode (account code). These codes are provided by CommerceLab; if your API user lacks permission for the account, the request is rejected with the message User does not have permission to operate on the account. These two fields are deprecated in return endpoints: identity is resolved from the token.

Request and response format

Request limits

There is a limit of 200 requests per 10 seconds per user across all endpoints. For Shipment/GetShipmentStatus and Shipment/UpdateShipmentAttributeData, the limit is 1 request per second. Exceeding the limit returns 429. Auth/Login is not subject to limits.

Asynchronous registration (ticket)

Order/SaveOrder and Consignment/SaveConsignment requests are queued and return a ticketNumber. Query the result with IntegrationHistory/GetTicketNumberStatus. If asynchronous registration is disabled for your organization, the request is processed immediately and returns synchronous: true.

Environments

Authentication

Carrier Selection

Order and Shipment Registration

Shipment Update and Cancellation

Label

Tracking and Status

Status Notification

Return

Master Data