Menu
Docs
Feedback
Login
You are viewing a section of Superface that will be
deprecated in Q4 2023
. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit
superface.ai/docs/migrate
.
Shipment information
delivery-tracking/shipment-info@1.1.1
2 providers
Retrieve Shipment Status
ShipmentInfo
Get the current shipment status.
Input
Shipment tracking number
Carrier
Result
Carrier
Status
Origin
Shipment tracking number
Destination
Events
Estimated delivery date
Integrate
1.
Choose a provider
Mock implementation
dhl
shippo
Request a missing provider
2.
Use
ShipmentInfo
with
mock
in your code
Below instructions are for our Node.js SDK.
Use OneService for other languages.
npm
i
@superfaceai/one-sdk
Copy
Copied!
Copy
Copied!
Structure details
Input (object)
trackingNumber
required
The identifier of shipment.
string
carrier
optional
The shipment carrier identification to narrow down the results.
string
Example
Copy
Copied!
Result (list of objects)
carrier
required
The name of the carrier responsible for delivery.
string
status
required
The latest shipment event.
object
timestamp
required
The date and time in ISO 8601 format of the event.
string
statusCode
required
The shipment status of the event.
enum
pre_transit
transit
delivered
failure
unknown
statusText
required
A description of the current shipment status.
string
location
optional
The location of the shipment.
object
address
required
object
countryCode
optional
A short text string code (ISO 3166-1 alpha-2 country code) specifying the country.
string
postalCode
optional
Text specifying the postal code for an address.
string
addressLocality
optional
Text specifying the name of the locality, for example a city.
string
streetAddress
optional
The street address expressed as free form text. The street address is printed on paper as the first lines below the name.
string
origin
required
A postal address with the origin of the shipment.
object
address
required
object
countryCode
optional
A short text string code (ISO 3166-1 alpha-2 country code) specifying the country.
string
postalCode
optional
Text specifying the postal code for an address.
string
addressLocality
optional
Text specifying the name of the locality, for example a city.
string
streetAddress
optional
The street address expressed as free form text. The street address is printed on paper as the first lines below the name.
string
trackingNumber
required
The identifier of shipment.
string
destination
required
A postal shipping address.
object
address
required
object
countryCode
optional
A short text string code (ISO 3166-1 alpha-2 country code) specifying the country.
string
postalCode
optional
Text specifying the postal code for an address.
string
addressLocality
optional
Text specifying the name of the locality, for example a city.
string
streetAddress
optional
The street address expressed as free form text. The street address is printed on paper as the first lines below the name.
string
events
required
A list of delivery tracking events.
list
timestamp
required
The date and time in ISO 8601 format of the event.
string
statusCode
required
The shipment status of the event.
enum
pre_transit
transit
delivered
failure
unknown
statusText
required
A description of the current shipment status.
string
location
optional
The location of the shipment.
object
address
required
object
countryCode
optional
A short text string code (ISO 3166-1 alpha-2 country code) specifying the country.
string
postalCode
optional
Text specifying the postal code for an address.
string
addressLocality
optional
Text specifying the name of the locality, for example a city.
string
streetAddress
optional
The street address expressed as free form text. The street address is printed on paper as the first lines below the name.
string
estimatedDeliveryDate
required
Estimated date and time of delivery.
string
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
ShipmentInfo
Author
@superface
Source
View source
Verified