How to Track a Shipment

Modified on Sat, 1 Feb at 10:16 PM

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



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 NameRequiredTypeDescription
trackingNumberYesStringThe tracking number of the shipment.
deliveryCompanyNameYesStringThe name of the delivery company handling the shipment.
statusHistoryNoBooleanSet to true to retrieve the shipment's status history.
brandNameNoStringThe 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"

        }

      ]

    }

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article