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
- Log in with the provided API username and password using
POST /openapi/Auth/Login. - Send the returned
tokenvalue in theAuthorization: Bearer <token>header for all subsequent requests. - The token is valid for 24 hours (the
expirationfield 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
- All bodies are JSON. Field names are case-insensitive; responses return camelCase.
- Dates are in
yyyy-MM-ddTHH:mm:ss(ISO 8601) format and interpreted in Turkey time. - Some endpoints return only a message text; these responses come as
text/plain(sendingAccept: application/jsonreturns the same text as a JSON string). - Many endpoints use a
{ success, message, code, data }envelope; ifsuccess: false, HTTP status is400and the error reason is in themessagefield. - If the body cannot be parsed as JSON, a
400with ASP.NET validation response (application/problem+json) is returned. - Unexpected server errors return
500with{ "Message": "Internal Server Error", "StatusCode": 500 }.
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
- Test:
https://openapi.tms.awstest.hebiar.com - Prod:
https://openapi.tms.prod.hebiar.com
Authentication
Carrier Selection
Order and Shipment Registration
- POST /openapi/Order/SaveOrder — Save order
- POST /openapi/Order/QuickLabel — Quick label
- POST /openapi/Order/UnArchiveOrder — Restore archived order
- POST /openapi/Consignment/SaveConsignment — Record shipment
- POST /openapi/IntegrationHistory/GetTicketNumberStatus — Query record (ticket) status
Shipment Update and Cancellation
- POST /openapi/Consignment/UpdateConsignmentAddress — Update consignment address
- POST /openapi/Consignment/UpdateConsignmentCarrier — Change shipment carrier
- POST /openapi/Consignment/UpdateShippingInfo — Update shipment information
- POST /openapi/Consignment/CancelConsignment — Cancel the shipment
- POST /openapi/Shipment/CancelShipmentOnCarrier — Cancel shipment at carrier
- POST /openapi/Shipment/RecallShipment — Recall shipment from carrier
Label
- POST /openapi/Document/CreateLabel — Create label
- POST /openapi/Document/CreateLabelInAdvance — Create label in advance
- POST /openapi/Document/GetCreatedLabel — Retrieve created label
Tracking and Status
- POST /openapi/Consignment/GetConsignmentInfo — Order and shipment information
- POST /openapi/Shipment/GetShipmentStatus — Query package status
- POST /openapi/Report/GetShipmentReport — Changed shipments report
Status Notification
- POST /openapi/Shipment/UpdateShipmentVendorTrackingData — Report tracking information
- POST /openapi/Shipment/UpdateShipmentVendorTrackingDataAndCarrier — Notify tracking information and carrier
- POST /openapi/Shipment/UpdateShipmentStatusForAlternativeDelivery — Alternative delivery started
- POST /openapi/Shipment/UpdateAlternativeDeliveryToDelivered — Alternative shipment delivered
- POST /openapi/Shipment/UpdateShipmentAttributeData — Update shipment custom fields
- POST /openapi/DeliveryReceipt/UpdateShipmentDelivery — Enable/disable delivery receipt status
- POST /deliveryotpinfo — Delivery Point OTP Notification
Return
- POST /openapi/Return/SaveReturnCode — Create return code
- POST /openapi/Return/GetReturnCodeStatus — Return status
- POST /openapi/Return/GetReturnLabel — Return label
- POST /openapi/Return/CancelReturnCode — Cancel return code
- POST /openapi/Return/GetAvailableReturnDates — Available return appointment dates