Overview

Traffic Parrot offers ready-made API mocks and sandbox environments including for the various APIs offered by FedEx®, including Track API from the FedEx® Developer Portal API Catalog.

Operation Description
POST /track/v1/trackingnumbers Used to track one or more packages using numeric tracking numbers

POST /track/v1/trackingnumbers

The official API documentation can be found here: Track API

Features

  • Mock tracking numbers
  • Input validation
  • Up to 30 tracking numbers allowed in the request

Usage Example

Example HTTP request to Traffic Parrot sandbox:

Request method:	POST
Request URI:    http://localhost:8081/track/v1/trackingnumbers
Headers:        x-customer-transaction-id=3bd62205-0ba9-48f4-9864-eb88d71556cb
                x-locale=en_US
                authorization=Bearer f909a8ca-1c0c-4d83-8403-cfe796b113a4
                Accept=*/*
                Content-Type=application/json; charset=utf-8
Body:{
    "trackingInfo": [
        {
            "shipDateBegin": "2021-07-20",
            "shipDateEnd": "2020-07-25",
            "trackingNumberInfo": {
                "trackingNumber": "111111111111"
            }
        }
    ],
    "includeDetailedScans": false
}

Example HTTP success response from Traffic Parrot sandbox:

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Body:{
    "transactionId": "035fa9f5-b282-42c2-9e84-550bbf131988",
    "customerTransactionId": "3bd62205-0ba9-48f4-9864-eb88d71556cb",
    "output": {
        "completeTrackResults": [
            {
                "trackingNumber": "111111111111",
                "trackResults": [
                    {
                        "trackingNumberInfo": {
                            "trackingNumber": "111111111111",
                            "trackingNumberUniqueId": "2459417000~111111111111~FX",
                            "carrierCode": "FDXE"
                        },
                        "additionalTrackingInfo": {
                            "nickname": "",
                            "hasAssociatedShipments": false
                        },
                        "shipperInformation": {
                            "address": {
                                "residential": false
                            }
                        },
                        "recipientInformation": {
                            "address": {
                                "residential": false
                            }
                        },
                        "latestStatusDetail": {
                            "code": "DL",
                            "derivedCode": "DL",
                            "statusByLocale": "Delivered",
                            "description": "Delivered",
                            "scanLocation": {
                                "residential": false
                            }
                        },
                        "dateAndTimes": [
                            {
                                "type": "ACTUAL_DELIVERY",
                                "dateTime": "2021-07-21T13:02:00+09:00"
                            },
                            {
                                "type": "ACTUAL_PICKUP",
                                "dateTime": "2021-07-20T17:59:00+09:00"
                            },
                            {
                                "type": "SHIP",
                                "dateTime": "2021-07-20T00:00:00-06:00"
                            },
                            {
                                "type": "ACTUAL_TENDER",
                                "dateTime": "2021-07-20T17:59:00+09:00"
                            }
                        ],
                        "availableImages": [

                        ],
                        "packageDetails": {
                            "packagingDescription": {
                                "type": ""
                            }
                        },
                        "shipmentDetails": {
                            "possessionStatus": true
                        },
                        "scanEvents": [
                            {
                                "date": "2022-01-14T18:48:00+01:00",
                                "eventType": "IT",
                                "eventDescription": "In transit",
                                "exceptionCode": "",
                                "exceptionDescription": "",
                                "scanLocation": {
                                    "streetLines": [
                                        ""
                                    ],
                                    "city": "KOELN",
                                    "stateOrProvinceCode": "NW",
                                    "postalCode": "51147",
                                    "countryCode": "DE",
                                    "residential": false,
                                    "countryName": "Germany"
                                },
                                "locationId": "CGNR",
                                "locationType": "FEDEX_FACILITY",
                                "derivedStatusCode": "IT",
                                "derivedStatus": "In transit"
                            },
                            {
                                "date": "2021-11-24T17:24:00+01:00",
                                "eventType": "DO",
                                "eventDescription": "",
                                "exceptionCode": "",
                                "exceptionDescription": "",
                                "scanLocation": {
                                    "streetLines": [
                                        ""
                                    ],
                                    "city": "PESCIA",
                                    "postalCode": "51017",
                                    "countryCode": "IT",
                                    "residential": false,
                                    "countryName": "Italy"
                                },
                                "locationId": "PSACU",
                                "locationType": "NON_FEDEX_FACILITY",
                                "derivedStatusCode": "DO",
                                "derivedStatus": "Dropped off"
                            },
                            {
                                "date": "2021-11-24T17:23:00+01:00",
                                "eventType": "DO",
                                "eventDescription": "",
                                "exceptionCode": "",
                                "exceptionDescription": "",
                                "scanLocation": {
                                    "streetLines": [
                                        ""
                                    ],
                                    "city": "COMO",
                                    "postalCode": "22100",
                                    "countryCode": "IT",
                                    "residential": false,
                                    "countryName": "Italy"
                                },
                                "locationId": "QCMAJ",
                                "locationType": "NON_FEDEX_FACILITY",
                                "derivedStatusCode": "DO",
                                "derivedStatus": "Dropped off"
                            },
                            {
                                "date": "2021-07-21T13:02:00+09:00",
                                "eventType": "DL",
                                "eventDescription": "Delivered",
                                "exceptionCode": "",
                                "exceptionDescription": "",
                                "scanLocation": {
                                    "streetLines": [
                                        ""
                                    ],
                                    "city": "INCHEON-SI JUNG-GU",
                                    "postalCode": "22381",
                                    "countryCode": "KR",
                                    "residential": false,
                                    "countryName": "Korea, South"
                                },
                                "locationId": "QUUX",
                                "locationType": "DELIVERY_LOCATION",
                                "derivedStatusCode": "DL",
                                "derivedStatus": "Delivered"
                            },
                            {
                                "date": "2021-07-20T17:59:00+09:00",
                                "eventType": "AR",
                                "eventDescription": "At local FedEx facility",
                                "exceptionCode": "",
                                "exceptionDescription": "",
                                "scanLocation": {
                                    "streetLines": [
                                        ""
                                    ],
                                    "city": "INCHEON-SI JUNG-GU",
                                    "postalCode": "22381",
                                    "countryCode": "KR",
                                    "residential": false,
                                    "countryName": "Korea, South"
                                },
                                "locationId": "QUUX",
                                "locationType": "DESTINATION_FEDEX_FACILITY",
                                "derivedStatusCode": "IT",
                                "derivedStatus": "In transit"
                            }
                        ],
                        "availableNotifications": [
                            "ON_DELIVERY"
                        ],
                        "deliveryDetails": {
                            "actualDeliveryAddress": {
                                "residential": false
                            },
                            "locationType": "GUARD_OR_SECURITY_STATION",
                            "locationDescription": "Guard/Security Station",
                            "deliveryAttempts": "0",
                            "receivedByName": "J. HOON CHOO",
                            "deliveryOptionEligibilityDetails": [
                                {
                                    "option": "INDIRECT_SIGNATURE_RELEASE",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "REDIRECT_TO_HOLD_AT_LOCATION",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "REROUTE",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "RESCHEDULE",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "RETURN_TO_SHIPPER",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "DISPUTE_DELIVERY",
                                    "eligibility": "INELIGIBLE"
                                },
                                {
                                    "option": "SUPPLEMENT_ADDRESS",
                                    "eligibility": "INELIGIBLE"
                                }
                            ]
                        },
                        "destinationLocation": {
                            "locationContactAndAddress": {
                                "address": {
                                    "residential": false
                                }
                            },
                            "locationType": ""
                        },
                        "serviceDetail": {
                            "type": "",
                            "description": "",
                            "shortDescription": ""
                        },
                        "standardTransitTimeWindow": {
                            "window": {

                            }
                        },
                        "estimatedDeliveryTimeWindow": {
                            "window": {

                            }
                        },
                        "goodsClassificationCode": "",
                        "returnDetail": {

                        }
                    }
                ]
            }
        ]
    }
}

Example HTTP error response from Traffic Parrot sandbox:

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Body:{
    "transactionId": "95751f62-7a76-4c95-a387-c86f0385558e",
    "customerTransactionId": "3bd62205-0ba9-48f4-9864-eb88d71556cb",
    "errors": [
        {
            "code": "INTERNAL.SERVER.ERROR",
            "message": "We encountered an unexpected error and are working to resolve the issue. We apologize for any inconvenience. Please check back at a later time."
        }
    ]
}

Mock Tracking Numbers

Mock tracking numbers are available to produce different success and error cases based on the first tracking number provided.

The following tracking numbers return tracking results.

The includeDetailedScans request flag can be used to provide a more detailed response for some tracking numbers.

Tracking Number HTTP Status Description Response
123456789012 200 In transit
020207021381215 200 Picked up
111111111 200 Delivered
449044304137821 200 Initiated
149331877648230 200 In transit | Tendered at FedEx location
403934084723025 200 In transit | Arrived at FedEx location
920241085725456 200 In transit | At local FedEx facility
568838414941 200 In transit | At destination sort facility
039813852990618 200 In transit | Departed FedEx location
231300687629630 200 In transit | On FedEx vehicle for delivery
377101283611590 200 Delivery exception | Customer not available or business closed
852426136339213 200 Delivery exception | Local delivery restriction - Delivery not attempted
076288115212522 200 Delivery exception | Shipper requested shipment to be returned - Unable to deliver shipment - Returning to shipper
957794015041323 200 Shipment exception | Unable to deliver
581190049992 200 Clearance delay

The following tracking numbers return error codes.

Tracking Number HTTP Status Error Code
55555001 500 INTERNAL.SERVER.ERROR
55555002 403 CUSTOMER.REVOKE.REQUIRED
55555003 403 CUSTOMER.SIZE.INVALID
55555004 403 CUSTOMER.USAGE.LOCKED
55555005 500 TRACKING.CUSTOMCRITICAL.ERROR
55555006 500 TRACKING.MULTISTOP.ERROR
55555007 500 TRACKING.DATA.NOTUNIQUE
55555008 500 USER.RELOGIN.REQUIRED
55555009 503 SERVICE.UNAVAILABLE.ERROR
55555010 400 TRACKING.SHIPDATEBEGIN.TOOOLD
55555011 400 TRACKING.SHIPDATERANGE.ERROR
55555012 400 TRACKING.SHIPDATERANGE.TOOLONG

Input Validation

Input validation is available to produce different error cases based on the request fields provided.

The HTTP status returned is 400.

Validation Error Code
The header x-locale contains the value INVALID TRACKING.LOCALE.INVALID
The trackingNumber is empty or missing TRACKING.TRACKINGNUMBER.EMPTY
The trackingNumber contains non-numeric characters TRACKING.TRACKINGNUMBER.INVALID
Both the shipDateBegin and shipDateEnd are not in date format e.g. 2022-03-21 TRACKING.SHIPDATERANGE.INVALID
The shipDateBegin is not in date format e.g. 2022-03-21 TRACKING.SHIPDATEBEGIN.INVALID
The shipDateEnd is not in date format e.g. 2022-03-21 TRACKING.SHIPDATEEND.INVALID
The shipDateEnd is in the future TRACKING.SHIPDATEEND.FUTURE
The shipDateEnd is before the shipDateBegin TRACKING.SHIPDATE.ENDDATEBEFOREBEGINDATE
When the shipDateBegin is older than 2 years TRACKING.SHIPDATEBEGIN.TOOOLD
When there are more than 30 days between the shipDateBegin and shipDateEnd TRACKING.SHIPDATERANGE.TOOLONG
When there are more than 30 trackingNumber provided TRACKING.SHIPDATERANGE.TOOLONG