REST API - Arrival Times
1Â Â General
1.1Â Â Introduction
Below is a description of the interface that the Shiptrack.com service offers. All queries are made via HTTPS. The HTTP headers listed in the table below must be set with the values listed. The caller is authenticated at the interface using a previously defined username and password using the HTTP Basic Authentication Method (refer to RFC2617).
HTTP-Header | Value |
---|---|
Content-Type | application/json |
Â
1.3Â Â Error handling
To ensure that the caller receives a meaningful error message when an error occurs in the interface, the interface sends a response with an HTTP status code that represents the error. In addition, a message is returned that contains detailed information about the error. For example, for the error that a customer is specified as parameter that does not exist, the HTTP status code 404 is returned. The corresponding detail error message looks like this:
{
"error": {
"code": "406",
"message": "Not all required values are available!"
}
}
Â
Below is a table with all known Shiptrack.com specific error codes for this interface:
HTTP-Status | Description |
---|---|
401 | Authentication error. |
403 | Interface usage was not purchased. |
404 | No eta found for provided information. |
406 | Mandatory values missing. |
Â
Â
2Â Â Request
2.1Â Â Endpoint path structure
To request an arrival time, the endpoint URL must have the following structure:
Â
2.2Â Â Request body
Field name | Data type | Description | Required |
---|---|---|---|
CarrierName | String | Carrier abbreviation | X |
SenderZip | String | Sender postal code | Â |
SenderIsoA2 | String | Two-digit sender country code (ISO3166) | X |
RecipientZip | String | Recipient postal code | Â |
RecipientIsoA2 | String | Two-digit recipient country code (ISO3166) | X |
ServiceType | String | Service type of the carrier | Â |
QualityType | String | Accuracy specification | X |
UseAdvancedSearch | String | Search in all quality types | Â |
Â
2.3Â Â Examples
2.3.1Â Â GET
2.3.2Â Â POST
{
"CarrierName": "UPS",
"SenderZip": "44565",
"SenderIsoA2": "DE",
"RecipientZip": "00049",
"RecipientIsoA2": "IT",
"ServiceType": null,
"QualityType": "ZipToZip",
"UseAdvancedSearch": "True"
}
Â
Â
Â
3Â Â Response
If the call was successful, the following will be returned:
Field name | Data type | Description |
---|---|---|
CarrierName | String | Carrier short name (see 4 Carrier Abbreviation) |
SenderZip | String | Sender postal code |
SenderIsoA2 | String | Two-digit sender country code (ISO3166) |
RecipientZip | String | Recipient postal code |
RecipientIsoA2 | String | Two-digit recipient country code (ISO3166) |
ServiceType | String | Service type of the carrier |
QualityType | String | Accuracy specification |
UseAdvancedSearch | String | Search in all quality types |
MedEtaInHours | String | Running time in hours (median) |
MedEtaTime | String | Delivery time (median) |
3.1Â Â Possible quality types
Key | Description |
---|---|
ZipToZipWithService | Search by CarrierName, SenderIsoA2, SenderZip, RecipientIsoA2, RecipientZip, ServiceType |
ZipToZip | Search by CarrierName, SenderIsoA2, SenderZip, RecipientIsoA2, RecipientZip |
CountryToZip | Search by CarrierName, SenderIsoA2, RecipientIsoA2, RecipientZip |
ZipToCountry | Search by CarrierName, SenderIsoA2, SenderZip, RecipientIsoA2 |
CountryToCountry | Search by CarrierName, SenderIsoA2, RecipientIsoA2 |
Â
{
"@odata.context": "https://service.shiptrack.com/clients/00000000-0000-0000-0000-000000000000/$metadata#arrivaltimes/$entity",
"Id": "ed0c88b5-8d5d-489c-b341-79eee0c388f1",
"SenderZip": "44565",
"SenderIsoA2": "DE",
"RecipientZip": "00049",
"RecipientIsoA2": "IT",
"ServiceType": null,
"CarrierName": "UPS",
"QualityType": "ZipToZip",
"ServiceType": null,
"UseAdvancedSearch": True
"MedEtaInHours": "55",
"MedEtaTime": "09:42:00"
}
Â
Â
Â
4Â Â Carrier abbreviation
All currently known carrier abbreviations are listed below.
Â