Product Feature
Register shipments in bulk, time-based track & trace, push full tracking information, 7 package status.
Develop Documentation
Get the API access key
Log in to the management console -> Settings ->Security-> Access Key, you can get the access key. If you need to change the key, you can directly operate the "Change key". If you change the key, the new key will take effect within 5 minutes. Once the key takes effect, the old one will expire immediately.
API endpoint
API endpoint: https://api.17track.net/track/v1
Data request
All API interfaces use the http(s) POST method to submit requests. The request and response data are in UTF-8 encoded JSON format. All request base addresses start with http(s)://api.17track.net/track/v1/. All requests need to be submitted with the key as the request header, with the header name 17token, as shown below (registration number request):
curl -X POST
--header '17token:your secret key'
--header 'Content-Type:application/json'
--data '[{"number":"RR123456789CN"}]'
https://api.17track.net/track/v1/register
Data encapsulation
{
"code": 0,
"data": {
"accepted":[],
"rejected":[]
}
}
The response results are in a unified data encapsulation format, as shown below;
Name | Description |
---|---|
Name | Description |
code | Error status code, 0 means no error, and for other errors refer to error status code |
data | Data content of the response object encapsulation |
- accepted | For the normal processed part of the response in the request |
- rejected | For the abnormal processed part of the response in the request |
Response status
HTTP status code
Name | Description |
---|---|
200 | The request is processed normally, and the returned data needs to be checked for the specific processing result. |
401 | Request unauthorized, wrong key, access IP not in whitelist or account disabled. |
404 | The requested URL address is incorrect. |
429 | Access frequency exceeds limit. |
500 | Server Error. |
503 | Service temporarily unavailable. |
Error status code
The error status code is a concrete representation of the data processing result based on the return of the http status code.
Name | Description |
---|---|
0 | Success |
-18010001 | IP address is not in whitelist. |
-18010002 | Access token is invalid. |
-18010003 | Internal service error, please retry later. |
-18010004 | Account is disabled. |
-18010005 | Unauthorized access. |
-18010010 | The field of {0} is required. |
-18010011 | The value of {0} is invalid. |
-18010012 | The format of {0} is invalid. |
-18010013 | Submitted data is invalid. |
-18010014 | Request parameter number exceeds 40. |
-18010015 | The value {0} of field {1} is invalid. |
-18010016 | Only postal logictics can set up the last-mile shipping methods. |
-18010018 | The 'param' field is required for this tracking. Please provide Alpha-2 country code and postal code. Example: 'FR-12345'. |
-18010019 | The 'param' field is required for this tracking. Please provide postal code. Example: '3078CM'. |
-18010020 | The 'param' field is required for this tracking. Please provide phone number. Example: '8888'. |
-18010022 | Additional information is needed to continue tracking your package. Example: '2024-01-01'. |
-18010201 | Webhook URL is required. |
-18010202 | Incorrect URL format of 'Webhook'. |
-18010203 | WebHook test failed, Http status code: {0}. |
-18010204 | Webhook URL not set, can't push data. |
-18010205 | Incorrect IP format. |
-18010206 | Push failed. |
-18019901 | The tracking number {0} has been registered, don't need to repeat registration |
-18019902 | The tracking number {0} does not register, please register first |
-18019903 | Carrier cannot be detected. |
-18019904 | Retrack is not allowed. You can only retrack stopped number. |
-18019905 | Retrack is not allowed. You can only retrack each number once. |
-18019906 | Stop tracking is not allowed. You can only stop numbers that are being tracked. |
-18019907 | Exceeded daily request limit. |
-18019908 | Quota is not enough for use. |
-18019909 | No tracking information at this time. |
-18019910 | The carrier is value {0} is not correct. |
-18019801 | The registration information of multiple carriers with the same tracking number exists, please specify the existing carrier parameters [carrier_old]. |
-18019802 | Submitted new carrier parameter [carrier_new] {0} may be incorrect. |
-18019803 | The parameter of the carrier requesting for change cannot be the same. |
-18019804 | New carrier parameter [carrier_new] or [final_carrier_new] requesting for change must be specified. |
-18019805 | The tracking number {1} for the specified carrier {0} is not registered, or the existing carrier parameter [carrier_old] is incorrect. |
-18019806 | Change carrier for stopped tracking number is not allowed. Please activate it first before submitting a change of carrier request. |
-18019807 | Exceeded the maximum number of carrier revisions. |
-18019808 | The tracking result has not been returned after the latest registration or modification.Please wait for the tracking result to be returned before changing it. |
-18019809 | The registration information of the carrier with tracking number {0} already exists and cannot be changed to a duplicate registration information. |
-18019810 | Data that meet the update condition are not unique. |
-18019811 | No valid data modification item. |
Parameter format
Tracking number: The tracking number must be a continuous combination of 5 to 50 letters and numbers.
Carrier: The carrier code must be a valid shipping carrier's Key. For details, please refer to the carrier code.
Basic information
Carrier code
- Visit https://res.17track.net/asset/carrier/info/apicarrier.all.json for all available carriers currently supported. As we keep adding and supporting more and more carriers, please check and update it periodically. The relevant interfaces that are using the carrier code must be submitted by using the code "Key" in our own defined carrier information.Download carrier list.
Additional parameters for tracking
- Additional params are required to track the shipments of some carriers, please refer to the following:
Carrier Name | Carrier Code | Param | Sample | Require |
---|---|---|---|---|
Bpost | 2061 | PostalCode | 1000 | FALSE |
DHL Paket | 7041 | PostalCode | 1000 AA | FALSE |
PostNL | 14041 | DestCountry | FR | TRUE |
PostNL | 14041 | PostalCode | 1000 AA | FALSE |
FedEx | 100003 | ShipDate | 2024/1/1 | FALSE |
GLS | 100005 | PostalCode | TRUE | |
GLS (IT) | 100024 | PostalCode | FALSE | |
BRT Bartolini(DPD) | 100026 | PostalCode | 1000 AA | FALSE |
Colis Prive(Colis Privé) | 100027 | PostalCode | 12345 | FALSE |
J&T Express (ID) | 100074 | PhoneNumber | 8888 | TRUE |
Caribou | 100078 | PostalCode | 1000 | FALSE |
Commonline | 100155 | PostalCode | 1000 | FALSE |
XDP EXPRESS | 100167 | PostalCode | LS27 0BN | TRUE |
GLS Spain (National) | 100189 | PostalCode | 123456 | TRUE |
GLS (Croatia) | 100207 | PostalCode | TRUE | |
J&T Express (TH) | 100271 | PhoneNumber | 8888 | TRUE |
GLS (HU) | 100280 | PostalCode | TRUE | |
GLS (CZ) | 100281 | PostalCode | TRUE | |
GLS (SK) | 100282 | PostalCode | TRUE | |
GLS (SI) | 100283 | PostalCode | TRUE | |
GLS (RO) | 100284 | PostalCode | TRUE | |
Mondial Relay | 100304 | PostalCode | 123456 | TRUE |
GLS (PT) | 100316 | PostalCode | TRUE | |
DPD (BE) | 100321 | PostalCode | 1000 AA | FALSE |
GEODIS | 100356 | PostalCode | 1000 AA | FALSE |
Paack | 100364 | PostalCode | 12345 | TRUE |
GLS (NL) | 100384 | PostalCode | 12345 | TRUE |
J&T Express (MX) | 100388 | PhoneNumber | 8888 | TRUE |
Pall-Ex (UK) | 100394 | PostalCode | CO14 8LF | TRUE |
GEL Express Logistik | 100396 | PostalCode | 1000 AA | FALSE |
Gebrüder Weiss (GW) | 100431 | Postal Code/City/Country/shipper/consignee. | TRUE | |
Nacex | 100436 | PostalCode | 1234 | TRUE |
Seur | 100438 | PhoneNumber | 8888 | TRUE |
Seur | 100438 | PostalCode | 28001 | TRUE |
J&T Express (VN) | 100456 | PhoneNumber | 8888 | TRUE |
Cycloon (Fietskoeriers) | 100466 | PostalCode | 1000 AA | TRUE |
DPD (CZ) | 100483 | PostalCode | 1000 AA | FALSE |
DX | 100484 | PostalCode | 12345 | TRUE |
Ryder | 100522 | PostalCode | 88888 | TRUE |
Tuffnells | 100524 | PostalCode | S27 1BZ | TRUE |
Postmedia Parcel Services (BNI Parcel Tracking) | 100552 | PostalCode | H4E 5R4 | TRUE |
DPD (AT) | 100556 | PostalCode | 1000 AA | FALSE |
Walkers Transport | 100580 | PostalCode | LS27 0BN | TRUE |
DPD (HU) | 100584 | PostalCode | 1000 AA | FALSE |
InPost (ES) | 100594 | PostalCode | 51900 | TRUE |
InPost (PT) | 100598 | PostalCode | 51900 | TRUE |
J&T Express (EG) | 100619 | PhoneNumber | 8888 | TRUE |
Allied Express Transport | 100623 | PostalCode | 1000 | TRUE |
GLS Portugal (National) | 100646 | PostalCode | 1000-205 | TRUE |
A TU HORA EXPRESS | 100688 | PostalCode | 1000 | FALSE |
J&T Express (BR) | 100797 | PostalCode | CPF/CNPJ | TRUE |
DPD (HR) | 100807 | PostalCode | 1000 AA | FALSE |
DPD (EE) | 100808 | PostalCode | 1000 AA | FALSE |
DPD (LV) | 100809 | PostalCode | 1000 AA | FALSE |
DPD (LT) | 100810 | PostalCode | 1000 AA | FALSE |
DPD (NL) | 100811 | PostalCode | 1000 AA | FALSE |
DPD (SK) | 100812 | PostalCode | 1000 AA | FALSE |
DPD (SI) | 100813 | PostalCode | 1000 AA | FALSE |
DPD (CH) | 100815 | PostalCode | 1000 AA | FALSE |
DHL Supply Chain APAC | 100842 | DestCountry | ID | TRUE |
The United Pallet Network | 100862 | PostalCode | LS27 0BN | TRUE |
Furdeco | 100881 | PostalCode | LS27 0BN | TRUE |
Palletways | 100900 | PostalCode | 1000 AA | FALSE |
Instabox | 100932 | PostalCode | 51900 | TRUE |
France Express | 100936 | PostalCode | 1000 AA | FALSE |
Transaher | 100959 | PostalCode | 12345 | FALSE |
BJS Home Delivery | 101003 | PhoneNumber | 8888888888 | TRUE |
Palletforce | 101010 | PostalCode | S27 1BZ | TRUE |
FleetOptics | 101035 | PostalCode | 1000 | TRUE |
Hofmann | 101038 | PostalCode | 10000 | TRUE |
Emons | 101039 | PostalCode | 10000 | TRUE |
Sislógica | 101040 | PostalCode | 1000000 | TRUE |
APC Overnight | 101065 | PostalCode | 1000 AA | TRUE |
Arrow XL | 101076 | PostalCode | 1000 AA | FALSE |
UC Express | 190415 | PhoneNumber | 8888 | TRUE |
SF Express(CN) | 190766 | PhoneNumber | 8888 | TRUE |
KYE (CN) | 190845 | PhoneNumber | 8888 | TRUE |
Country code
- Visit https://res.17track.net/asset/carrier/info/country.all.json to get the latest country code. After getting the tracking information or receiving the push information, it is required to use the country codes of the origin and destination countries listed to correspond to the actual countries of the parcel.
Package status
Name | Description |
---|---|
0 | Not found |
10 | In transit |
20 | Expired |
30 | Pick up |
35 | Undelivered |
40 | Delivered |
50 | Alert |
Tracking status
Name | Description |
---|---|
0 | Unable To Track |
1 | Normal Tracking |
2 | Not Found |
10 | Web Error |
11 | Process Error |
12 | Service Error |
20 | Web Error [Cache] |
21 | Process Error [Cache] |
22 | Service Error [Cache] |
Tracking information
Name | Description |
---|---|
w1 | Firstcarrier code |
w2 | Secondcarrier code |
b | Country code of the origin country |
c | Country code of the destination country |
z0 | The latestevent information (the latest one in the first and second carrier event sets) |
z1 | First carrierevent set, all stored in descending order. |
z2 | Second carrirevent set, all stored in descending order. |
z9 | Cooperation e-commerce carrierevent set, all stored in descending order. About cooperation e-commerce carrier. |
ygt1 | The first carrier tracking consuming time, in milliseconds |
ygt2 | The second carrier tracking consuming time, in milliseconds |
ygt9 | The cooperation e-commerce carrier tracking consuming time, in milliseconds |
ylt1 | The last tracking time of the first carrier. Time 2079-01-01 signifies the time is invalid. |
ylt2 | The last tracking time of the second carrier. Time 2079-01-01 signifies the time is invalid. |
ylt9 | The last tracking time of cooperation e-commerce carrier. Time 2079-01-01 signifies the time is invalid. |
is1 | The first carrier'stracking status. It is valid when the first carrier's code (w1) is not 0; otherwise, it is invalid. |
is2 | The second carrier'stracking status. It is valid when the second carrier's code (w2) is not 0; otherwise, it is invalid. |
ln1 | Language of the event information used by the first carrier |
ln2 | Language of the event information used by the second carrier |
ln9 | Language of the event information used by the cooperation e-commerce carrier |
hs | The hash value of the latest event |
e | Package status |
f | Delivery time (Only for parcels with delivered results, -1 means the information is invalid) |
yt | Other prompt information |
zex | Tracking information extension |
Tracking information extension(Not enabled yet)
Name | Description |
---|---|
trC | Original shipping channel |
trN | Original tracking number |
Event information
Name | Description |
---|---|
a | Event time (Data may not be in valid time format, needs to be processed by string) |
b | Mapping of the location (not used yet) |
c | Event location |
d | Event location extension |
z | Event content description |
Important notes
- The tracking number of all interface requests needs to be registered first through the register interface.
- The interface frequency limit is 3req/s, a 429 error code will be returned when exceeding the limit.
- Repetitive requests for the same number with same carrier only consume one tracking quota. When it gets expired or being deleted and resubmitted, it will be recalculated.
- The system will automatically stop the tracking of parcels whose events have not been updated for 30 consecutive days or no event updates for 15 days after successful delivery;
- The system will reserve the data of numbers that are stopped for tracking for 90 days, and physically delete the corresponding data after the expiration dates.
- For stopped tracking numbers, they can be activated and re-tracked only once.
API Reference(v1.0)
Register
- 40 tracking numbers are allowed to submit for registration per time for the interface.
- POST /register
Request data example:
[
{
"number": "RR123456789CN",
"extra_param":"",
"carrier": 3011,
"final_carrier": 21051,
"auto_detection":false,
"tag": "MyId"
},
{
"number": "1234"
}
]
Request data description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
extra_param | No | String | Additional parameter like postcode, order date, etc., required by some carriers along with the tracking number. |
carrier | No | Integer | Carrier code. Currently our system can recognize most UPU tracking numbers and the customized tracking numbers of our cooperative logistics providers accurately. When you register these kinds of tracking numbers, the carrier code is not required to be passed. It can be automatically recognized when it is not passed. If the carrier code is passed wrong, we would correct it and return the corrected carrier code. If the error code -18019903 is returned while you register a tracking number, it means that we cannot identify the carrier of the registered number accurately. Hoping to avoid the identification error, please pass the correct carrier code to register the tracking number again. |
final_carrier | No | Integer | Carrier Code of the last-mile carrier. (Only for UPU numbers) |
auto_detection | No | Bool | Enable automatic carrier detection or not, which defaults to False. It will take effect only when the carrier is not set, and the parameter is set to True. When this parameter is in effect, the carrier detection algorithm will be applied to recognize the first carrier; however, it is not guaranteed that the carrier can be detected, or the accuracy of the carrier detection cannot be guaranteed. |
tag | No | String | Custom tracking number registration tag, Up to 100 characters. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"origin": 1,
"number": "RR123456789CN",
"carrier": 3011
}
],
"rejected": [
{
"number": "1234",
"error": {
"code": -18010012,
"message": "The format of '1234' is invalid."
}
}
]
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Corresponding response data to the request. |
-accepted | Tracking numbers that are accepted for registration normally with carrier code returned correspondingly. If correction policy is executed, the returned carrier code might be different from the passed one. |
--number | Tracking numbers that are accepted for registration normally. |
--carrier | Carrier code that are accepted for registration normally. |
--origin | Carrier detection methods of registered tracking numbers:1. Accurate detection;2. Carrier passed by the users;3. Automatic detection(not 100% correct). |
-rejected | Tracking number that are rejected for registration. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
Change Carrier
- sed to change the first carrier and the last-mile carrier. 40 tracking numbers are allowed to submit for change per time for the interface.
- POST /changecarrier
Request data example:
[
{
"number": "RR123456789CN",
"carrier_old": 3011,
"carrier_new": 3013,
"final_carrier_old": 0,
"final_carrier_new": 0
}
]
Request data description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier_old | No | Integer | Old carrier code, if not register multiple carriers with the same tracking number, it can be skipped, no need to pass. |
carrier_new | Yes | Integer | New carrier code. |
final_carrier_old | No | Integer | (Only available for postal logistics) Key of the old last-mile carrier. If the registered tracking number is not repetitive, the settings can be left empty. |
final_carrier_new | Yes | Integer | (Only available for postal logistics) Key of the new last-mile carrier. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "RR123456789CN",
"carrier": 3013
}
],
"rejected": []
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Corresponding response data to the request. |
-accepted | Tracking numbers that are accepted for request, and returned the latest carrier code. |
-rejected | Tracking number that are rejected for request. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
ChangeInfo
- Relevant additional information used to modify tracking.
- POST /changeinfo
Request data example:
{
"number": "RR123456789CN",
"carrier":3011,
"items": {
"param": "1234",
"tag": "This is my order id."
}
}
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | No | Integer | Carrier code. |
items | Yes | Dict | Data item set that needs to be modified. Currently, only tag is supported to be modified. Other items submitted will be ignored. |
--tag | No | String | Custom tracking number registration tag, Up to 100 characters. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "LW503511611CN",
"carrier": 3011
}
],
"rejected": []
}
}
Response parameter description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Corresponding response data to the request. |
-accepted | Tracking numbers that are accepted for request, and returned the latest carrier code. |
-rejected | Tracking number that are rejected for request. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
StopTrack
- 40 tracking numbers are allowed to submit per time for the interface.
- POST /stoptrack
Request data example:
[
{
"number": "RR123456789CN",
"carrier": 3011
}
]
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | No | Integer | Carrier code. If it is not passed, and if there are multiple data for one same tracking number (different carriers), they will all be processed. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "RR123456789CN",
"carrier": 3011
}
]
}
}
Response parameter description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Corresponding response data to the request. |
-accepted | Tracking numbers that are accepted for request. |
-rejected | Tracking number that are rejected for request. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
Retrack
- 40 tracking numbers are allowed to submit per time for the interface.
- POST /Retrack
Request data example:
[
{
"number": "RR123456789CN",
"carrier": 3011
}
]
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | No | Integer | Carrier code. If it is not passed, and if there are multiple data for one same tracking number (different carriers), they will all be processed. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "RR123456789CN",
"carrier": 3011
}
]
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Corresponding response data to the request. |
-accepted | Tracking numbers that are accepted for request. |
-rejected | Tracking number that are rejected for request. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
GetTrackList
- Get tracking number list
- POST /gettracklist
Request data example:
{
"number": "RR123456789CN",
"carrier": 3011,
"register_time_from": "2019-01-01 12:24:00",
"register_time_to": "2019-02-01",
"tracking_time_from": "2019-01-01",
"tracking_time_to": "2019-12-01",
"push_time_from": "2019-01-01",
"push_time_to": "2019-12-01",
"push_state": 0,
"stop_time_from": "2019-01-01",
"stop_time_to": "2019-12-01",
"package_state": 10,
"tracking_state": 0,
"page_no": 1
}
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | No | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | No | Integer | Carrier code. |
register_time_from | No | DateTime | Register time from (UTC). |
register_time_to | No | DateTime | Register time to (UTC). |
tr | cking_time_from | No | DateTime |
tracking_time_to | No | DateTime | Latest tracked time to (UTC). |
push_time_from | No | DateTime | Latest pushed time from (UTC). |
push_time_to | No | DateTime | Latest pushed time to (UTC). |
push_state No | Integer | Push result 0: Not pushed; 1: Success; 2: Failure. | |
stop_time_from | No | DateTime | Tracking Stopped time from (UTC). |
stop_time_to | No | DateTime | Tracking Stopped time to (UTC). |
package_state | No | Integer | Package status. |
tracking_state | No | Bool | Tracking status:1: Automatic tracking; 0: Tracking stopped. |
page_no | No | Integer | Page number, defailt is 1. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "RV929123748CN",
"w1": 3011,
"b": 301,
"w2": 10011,
"c": 1001,
"e": 20,
"rt": "2019-08-26 09:48:16",
"tt": "2020-01-16 02:52:11",
"pt": "2019-11-08 06:16:25",
"ps": 200,
"st": "2020-02-28 02:36:59",
"sr": 1,
"ir": true,
"ts": false,
"mc": 0,
"tag": null
}
]
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer to error status code. |
data | Corresponding response data to the request. |
-accepted | Accepted and processed normally with result set returned. If the returned set is empty, it means there is no data that meets the conditions. |
--number | Tracking number. |
--w1 | First carrier code. |
--w2 | Second carrier code. |
--b | Country code of the origin country. |
--c | Country code of the destination country. |
--e | Package status. |
--rt | Register time. |
--tt | Latest tracked time. |
--pt | Latest pushed time. |
--ps | Pushed http status code. |
--st | Tracking Stopped time. |
--sr | Tracking Stopped reason 1: Expiration rules; 2: API request; 3: Manual operation; 4: Invalid carrier. |
--ir | Retrack enabled or not 1: Yes; 0:No. |
--ts | Tracking status 1:Automatic tracking; 0:Tracking stopped. |
--mc | Carrier modification times. |
--tag | Custom tracking number registration tag. |
-errors | Tracking condition settings errors. |
GetTrackInfo
- 40 tracking numbers are allowed to submit per time for the interface.
- POST /gettrackinfo
Request data example:
[
{
"number": "RR123456789CN",
"carrier": 3011
}
]
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | No | Integer | Carrier code. If it is not passed, and if there are multiple data for one same tracking number (different carriers), then return all the data. |
Response data example:
{
"code": 0,
"data": {
"accepted": [
{
"number": "RM101474005CN",
"tag": "",
"track": {
"b": 301,
"c": 1803,
"e": 10,
"f": -1,
"w1": 3011,
"w2": 18031,
"z1": [
{
"a": "2015-05-13 14:47",
"b": null,
"c": "",
"d": "",
"z": "电子信息已收到"
}
],
"z2": [
{
"a": "2015-05-31 00:00",
"b": null,
"c": "",
"d": "",
"z": "Distribué ANDORRE LA VIEILLE (09)."
}
],
"z9": [],
"ygt1": 370,
"ygt2": 0,
"ygt9": 0,
"is1": 1,
"is2": 0,
"ln1": "zh-CHS",
"ln2": null,
"ln9": null,
"hs": 627236210,
"z0": {
"a": "2015-05-29 09:00",
"b": null,
"c": "BLAGOVESCH 1",
"d": "",
"z": "移交海关"
},
"ylt1": "2015-06-01 20:44:52",
"ylt2": "2079-01-01 00:00:00",
"ylt9": "2079-01-01 00:00:00",
"yt": "",
"zex": {
"trN": "",
"trC": 0
}
}
}
]
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer to error status code. |
data | Corresponding response data to the request. |
-accepted | Sets that are accepted and processed normally with carrier code returned correspondingly. |
--number | Tracking number. |
--tag | Custom tracking number registration tag. |
--track | Tracking information. |
-rejected | Tracking number that are rejected for getting tracking infomation. For the specific rejected tracking numbers and reasons, refer to the corresponding error code. |
DeleteTrack
- Delete the successfully registered tracking numbers.
- POST /deleteTrack
Request data example:
[
{
"number": "RR123456789CN",
"carrier":3011
}
]
Request parameter description:
Name | Required Or Not | Type | Description |
---|---|---|---|
number | Yes | String | Tracking number, conforming to the format requirements of a tracking number. |
carrier | Yes | String | Carrier code. |
Response data example:
{
"code":0,
"data":
{
"accepted":
[
{
"number":"621366941543",
"carrier":100271
}
],
"rejected":
[
]
}
}
Response result description:
Name | Description |
---|---|
code | Error status code, 0 means no error, and for other errors refer toerror status code. |
data | Data content of the response object encapsulation. |
-accepted | For the normal processed part of the response in the request. |
--number | Tracking number. |
--carrier | Carrier code. |
-rejected | For the abnormal processed part of the response in the request. |
--number | Tracking number. |
--carrier | Carrier code. |
Get a push manually
- POST /push
- The endpoint receives a maximum of 40 tracking numbers at a single time.
- The request will put the tracking number in a queue for processing before it is pushed by the system's universal scheduler.
Example Request
curl -X POST \
--header '17token:your secret key' \
--header 'Content-Type:application/json' \
--data '[
{
"number": "RR123456789CN",
"carrier": 3011
}
]' \
https://api.17track.net/track/v1/push
Parameter Explanation:
Parameter | Required |
Type |
Description |
---|---|---|---|
number | Yes | String | The tracking number must conform to the tracking number format. |
carrier | No | Int. | Carrier Code. If not passed in and if the tracking number can be matched to multiple carriers, it will be processed for multiple times for each carrier matched. |
Example Response
{ "code": 0, "data": { "accepted": [ { "number": "RR123456789CN", "carrier": 3011 } ] } }
Response Explanation:
Item | Description |
---|---|
code | The HTTP status code and Error status code. |
data | The response data. |
-accepted | This shows the data that has been received and processed successfully. |
-rejected | This shows the tracking numbers failed to be processed. An error code will be returned. |
Webhook
Setting
Set the callback interface URL by logging into the management console -> Settings -> Webhook. If it is not set, no notification will be sent.
Notification policy: If the Webhook URL of the notification call returns http status code 200, it means that the notification call has been processed normally and will not retry, otherwise the notification call will be considered as a failure. If the notification call fails, it will retry in the next 10, 30, and 60 minutes successively. If the notification call still fails, the current change notification for the corresponding tracking number will be abandoned, while the subsequent notifications will not be affected.
Data and Sign
When the tracking event is updated or the number is no longer tracked according to the policy, the system will generate a POST request to be sent to the callback url you set on the Settings page. The push data format is uniformly adopted in the following format:
{
"sign": "a829f039332706b9b888eba84b77bd01f425ed327d2c4a92b50bba5beb0a0260",
"event": "TRACKING_STOPPED",
"data": {
"number": "RM101474005CN",
"carrier":3011,
"tag":""
}
}
Data format
Name | Description |
---|---|
sign | Data sign |
event | Notification types supported currently: TRACKING_STOPPED:Stop tracking notification; TRACKING_UPDATED:Tracking information update notification. When the tracking event is updated, the notification of the latest tracking information will be pushed. |
data | Pushed data will vary depending on the event. |
Sign verification
In order to ensure that the information source is pushed by 17TRACK, it is recommended to verify the sign of the received data. During the verification, splice the value of type, value of data, and the API access key with the slash: event/data/secretkey, and then calculate SHA256; if the calculated result is consistent with the sign, it means that the information source is legal.
Sign example
- The push data format is uniformly adopted in UTF-8 encoded JSON format. And parse the raw data (No formatting, spaces, or line breaks, etc. are needed). For example, the received data is:
{"sign":"a829f039332706b9b888eba84b77bd01f425ed327d2c4a92b50bba5beb0a0260","event":"TRACKING_STOPPED","data":{"number":"RM101474005CN","carrier":3011}}
then the parsed result would be:
"event":"TRACKING_STOPPED" "data":{"number":"RM101474005CN","carrier":3011,"tag":""}
If the secret key is 6A8D7CFC3F7A41149E0A4EE8ABD0DD8A, then the data to be signed would be
TRACKING_STOPPED/{"number":"RM101474005CN","carrier":3011,"tag":""}/6A8D7CFC3F7A41149E0A4EE8ABD0DD8A
Pass this data through SHA256 and use hexadecimal encoding. If the calculated result is consistent with sign, means the data is valid.
Notification type
Tracking stopped
{
"sign": "a829f039332706b9b888eba84b77bd01f425ed327d2c4a92b50bba5beb0a0260",
"event": "TRACKING_STOPPED",
"data": {
"number": "RM101474005CN",
"carrier": 3011,
"tag":""
}
}
Name | Description |
---|---|
sign | Data sign. |
event | TRACKING_STOPPED |
data | Numbers that are stopped for tracking. |
Tracking updated
{
"sign": "34f40c8fc37f9a7100c65215b0df85c58cc4880cf2e832fe91c86de1bc00b181",
"event": "TRACKING_UPDATED",
"data": {
"number": "STOAA0000272952YQ",
"tag": "",
"track": {
"b": 301,
"c": 2105,
"e": 10,
"f": -1,
"w1": 190316,
"w2": 0,
"is1": 1,
"is2": 0,
"hs": 730243286,
"ln1": "en",
"ln2": null,
"ln9": "en",
"ygt1": 366,
"ygt2": 0,
"ygt9": 423,
"ylt1": "2020-05-11 12:05:58",
"ylt2": "2079-01-01 00:00:00",
"ylt9": "2020-05-11 12:05:58",
"yt": "",
"z0": {
"a": "2020-05-07 10:19",
"b": null,
"c": "",
"d": "BLOOMINGTON, CA 92316",
"z": "Departed Shipping Partner Facility, USPS Awaiting Item -> Your item departed a shipping partner facility at 10:19 am on May 7, 2020 in BLOOMINGTON, CA 92316. This does not indicate receipt by the USPS or the actual mailing date."
},
"z1": [
{
"a": "2020-05-07 10:19",
"b": null,
"c": "",
"d": "BLOOMINGTON, CA 92316",
"z": "Departed Shipping Partner Facility, USPS Awaiting Item -> Your item departed a shipping partner facility at 10:19 am on May 7, 2020 in BLOOMINGTON, CA 92316. This does not indicate receipt by the USPS or the actual mailing date."
},
{
"a": "2020-05-05 16:49",
"b": null,
"c": "",
"d": "BLOOMINGTON, CA 92316",
"z": "Arrived Shipping Partner Facility, USPS Awaiting Item"
},
{
"a": "2020-04-12 21:16",
"b": null,
"c": "",
"d": "FREMONT, CA 94538",
"z": "Picked Up by Shipping Partner, USPS Awaiting Item"
}
],
"z2": [],
"z9": [
{
"a": "2020-04-13 17:07",
"b": null,
"c": "China, Shenzhen",
"d": "",
"z": "Item inbound in sorting center."
},
{
"a": "2020-04-13 17:02",
"b": null,
"c": "China, Shenzhen",
"d": "",
"z": "Item accepted."
}
],
"zex": {
"trN": "92612927005099010009150135",
"trC": 21051
}
}
}
}
Name | Description |
---|---|
sign | Data sign. |
event | TRACKING_UPDATED |
data | Detailed tracking information. |