Get Tracking

The Tracking API provides the capability of retrieving the details transit information for a single FedEx tracking number.

Swagger

			
swagger: '2.0'
info:
  x-ibm-name: tracking
  title: Tracking
  version: 1.0.0
schemes:
  - https
host: $(catalog.host)
basePath: /v1
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  oauth2:
    type: oauth2
    description: ''
    flow: accessCode
    authorizationUrl: 'https://<.........................>/fsc/oauth2/authorize'
    scopes:
      Fulfillment_Returns: ''
    tokenUrl: 'https://<.........................>/fsc/oauth2/token''
  Client_Secret:
    type: apiKey
    description: ''
    in: header
    name: X-IBM-Client-Secret
  Client_ID:
    type: apiKey
    in: header
    name: X-IBM-Client-Id
security:
  - Client_ID: []
    Client_Secret: []
    oauth2:
      - Fulfillment_Returns
x-ibm-configuration:
  testable: true
  enforced: true
  phase: realized
paths:
  /tracking:
    get:
      responses:
        '200':
          description: 200 OK

      parameters:
        - name: trackingNumber
          type: string
          required: true
          in: query
          description: 063407591022258
        - name: Accesstoken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory.'
	  summary: Tracking  
	  description: The Tracking API provides the capability of retrieving the details transit information for a single FedEx tracking number.
			
		

Sample Request

			
	•	Retrieve all tracking details using trackingNumber
	https://<........>/api/v1/tracking

			
		

Sample Response

Success Response

			
{
  "requestIdentifier" : "COM1482178",
  "transactionDate" : "2014-01-09T13:31:00-05:00",
  "status" : true,
  "tracking" : {
    "shipmentId" : "122816215025810",
    "shipmentStatus" : "DL",
    "shipmentStatusDescription" : "Delivered",
    "actualDelivery" : "2014-01-09T13:31:00-05:00",
    "events" : [{
        "statusDateTime" : "2014-01-03T15:00:00-08:00",
        "statusCode" : "PU",
        "statusDescription" : "Picked up",
        "location" : {
          "locationCode" : "PICKUP_LOCATION",
          "city" : "SPOKANE",
          "stateCode" : "WA",
          "zipCode" : "99216",
          "countryCode" : "US"
        }
      }, {
        "statusDateTime" : "2014-01-03T14:31:00-08:00",
        "statusCode" : "OC",
        "statusDescription" : "Shipment information sent to FedEx",
        "location" : {
          "locationCode" : "CUSTOMER",
          "zipCode" : "83854",
          "countryCode" : "US"
        }
      }
    ]
  }
}



			
		

OAuth 2.0

HTTP Headers Description
Authorization You must always provide the access token for authorization to access the API.

HTTP-Header       Value
Authorization       Bearer accessToken
Origin Origin URL.

HTTP-Header       Value
Origin                domain.com

Custom authentication

HTTP Headers Description
X-IBM-Client-Id You must always provide in the HTTP header your API portal application's client ID (X-IBM-Client-Id) to access the API.

HTTP-Header       Value
X-IBM-Client-Id     ************
X-IBM-Client-Secret You must always provide in the HTTP header your API portal application's client secret (X-IBM-Client-Secret) to access the API.

HTTP-Header       Value
X-IBM-Client-Secret     ************
AccessToken Application Access Token
Origin Origin URL.

HTTP-Header       Value
Origin                domain.com

Query Parameters

Parameter Data type Description Multiple values allowed Required
trackingNumber String Tracking number to get details for N Y

Response Attribute

Parameter Data type Description
requestIdentifier String Request identifier.
transactionDate Date Transaction date/time.
UTC Format: 2014-01-09T13:31:00-05:00
success boolean Status of the transaction
Valid Values: True or False
tracking    
shipmentId String Tracking number.
shipmentStatus String Current status.
shipmentStatusDescription String Current status description.
actualDelivery Date Date when the delivery was completed.
UTC Format: 2014-01-09T13:31:00-05:00
tracking.events[]    
statusDateTime Date Date when the event occurred. UTC Format: 2014-01-09T13:31:00-05:00
statusCode String Event status.
Valid Values: See Tracking Status Codes
statusDescription String Event status description.
tracking.events[].location    
locationCode String FedEx location code for the event.
Valid Values: See Tracking Service Location Codes
city String City for the event.
stateCode String State for the event.
zipCode String Postal code for the event.
countryCode String Country for event.
errors[]    
code String Code associated with the error.
description String Description of the error.

HTTP Status Code

Code Description
200 OK - HTTP Response for successfully processed requests
400 Bad Request.
403 Forbidden
404 Not Found - Server couldn’t find anything matching request URI
500 Internal Server Error – Unable to process the request

Error Code

Code Description
ERR-SYS-0001 Your request cannot be processed due to a system error.
ERR-CMR-0001 Input data validation failed.
ERR-CMR-0002 Authentication Failed. Invalid Access Token.
ERR-CMR-0003 Missing mandatory fields.
ERR-TRK-0001 An error occurred while calling FedEx Tracking service

Tracking Service Status Codes

Code Name
OC Shipment information sent to FedEx
PU Picked up
AR Arrived at FedEx location
DP Departed FedEx location
OD On FedEx vehicle for delivery
DL Delivered

Tracking Service Location Codes

Code
AIRPORT
CUSTOMER
CUSTOMS_BROKER
DELIVERY_LOCATION
DESTINATION_AIRPORT
DESTINATION_FEDEX_FACILITY
DROP_BOX
ENROUTE
PICKUP_LOCATION
FEDEX_FACILITY
FEDEX_OFFICE_LOCATION
INTERLINE_CARRIER
NON_FEDEX_FACILITY
ORIGIN_AIRPORT
ORIGIN_FEDEX_FACILITY
PLANE
PORT_OF_ENTRY
SHIP_AND_GET_LOCATION
SORT_FACILITY
TURNPOINT
VEHICLE