FedEx Ship API-Print Return Label

Ship API

The Ship API allows you to integrate FedEx shipping capabilities into your application. Using Ship API, you can process and submit shipping requests for packages to FedEx for both domestic and international shipments, as well as the return shipments.

Each shipment request will contain detailed information for shipment and packages.

FedEx Shipping categorized as domestic and international.

For printing a return label following parameters required

Post : URL : https://apis-sandbox.fedex.com/ship/v1/shipments

HEADER PARAMETERS

x-customer-transaction-id string

Example: 624deea6-b709-470c-8c39-4b5511281492

This element allows you to assign a unique identifier to your transaction. This element is also returned in the reply and helps you match the request to the reply.

content-type

required

string

Example: application/json

This is used to indicate the media type of the resource. The media type is a string sent along with the file indicating format of the file.

x-locale string

Example: en_US

This indicates the combination of language code and country code. 

authorization

required

string

Example: Bearer XXX

This indicates the authorization token for the input request.

Sample Body parameter (For JSON Data for US_Domestic_Print_Return_Label_Shipment )

{

  “labelResponseOptions”: “URL_ONLY”,

  “requestedShipment”: {

    “shipper”: {

      “contact”: {

        “personName”: “SHIPPER NAME”,

        “phoneNumber”: 1234567890,

        “companyName”: “Shipper Company Name”

      },

      “address”: {

        “streetLines”: [

          “SHIPPER STREET LINE 1”

        ],

        “city”: “HARRISON”,

        “stateOrProvinceCode”: “AR”,

        “postalCode”: 72601,

        “countryCode”: “US”

      }

    },

    “recipients”: [

      {

        “contact”: {

          “personName”: “NAME”,

          “phoneNumber”: 1234567890,

          “companyName”: “Recipient Company Name”

        },

        “address”: {

          “streetLines”: [

            “RECIPIENT STREET LINE 1”,

            “RECIPIENT STREET LINE 2”

          ],

          “city”: “Collierville”,

          “stateOrProvinceCode”: “TN”,

          “postalCode”: 38017,

          “countryCode”: “US”

        }

      }

    ],

    “shipDatestamp”: “2020-07-03”,

    “serviceType”: “PRIORITY_OVERNIGHT”,

    “packagingType”: “FEDEX_ENVELOPE”,

    “pickupType”: “USE_SCHEDULED_PICKUP”,

    “blockInsightVisibility”: false,

    “shippingChargesPayment”: {

      “paymentType”: “SENDER”

    },

    “shipmentSpecialServices”: {

      “specialServiceTypes”: [

        “RETURN_SHIPMENT”

      ],

      “returnShipmentDetail”: {

        “returnType”: “PRINT_RETURN_LABEL”

      }

    },

    “labelSpecification”: {

      “imageType”: “PDF”,

      “labelStockType”: “PAPER_85X11_TOP_HALF_LABEL”

    },

    “requestedPackageLineItems”: [

      {

        “weight”: {

          “value”: 1,

          “units”: “LB”

        }

      }

    ]

  },

  “accountNumber”: {

    “value”: “XXX561073”

  }

}

Leave a comment

Your email address will not be published. Required fields are marked *