Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

4PX Express support #20

Closed
developerfromjokela opened this issue Aug 1, 2020 · 3 comments · Fixed by #23
Closed

4PX Express support #20

developerfromjokela opened this issue Aug 1, 2020 · 3 comments · Fixed by #23

Comments

@developerfromjokela
Copy link
Collaborator

Today I've come across an tracking number that doesn't get tracked in Cainiao. Instead it's 4PX.

Here's their API:
URL: http://track.4px.com/track/v2/front/listTrack
Method: POST
POST Data: (JSON) : {"serveCodes":["<TRACKING_CODE>"],"language":"en-us"}
Respose:

{
  "result": 1,
  "message": "操作成功",
  "data": [
    {
      "ctEndCode": "FI",
      "ctEndName": "芬兰",
      "ctStartCode": "CN",
      "ctStartName": "中国",
      "duration": 1,
      "queryCode": ""<TRACKING_CODE>",
      "serverCode": "<TRACKING_CODE>",
      "shipperCode": "302772171691",
      "status": 1,
      "tracks": [
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_ADFF",
          "tkDate": 1595979339000,
          "tkDesc": "Depart from facility to service provider.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        },
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_AAF",
          "tkDate": 1595897534000,
          "tkDesc": "Shipment arrived at facility and measured.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        },
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_SPLS",
          "tkDate": 1595897534000,
          "tkDesc": "4PX picked up shipment.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        }
      ]
    }
  ],
  "tag": "12"
}

I an not sure what is the tkCode, it seems to be an "ID" for the event. I haven't yet found a list or array in 4px tracking website that would be helpful in integration

@developerfromjokela
Copy link
Collaborator Author

Done

@developerfromjokela
Copy link
Collaborator Author

Pull Request coming soon

@norkator
Copy link
Owner

norkator commented Aug 5, 2020

Whoh that happened suddenly!

@norkator norkator linked a pull request Aug 6, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants