Project

General

Profile

修改功能 #278

Update FedEx RESTful APIs

Added by Xihua Fan over 2 years ago. Updated about 1 year ago.

Status:
已关闭
Priority:
普通
Assignee:
Target version:
IT: Easytryck (Sweden) - v3.0
Start date:
02/01/2024
Due date:
08/30/2024
% Done:

100%

Estimated time:
8.00 h

Description

Task Details
  1. Email: [告别 Web Services ——利用 FedEx RESTful APIs 提升您的体验]
    Link: https://developer.fedex.com/api/zh-cn/home.html?cmp=EMT-1007031-3-3-200-1000000-APAC-CN-ZH-EMDITFY22WSAWAR&ET_CID=1225625&ET_RID=14212675&LINK=BodyCopy-CTA3
    Fedex API 支持
    Fedex 客服
    Fedex 客服(中国区),然后抄送联邦销售
Important:
  1. The web service will no longer be able to be used on August 31, 2024 https://developer.fedex.com.cn/api/zh-cn/home.html
Input
  • Email from Mei/Tom
Output
  • Report and Solution

Others


Files

clipboard-202405301122-uanwd.png (50.4 KB) clipboard-202405301122-uanwd.png Xihua Fan, 05/30/2024 11:22 AM
OTS_FedEx_Restful_api_20240627.7z (10.1 KB) OTS_FedEx_Restful_api_20240627.7z Junyi Zhang, 06/27/2024 07:09 PM
#1

Updated by Xihua Fan over 2 years ago

  • Start date changed from 07/01/2023 to 10/01/2023
#2

Updated by Xihua Fan about 2 years ago

  • Due date changed from 12/31/2023 to 03/31/2024
  • Start date changed from 10/01/2023 to 02/01/2024
#3

Updated by Junyi Zhang over 1 year ago

  • % Done changed from 0 to 10
#4

Updated by Xihua Fan over 1 year ago

  • Due date changed from 03/31/2024 to 04/30/2024
#5

Updated by Junyi Zhang over 1 year ago

  • % Done changed from 10 to 30
#6

Updated by Xihua Fan over 1 year ago

  • Due date changed from 04/30/2024 to 05/15/2024
#7

Updated by Junyi Zhang over 1 year ago

  • % Done changed from 30 to 40
#8

Updated by Xihua Fan over 1 year ago

  • Description updated (diff)
#9

Updated by Xihua Fan over 1 year ago

  • Description updated (diff)
#10

Updated by Junyi Zhang over 1 year ago

  • % Done changed from 40 to 50
#11

Updated by Xihua Fan over 1 year ago

  • Tracker changed from 解析Bug to 修改功能
#12

Updated by Xihua Fan over 1 year ago

  • Due date changed from 05/15/2024 to 05/31/2024
#13

Updated by Xihua Fan over 1 year ago

  • Due date changed from 05/31/2024 to 06/30/2024
  • % Done changed from 50 to 90
#14

Updated by Junyi Zhang over 1 year ago

  • Description updated (diff)
#15

Updated by Junyi Zhang over 1 year ago

  • Description updated (diff)
#17

Updated by Junyi Zhang over 1 year ago

  • File OTS_FedEx_Restful_api_20240625.7z added
#18

Updated by Junyi Zhang over 1 year ago

Output(2024/06/27), Output(2024/06/24), Output(2024/06/03), Output(2024/04/08), Output(2024/04/03), Output(2024/03/29)

