This REST service allows your system to create a Fedex Express, SmartPost , Ground labels or UPS Ground Labels using standalone, web or script based program.
Your client must use POST, DELETE and PUT HTTP methods to successfully submit your label create, label delete and manifest close requests.
The service URL is:
Attention: This is a secure service, you need to obtain a security token first and append
your token entry as a parameter to the URL above.
This is a sample URL with an authority token:
Your service requests will use some or all of the following values:
To create a new label you will need:
The Fedex default label return type is a 4x6 ZPL label. You can modify the label type by appending the following parameters to your URL:?image_type=IMAGE_TYPE&stock_type=STOCK_TYPE
The following tables define the accepted IMAGE_TYPE and STOCK_TYPE options.
To delete a label you will need:
To close your labels on the ship date: (NOT NEEDED For UPSG service)
You will need to obtain a security token before submitting your test or production requests.
The easiest way to test your POST request is to use cURL from the system's command line. Use the station code TST for TEST entries.
We recommend saving your JSON structure into a text file ( input-file.txt ). To create a label under Manifest 1G161122 you will execute:
The following code is a sample input request for a Fedex / UPS Multilot shipment, except Fedex Smartpost requests.
Here is a sample curl delete request for Smartpost Fedex track number 76564231111: *To delete 2D shipments use code 'E'.
Here is a sample curl request to close ground manifest 1S161122:
After making a successful submission you should expect a return of one of the following JSON structures:
Response JSON structure
On error responses the Developer message object will contain a validity report with details of the issues found with the input provided. It is formatted with end of line chars "\n" so that it will be readable in your browser's web console.
Use these codes for DHL Labels
- DHM: SmartMail Parcel Expedited Max
- DHE: SmartMail Parcel Expedited
- DHG: SmartMail Parcel Ground
- DHP: SmartMail Parcel Plus Ground
- DHPE: DHL Plus Expedited
The service supports returning ZPL or a PNG image of the label. Use the stock_type parameter with the value: image for PNG, or zpl for ZPL response. If you don't use the parameter the ZPL option is returned.
Restful services are capable of receiving requests form web based or standalone applications. We have tested our services to comply with REST standards, returning appropriate HTTP codes to help developers using commonly used frameworks as JQuery or Prototype.
Additionally, there are many examples from many different programming languages such as C#, Java, PHP and C++.
If you desire to test or need Java sample code, the following project is an example of how to call an HTTP Rest service using HTTP Post protocol, IBCPost.