Skip to content

Latest commit

 

History

History
109 lines (78 loc) · 10.4 KB

File metadata and controls

109 lines (78 loc) · 10.4 KB

TrackingStatus

(TrackingStatus)

Overview


If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment from the Transaction object.

A tracking status of a package is an indication of current location of a package in the supply chain. For example, sorting, warehousing, or out for delivery. Use the tracking status object to track the location of your shipments.

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.

Available Operations

  • Create - Register a tracking webhook
  • Get - Get a tracking status

Create

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.

Example Usage

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

Parameters

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

Response

Track

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*

Get

Returns the tracking status of a shipment using a carrier name and a tracking number.

Example Usage

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

Parameters

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

Response

Track

Errors

Error Type Status Code Content Type
Shippo.Models.Errors.SDKException 4XX, 5XX */*