This API is used for when an order is sent to Spreetail, where the tracking information for the order needs to be sent back to that marketplace to confirm the item has been shipment.

Get recent tracking updates

GET /api/v0/shipments/tracking-updates?hours=:hours

Returns tracking and package details for shipments updated within the last hours. The hours value allows a maximum of 720 hours.

Get tracking updates

GET /api/v0/shipments/tracking-updates?searchBy=:searchBy\&startDate=:startDate\&endDate=:endDate

Returns tracking and package details for shipments between the given startDate and endDate. The optional searchBy parameter gives the option to look for orders that have been created, updated, or replaced during the time period.

Parameter

Type

Detail

searchBy

string

May be one of the following:

  • created

  • updated

  • replaced

startDate

date/time

ISO 8601 formatted date/time
Example: 2024-07-01T12:34:56+00:00

endDate

date/time

ISO 8601 formatted date/time
Example: 2024-07-07T12:34:56+00:00

Sample Response

{
  "data": [
    {
      "packageId": "3d96ab61-9cce-4bb2-b695-7cea0468dc2d",
      "customerOrderId": "user-provided-order-id",
      "packageContents": [
        {
          "productId": "123456",
          "sku": "SKU-COMPONENT-1",
          "upc": "0123456789012",
          "quantity": 1,
          "customerLineItemId": "1",
          "lineItemProductId": "123455"
        },
        {
          "productId": "123457",
          "sku": "SKU-COMPONENT-2",
          "upc": "0123456789012",
          "quantity": 1,
          "customerLineItemId": "2",
          "lineItemProductId": "123455"
        }
      ],
      "trackingDetail": {
        "trackingNumber": "123456789123",
        "trackingUrl": "https://www.fedex.com/fedextrack/?trknbr=123456789123",
        "shippingCarrier": "fedexground",
        "serviceLevel": "Ground",
        "originFc": "IND01",
        "shipDate": "2024-03-06T12:30:00.000+00:00",
        "estimatedDeliveryDate": "2024-03-07T00:00:00+00:00",
        "trackingEvents": [
          {
            "eventType": "label_generated",
            "eventTimestamp": "2024-03-06T12:30:00.000+00:00"
          },
          {
            "eventType": "tendered_to_carrier",
            "eventTimestamp": "2024-03-07T15:00:00+00:00"
          },
          {
            "eventType": "delivered",
            "eventTimestamp": "2024-03-08T20:00:00+00:00"
          }
        ]
      },
      "lastUpdated": "2024-03-14T21:00:00.00+00:00",
      "dateReplaced": "2024-03-21T21:00:00.00+00:00",
      "replacedByPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6""
    }
  ],
  "requestId": "0HN27ELI04P5N:00000002"
}
Package
packageIdUnique identifier for the package
customerOrderIdOrder ID provided when calling the Create Orders endpoint
lastUpdatedTimestamp for last update
dateReplaced(Optional) If provided, the shipment has been replaced by the corresponding replacedByPackageId value
replacedByPackageId(Optional) The packageId value the has replaced this package
packageContents
productIdProduct ID for the item contained within the shipment
skuSKU for the for the item contained within the shipment
upcUPC for the for the item contained within the shipment
quantityThe quantity included in the specified shipment
customerLineItemIdThe customerLineItemId provided when calling the Create Orders endpoint
lineItemProductIdThe original productId provided when calling the Create Orders endpoint. This value may differ from the productId returned above due to bundling of items

trackingDetail

trackingNumber

Tracking number provided by the carrier

trackingUrl

URL available for customer tracking

shippingCarrier

The carrier used to ship the package. This may be one of the following:

  • abf
  • amazon
  • ceva
  • efw
  • fedex2day
  • fedexfirst
  • fedexfirstovernight
  • fedexfreight
  • fedexground
  • fedexovernight
  • freightshipping
  • lsoecommerce
  • lsoground
  • ontrac
  • other
  • pilot
  • rlcarriers
  • saia
  • spreetaildelivery
  • uds
  • upsground
  • usps
  • uspsexpressmail
  • uspsfirstclass
  • uspsfirstclassinternational
  • uspspriority
  • uspsprioritymailinternational

serviceLevel

The Carrier's service level used to ship the package. This may be one of the following:

  • ground
  • two_day
  • next_day
  • same_day
  • freight
  • international

originFc

The fulfillment center from where the package originated

shipDate

Date of shipment

estimatedDeliveryDate

Estimated delivery date provided by the carrier at time of shipping

lastUpdated

Timestamp of last change

trackingEvents

Listing of events for the shipment

trackingEvents.eventType

The type of event. Can be one of the following:

  • label_generated
  • tendered_to_carrier
  • delivered

trackingEvents.eventTimestamp

Timestamp for the event

Return Tracking Detail for a Single Order

GET /api/v0/orders/:customerOrderId/packages

This method will return tracking and package details for a single order, based on the provided customerOrderId. The returned data provided uses the same schema as the /shipments/tracking-updates call.

Language
Credentials
http
Click Try It! to start a request and see the response here!