Available APIs
Authentication - OAuth2.0
Inventory
Items
Inbound Shipments
Labels
Receipt
Location
Tracking
Document
Get Labels
The Labels API provides the capability of retrieving FedEx labels for a given label ID.
Swagger
swagger: '2.0'
info:
x-ibm-name: label
title: Label
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: Enter Client Secret
in: header
name: X-IBM-Client-Secret
Client_Id:
type: apiKey
in: header
name: X-IBM-Client-Id
description: Enter Client ID
security:
- Client_Id: []
Client_Secret: []
oauth2:
- Fulfillment_Returns
x-ibm-configuration:
testable: true
enforced: true
phase: realized
paths:
/labels/{labelId}:
get:
responses:
'200':
description: 200 OK
deprecated: false
parameters:
- name: accessToken
type: string
required: false
in: header
description: 'Enter AccessToken, it is mandatory.'
- name: labelId
type: string
required: true
in: path
description: '12701'
summary: Label
description: The Labels API provides the capability of retrieving FedEx labels for a given label ID.
Sample Request
• Retrieve all lables details using lableId
https://<........>/api/v1/labels/15701
Request Header Accept: application/pdf.
Sample Response
Success Response
Response will be the PDF file.
Sample Request
• Retrieve all lables details using lableId
https://<........>/api/v1/labels/15701
Request Header No request header specified.
Sample Response
Success Response
{
"requestIdentifier" : "COM1482178",
"transactionDate" : "2014-01-09T13:31:00-05:00",
"status" : true,
"labels" : [{
"id" : "23094",
"trackingNumber" : "79405496348",
"labelContent" : "<…BASE64 CONTENT…>"
},{
"id" : "23095",
"trackingNumber" : "79405496349",
"labelContent" : "<…BASE64 CONTENT…>"
}],
"errors" : [{
"code" : "ERR-LBL-0001",
"description" : "Something went wrong"
}
]
}
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 | Required |
---|---|---|---|
labelId | String | Label ID. Only one value is allowed. | 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 |
labels[] | ||
id | String | Label ID. |
trackingNumber | String | Tracking number for this label. |
labelContent | String | Base64 encoded string of the label PDF file. |
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-LBL-0001 | Label ID is missing |
ERR-LBL-0002 | Only one Label ID can be present when requesting PDF |
ERR-LBL-0003 | Cannot find label with given ID |
ERR-LBL-0004 | Retailer ID is missing |