ShipEngine allows you to track a package for a given carrier and tracking number. Please see our docs to learn more about tracking shipments.
The TrackUsingCarrierCodeAndTrackingNumber
method requires the carrier code and tracking number of the shipment being tracked.
The TrackUsingCarrierCodeAndTrackingNumber
method returns tracking information associated with the shipment for the carrier code and tracking number.
You can view the properties here TrackUsingCarrierCodeAndTrackingNumberTypes.Result
.
using ShipEngineSDK;
using System.Threading.Tasks;
using System;
using ShipEngineSDK.TrackUsingCarrierCodeAndTrackingNumber;
public class Example
{
public async Task<Result> TrackUsingCarrierCodeAndTrackingNumber()
{
var shipEngine = new ShipEngine("api_key");
try
{
var result = await shipEngine.TrackUsingCarrierCodeAndTrackingNumber("9405511899560775488591", "stamps_com");
return result;
}
catch (ShipEngineException e)
{
Console.WriteLine("Error getting tracking response");
throw e;
}
}
}
{Result}
TrackingNumber: "9405511899560775488591"
StatusCode: TrackingStatusCode.NY
StatusDescription: TrackingStatusDescription.NotYetInSystem
CarrierDetailCode: null
CarrierStatusCode: "-2147219283"
CarrierStatusDescription: "A status update is not yet available for this tracking number. More information will become available when USPS receives the tracking information, or when the package is received by USPS."
ShipDate: null
EstimatedDeliveryDate: null
ActualDeliveryDate: null
ExceptionDescription: null
Events: ...