(TrackingStatus)
If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment
from the Transaction object.
When using your Test token for tracking, you need to use Shippo's
predefined tokens for testing different tracking statuses. You can find more information in our
Tracking tutorial on how to do this, and what the
payloads look like.
Registers a webhook that will send HTTP notifications to you when the status of your tracked package changes. For more details on creating a webhook, see our guides on Webhooks and Tracking.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.TrackingStatus.CreateAsync(
tracksRequest: new TracksRequest() {
Carrier = "usps",
Metadata = "Order 000123",
TrackingNumber = "9205590164917312751089",
},
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TracksRequest |
TracksRequest | ✔️ | N/A | |
ShippoApiVersion |
string | ➖ | Optional string used to pick a non-default API version to use. See our API version guide. | 2018-02-08 |
Error Type | Status Code | Content Type |
---|---|---|
Shippo.Models.Errors.SDKException | 4XX, 5XX | */* |
Returns the tracking status of a shipment using a carrier name and a tracking number.
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08"
);
var res = await sdk.TrackingStatus.GetAsync(
trackingNumber: "<value>",
carrier: "<value>",
shippoApiVersion: "2018-02-08"
);
// handle response
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TrackingNumber |
string | ✔️ | Tracking number | |
Carrier |
string | ✔️ | Name of the carrier | |
ShippoApiVersion |
string | ➖ | Optional string used to pick a non-default API version to use. See our API version guide. | 2018-02-08 |
Error Type | Status Code | Content Type |
---|---|---|
Shippo.Models.Errors.SDKException | 4XX, 5XX | */* |