Our API provides a trackShipment endpoint that allows you to track a shipment using its tracking number and delivery company name. This guide explains how to retrieve shipment tracking details, including status updates and tracking history.
Instructions
Step 1: API Endpoint
- To track a shipment, use the following POST endpoint:
https://api.tryoto.com/rest/v2/trackShipment
Step 2: Authorization
- A valid Bearer Token must be included in the request headers for authentication
Step 3: Request Body Parameters
- The request body should be in JSON format and include the following fields:
| Field Name | Required | Type | Description |
|---|---|---|---|
trackingNumber | Yes | String | The tracking number of the shipment. |
deliveryCompanyName | Yes | String | The name of the delivery company handling the shipment. |
statusHistory | No | Boolean | Set to true to retrieve the shipment's status history. |
brandName | No | String | The brand name associated with the shipment. |
Step 4: Example Request
Using cURL:
curl --location 'https://api.tryoto.com/rest/v2/trackShipment' \ --header 'Authorization: Bearer {{token}}' \ --data '{ "trackingNumber": "290692134777", "deliveryCompanyName":"smsaecom", "statusHistory":false }'
Step 5: Example Response
- A successful response will include tracking details and shipment history (if requested):
{ "trackingUrl": "https://www.smsaexpress.com/trackingdetails?tracknumbers%5B0%5D=290692134777", "success": true, "items": [ { "dcStatus": "DATA RECEIVED", "updateStatusDate": true, "shipmentId": "290692134777", "otoStatus": "shipmentCreated", "success": true, "dcUpdateDate": "2024-05-08T11:39:00", "dcDescription": "DATA RECEIVED - Online Data Submitted" } ] }