Fedex Developer portal: (https://developer.fedex.com.cn/api/en-us/home.html ) (100%)
  1. Account:
    - Id: vanfan0826
    - Password: Fxh19780826
  2. Organization info:
    - company name: redblue
    - company URL: order.easydingzhi.com
    - organization name: redblue-OTS
  3. Api project: redblue-OTS-tracking (100%)
    1. Test environment:
      Test URL: https://apis-sandbox.fedex.com
      Api key: l7e8236d9b45d84a11b3244346eddeb1c3
      Serect key: 68f98c0d55b2410490e19bf576afc71c
      
    2. Production environment:
      URL: https://apis.fedex.com
      API key: l74ba73772d6d14e77813e35f504866146
      Serect key: 201021ada319420bad9756a492f35a5f  (Noted: To Keep your Secret Key secure, Fedex only display it once. If you lose your Secret Key, you can generate a new one. )
      
    3. About API request limit: (https://developer.fedex.com.cn/api/en-cn/guides/ratelimits.html))
      API request: 500,000 per day in one organization, 1,400 per 10s
      Auth token threshold: 3/s in 5s or 1/s in 2 min
      
Changes: (100%)
  1. Add settings in protected/tracking.ini:
    ; -- True: Restful API, False: Webservice -- ;
    fedex_restful_api = false   
    
    ; -- Test environment -- ;
    fedex_api_url = https://apis-sandbox.fedex.com
    fedex_api_key = l7e8236d9b45d84a11b3244346eddeb1c3
    fedex_secret_key = 68f98c0d55b2410490e19bf576afc71c
    fedex_grant_type = client_credentials
    
    ; -- Production environment -- ;
    ;fedex_api_url = https://apis.fedex.com
    ;fedex_api_key = l74ba73772d6d14e77813e35f504866146
    ;fedex_secret_key = 201021ada319420bad9756a492f35a5f
    ;fedex_grant_type = client_credentials
    
  2. Change scope:
    - protected/tracking.ini
    - protected/components/TrackingFedEx.php
    - protected/actions/track/QueryAction.php
  3. Add RestFul api support to Fedex tracking function.
    1. protected/components/TrackingFedEx.php:
      - Support WebService and Restfule API.
      - Restfule api: 1. Get access_token 2. Get tracking data by access_token.
    2. Unify the front UI display (WebService and Restful API) since the front js file was compressed.
      - I change the data structure of Restful to as the same as the web service to make front display easier.
      - Web service:
      {
         "TrackingNumber":"772221506449",
         "Events":{
            "Timestamp":"2023-05-26T12:30:00+00:00",
            "EventType":"DL",
            "EventDescription":"Delivered",
            "Address":{
               "City":"DALLAS",
               "StateOrProvinceCode":"TX",
               "PostalCode":"75202",
               "CountryCode":"US",
               "Residential":false
            },
            "ArrivalLocation":"DELIVERY_LOCATION" 
         }
      }
      

      - Restful:
      Old:
      {
         "output":{
            "completeTrackResults":[
               {
                  "trackingNumber":"772221506449",
                  "trackResults":[
                     {
                        "scanEvents":[
                           {
                              "date":"2023-05-26T12:30:00+00:00",
                              "eventType":"DL",
                              "eventDescription":"Delivered",
                              "scanLocation":{
                                 "city":"DALLAS",
                                 "stateOrProvinceCode":"TX",
                                 "postalCode":"75202",
                                 "countryCode":"US",
                                 "residential":false
                              }
                           }
                        ]
                     }
                  ]
               }
            ]
         }
      }
      
      New:
      {
         "TrackingNumber":"772221506449",
         "Events":[
            {
               "Timestamp":"2023-05-26T12:30:00+00:00",
               "EventDescription":"Delivered",
               "Address":{
                  "City":"DALLAS",
                  "CountryCode":"US" 
               }
            }
         ]
      }
      
#19

Updated by Junyi Zhang over 1 year ago

  • File deleted (OTS_FedEx_Restful_api_20240625.7z)
#21

Updated by Xihua Fan over 1 year ago

  • Due date changed from 06/30/2024 to 07/31/2024
#22

Updated by Xihua Fan over 1 year ago

  • Due date changed from 07/31/2024 to 08/16/2024
#23

Updated by Xihua Fan over 1 year ago

  • Due date changed from 08/16/2024 to 08/30/2024

To Niko

  1. 请在8/23号前commit到Git库,然后提示【部署请求】, 手动拉代码从Git库到Apache(在线)工作目录。
    Note:本地请完成测试,并提示在线部署后【配置修改】,如有必要。
#24

Updated by Junyi Zhang over 1 year ago

Output(2024/09/02)

  1. BugFix: Tracking function only display the latest tracking information, which should display all the tracking history information.
    1. Solution: Modify FedEx Restful api, and get all the tracking history information instead the latest one.
    2. Change scope:
      - protected/components/TrackingFedEx.php
#25

Updated by Junyi Zhang over 1 year ago

  • Status changed from 进行中 to 已关闭
  • % Done changed from 90 to 100
#26

Updated by Xihua Fan about 1 year ago

  • Target version set to v3.0

Also available in: Atom PDF