Get Inbound Shipment

This API retrieves a shipment or list of shipments, based on the query parameters provided in the request.

Swagger

         
swagger: '2.0'
info:
  x-ibm-name: inboundShipments
  title: InboundShipments
  version: 1.0.0
  description: 'The Inbound Shipments API provides the capability of creating a new shipment, updating a shipment, canceling a shipment and getting a list of shipments or a specific shipment. Once the shipment is created in the system, it will be processed and sent to the warehouse to provide notice to the operations team.'
schemes:
  - https
host: $(catalog.host)
basePath: /v1
consumes:
  - application/json
produces:
  - application/json
  - fsc-api-admin@fedex.com
securityDefinitions:
  Client_Secret:
    type: apiKey
    description: Enter Client Secret
    in: header
    name: X-IBM-Client-Secret
  oauth2:
    type: oauth2
    description: ''
    flow: accessCode
    scopes:
      Fulfillment_Returns: "Read/Write access to Orders, Items, RMAs, Inventory,ASN  and 1.1\tInbound Shipments objects"
    authorizationUrl: 'https://<.........................>/fsc/oauth2/authorize'
    tokenUrl: 'https://<.........................>/fsc/oauth2/token'    
  Client_Id:
    type: apiKey
    in: header
    name: X-IBM-Client-Id
    description: Enter Client ID
security:
  - Client_Id: []
    oauth2:
      - Fulfillment_Returns
    Client_Secret: []
x-ibm-configuration:
  testable: true
  enforced: true
paths:
  /inboundShipments:
    get:
      responses:
        '200':
          description: 200 OK
      summary: Get Inbound Shipment details
      parameters:
        - name: AccessToken
          type: string
          required: false
          in: header
          description: 'Enter AccessToken, it is mandatory in case of basic authentication.'
        - name: query_params
          type: string
          required: true
          in: query
          description: 'Enter all the query parameters. Sample:  createdTimestamp=gt|2016-09-21T14:30:59-05:00&responseFilter=All&pageLimit=5'
      security:
        - oauth2:
            - Fulfillment_Returns
        - Client_Id: []
          Client_Secret: []
      consumes:
        - application/json
      description: 'This API retrieves a shipment or list of shipments, based on the query parameters provided in the request.'

      

Sample Request

         
	•	Retrieve shipment details using shipmentId.
	https://<........>/api/v1/inboundShipments?shipmentId=0001-062417-001,0001-062417-002, 0001-062417-002,0001-062417-003,0001-062417-004
	•	Retrieve only basic shipment details of inbound shipment created on or after the time stamp provided. 
	https://<........>/api/v1/ inboundShipments?createdTimestamp=ge|2016-09-21T14:30:59-05:00&responseFilter=Basic
	•	Retrieve basic and Lpn details of inbound shipments that are either in In Transit or Receiving or Complete.
	https://<........>/api/v1/ inboundShipments?orderStatus=In Transit,Receiving,Complete&responseFilter=Basic,Lpn

 
      

Sample Response

Success Response

         


{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "inboundShipments": [
    {
      "shipmentId": "0001-063017-0001",
      "shipmentName": "FedExShipment01",
      "status": "Complete",
      "externalRefNumber": "32421-1314324-2131",
      "originFacility": {
        "facilityName": "My Location 1",
        "addressLine1": "100 Papercraft Avenue",
        "addressLine2": "Suite 100",
        "city": "Pittsburgh",
        "stateCode": "PA",
        "zipCode": "15238",
        "countryCode": "US",
        "contactName": "John Smith",
"contactPhoneCountryCode": "+1",
        "contactPhone": "2132331222",
        "contactEmailAddress": "origin.facility@gmail.com"
      },
      "destinationFacility": {
        "facilityCode": "HFY"
      },
      "products": [
        {
          "sku": "Fancy1",
          "quantityShipped": 2700,
          "quantityReceived": 2700
        },
        {
          "sku": "Fancy2",
          "quantityShipped": 2000,
          "quantityReceived": 2000
        }
      ],
      "lpns": [
        {
          "lpnType": "C",
          "lpnName": "Case 1",
          "numberOfLpns": 10,
          "customLpnIds": [],
          "dimension": {
            "length": 35.6,
            "width": 45.6,
            "height": 29
          },
          "weight": 32,
          "stackable": true,
          "lpnDetails": [
            {
              "sku": "Fancy1",
"quantity": 20,
              "batchLotNumber": "A131231",
              "expireDate": "2017-10-14",
              "purchaseOrderNumber": "324324214123421",
              "purchaseOrderLineItemId": "45453513515465"
            },
            {
              "sku": "Fancy2",
              "quantity": 200,
              "lotNumber": null,
              "expireDate": null,
              "purchaseOrderId": "324324214123421",
              "purchaseOrderLineItemId": "45453513515466"
            }
          ]
        },
        {
          "lpnType": "C",
          "lpnName": "Case 2",
          "numberOfLpns": 5,
          "customLpnIds": [
            "00000999990000128970",
            "00000999990000128971",
            "00000999990000128972",
            "00000999990000128973",
            "00000999990000128974"
          ],
          "dimension": {
            "length": 35.6,
            "width": 45.6,
            "height": 29
          },
          "weight": 32,
          "stackable": true,
          "lpnDetails": [
            {
              "sku": "Fancy1",
              "quantity": 500,
              "batchLotNumber": "A131231",
              "expireDate": "2017-10-15",
              "purchaseOrderId": "324324214123421",
              "purchaseOrderLineItemId": "45453513515466"
            }
          ]
        }
      ],
      "productLevelServices": {
        "sku": "sku001",
        "serviceLevelCode": "quality_audit_100",
        "serviceLevelDescription": "Counting"
      },
      "shipping": {
        "fedexManaged": false,
        "fedexShipment": false,
        "expectedArrivalDate": "2017-07-15",
        "carrierName": "FedEx",
        "contactName": "Walter White",
        "phoneCountryCode": "+1",
        "contactPhone": "2313223444",
        "trackingBOLNumbers": [
          "13432432421",
          "324231412342314"
        ],
        "pickupDate": "2017-06-20",
        "pickupStartTime": "18:00",
        "pickupEndTime": "23:50",
        "insidePickup": true,
        "liftGateAtPickup": false,
        "limitedAccess": false
      },
      "labels": [
        {
          "documents": [
            {
              "documentId": "1111",
              "trackingNumber": "79405496348",
              "documentType": "ShippingLabel"
            },
            {
              "documentId": "1112",
              "trackingNumber": "79405499810",
              "documentType": "ShippingLabel"
            },
            {
              "documentId": "1113",
              "documentType": "PackageLabel"
            },
            {
              "documentId": "1114",
              "documentType": "PackageLabel"
            },
            {
              "documentId": "1115",
              "documentType": "PackageLabel"
            }
          ]
        }
      ],
      "packingSlip": [
        {
          "id": "124345346",
          "content": "<…BASE64 CONTENT…>"
        }
      ]
    },
{
      "shipmentId": "0001-063017-0002",
      "shipmentName": "FedExShipment02",
      "status": "In Transit",
      "externalRefNumber": "44421-1314324-2009",
      "originFacility": {
        "facilityName": "My Location 1",
        "addressLine1": "100 Papercraft Avenue",
        "addressLine2": "Suite 100",
        "city": "Pittsburgh",
        "stateCode": "PA",
        "zipCode": "15238",
        "countryCode": "US".
        "contactName": "John Smith",
        "contactPhoneCountryCode": "+1",
        "contactPhone": "2132331222",
        "contactEmailAddress": "origin.facility@gmail.com"
      },
      "destinationFacility": {
        "facilityCode": "HFY"
      },
      "products": [
        {
          "sku": "Fancy1",
          "quantityShipped": 2700,
          "quantityReceived": null
        },
        {
          "sku": "Fancy2",
          "quantityShipped": 2000,
          "quantityReceived": null
        }
      ],
      "lpns": [
        {
          "lpnType": "P",
          "lpnName": "Pallet 1",
          "numberOfLpns": 10,
          "customLpnIds": [],
          "dimension": {
            "length": 35.6,
            "width": 45.6,
            "height": 29
          },
          "weight": 12,
          "stackable": true,
          "lpnDetails": [
            {
              "sku": "Fancy1",
              "quantity": 20,
              "batchLotNumber": "A131231",
              "expireDate": "2017-10-14",
              "purchaseOrderId": "324324214123421",
              "purchaseOrderLineItemId": "324324214123421"
            },
            {
              "sku": "Fancy2",
              "quantity": 200,
              "lotNumber": null,
              "expirationDate": null,
              "purchaseOrderNumber": "324324214123421",
              "purchaseOrderLineItemId": "324324214123421"
            }
          ]
        },
        {
          "lpnType": "P",
          "lpnName": "Pallet 2",
          "numberOfLpns": 5,
          "customLpnIds": [
            "00000999990000128970",
            "00000999990000128971",
            "00000999990000128972",
            "00000999990000128973",
            "00000999990000128974"
          ],
          "dimension": {
            "length": 35.6,
            "width": 45.6,
            "height": 19
          },
          "weight": 12,
          "stackable": true,
          "lpnDetails": [
            {
              "sku": "Fancy1",
              "quantity": 500,
              "lotNumber": "A131231",
              "expirationDate": "2017-10-15",
              "purchaseOrderNumber": "324324214123421",
              "purchaseOrderLineItemId": "324324214123421"
            }
          ]
        }
      ],
      "productLevelServices": [
        {
          "sku": "Fancy1",
          "serviceLevelCode": "quality_audit_100",
          "serviceLevelDescription": "Counting"
        },
        {
          "sku": "Fancy1",
          "serviceLevelCode": "dust_bag_medium",
          "serviceLevelDescription": "Dust bag - medium"
},
        {
          "sku": "Fancy2",
          "serviceLevelCode": "dust_bag_large",
          "serviceLevelDescription": "Dust bag - large"
        }
      ],
      "shipping": {
        "fedexManaged": true,
        "freightShipment": true,
        "expectedArrivalDate": "2017-07-15",
        "carrierName": "FedEx Freight",
        "contactName": "Walter White",
        "phoneCountryCode": "+1",
        "contactPhone": "2132331222",
        "trackingBOLNumbers": [
          "134324324214242",
          "324231412342314"
        ],
        "pickupDate": "2017-11-01",
        "pickupStartTime": "11:01",
        "pickupEndTime": "21:30",
        "insidePickup": true,
        "liftGateAtPickup": true,
        "limitedAccess": false
      },
      "labels": [
        {
          "documents": [
            {
              "documentId": "1212",
              "documentType": "PackageLabel"
            },
            {
              "documentId": "1213",
              "documentType": "PackageLabel"
            }
          ]
        }
      ],
      "packingSlip": [
        {
          "id": "124345346",
          "content": "<…BASE64 CONTENT…>"
        }
      ],
      "billOfLading": [
        {
          "id": "121312",
          "content": "<…BASE64 CONTENT…>"
        }
      ]
    }
  ],
  "paging": {
    "previous": "https://<..........>/api/v1/inboundShipments?pageLimit=25&status=Complete&offset=0",
    "next": "https://<..........>/api/v1/inboundShipments?pageLimit=25&status=Complete&offset=25"
  }
}



      

Sample Error Response

Error Response

         


{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "success": false,
  "errors": [
    {
      "code": "ERR-SYS-0001",
      "description": "Your request cannot be processed due to a system error."
    }
  ]
}



      

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

Query Parameters

Parameter Data Type Description Multiple values allowed Required
shipmentId String FedEx shipment ID. This parameter allows up to 25 shipment IDs. Y N
externalRefNumber String External reference number. This parameter allows up to 25 reference numbers. N N
status String Status of the shipment. Valid Values: Error, Planned, In Transit, Receiving, Complete, Canceled. Y N
createdTimestamp String Time stamp(ISO8601 format) created by orders preceded by condition type delimited by pipe symbol.
Format:ge|2016-09-21T14:30:59-05:0

Valid values for condition type: gt, lt, eq, ge, le.
• gt (greater than)
• lt (less than)
• eq (equal to)
• ge (greater than equal to)
• le (less than equal to)
N N
lastUpdatedTimestamp String Last updated time stamp (ISO8601 format) preceded by condition type delimited by pipe symbol.
Format: ge|2016-09-21T14:30:59-05:00

Valid values for condition type: gt, lt, eq, ge, le.
• gt (greater than)
• lt (less than)
• eq (equal to)
• ge (greater than equal to)
• le (less than equal to)
N N
responseFilter String Default is All. Basic fields will be returned for all the response filters.
Valid Values: All, Basic, Lpn, Services, Shipping, Labels, BOL, PackingSlip.
Y N
pageLimit Number The number of records to be retrieved in each page. Valid Values: 1 to 100. Default is 50. N N
offset Number Offset value to be passed to retrieve the previous/next page. Not applicable for initial request. N N

Response Attribute

Parameter Data Type Description Filter Type
requestIdentifier String Request identifier Basic
transactionDate String Transaction date/time Basic
inboundShipments[]      
shipmentId String Identifier of the shipment. Basic
shipmentName String Shipment name provided while creating shipment. Basic
status String(Alphanumeric) Status of the shipment. Basic
externalRefNumber String External reference number for the shipment. Basic
inboundShipments[].originFacility      
facilityName String Origin facility name. Basic
addressLine1 String Origin facility – address line 1. Basic
addressLine2 String Origin facility – address line 2. Basic
city String Origin facility – city name. Basic
stateCode String Origin facility – state code. Basic
zipCode String Origin facility – ZIP code. Basic
countryCode String Origin facility – ISO country code. Basic
contactName String Origin facility – contact name. Basic
contactPhoneCountryCode String Origin facility - country code for the contact phone number.
Default is +1 (US/Canada).
Mandatory if the facility name does not exist in the fulfillment platform.
Basic
contactPhone String Origin facility – contact phone number.
Mandatory if the facility name does not exist in the fulfillment platform.
Basic
contactEmailAddress String Origin facility – contact email address.
Mandatory if the facility name does not exist in the fulfillment platform.
Basic
inboundShipments[].destinationFacility      
facilityCode String Destination facility code where the shipment is sent. Basic
inboundShipments[].products[]      
sku String Item SKU in the shipment. Lpn
quantityShipped Number Item quantity sent in the shipment. Lpn
quantityReceived Number Item quantity received in the shipment. Lpn
inboundShipments[].lpns[]      
lpnType String Type of the container – Case or Pallet. Lpn
lpnName String Name of the container assigned by the user. Lpn
numberOfLpns Number Number of containers with the same contents. Lpn
customLpnIds[] String Custom container IDs assigned by the user. Lpn
weight Number Weight of the container. Lpn
stackable Boolean Indicates whether pallets are stackable. Lpn
length Number Length of the container. Lpn
width Number Width of the container. Lpn
height Number Height of the container. Lpn
inboundShipments[].lpns[].lpnDetails[]      
sku String Item SKU associated with the container. Lpn
quantity Number Item quantity per container. Lpn
batchLotNumber String Batch Lot number associated with the item. Lpn
expireDate String Expiration date of the item. Lpn
purchaseOrderId String Purchase order ID. Lpn
purchaseOrderLineItemId String Purchase order line Item ID. Lpn
inboundShipments[].productLevelServices[]      
sku String Stock keeping unit (SKU) of the item. Services
serviceLevelCode String Service level to be performed for the item – refer to service level table. Services
serviceLevelDescription String Service level description. Services
inboundShipments[].shipping      
fedexManaged String Indicates whether shipment is managed by FedEx or third-party carrier. Shipping
freightShipment String Indicates whether this is a freight shipment. Shipping
expectedArrivalDate String Indicates whether this is a freight shipment. Shipping
freightShipment String Date when the facility can expect the shipment. Shipping
carrierName String Inbound carrier handling the shipment. Shipping
contactName String Contact name for the carrier. Shipping
phoneCountryCode String Country code for the phone number. Shipping
contactPhone String Contact name for the carrier. Shipping
trackingBOLNumbers[] String Tracking number or BOL number to track the shipment. Shipping
pickupDate String Shipment pickup date. Shipping
pickupStartTime String Shipment pickup start time. Shipping
pickupEndTime String Shipment pickup end time. Shipping
insidePickup Boolean Handling freight at positions not immediately adjacent to vehicle. Shipping
liftGateAtPickup Boolean Pick-up using liftgate equipment. Shipping
limitedAccess Boolean To include construction sites, schools, churches, military bases. Shipping
inboundShipments[].shipping.palletLpns[]      
weight Number Weight of the container. Shipping
stackable Boolean Indicates whether pallets are stackable. Shipping
inboundShipments[].shipping.palletLpns[].dimension      
length Number Length of the container. Shipping
width Number Width of the container. Shipping
height Number Height of the container. Shipping
inboundShipments[].labels[].documents[]      
documentId String ID associated with the document. Labels
trackingNumber String Tracking number associated with the document.
This is applicable only for shipping labels.
Labels
documentType String Type of document associated with the ID.
Values returned:
ShippingLabel
PackageLabel
Labels
inboundShipments[].packingSlip[]      
id String ID associated with packing slip document. PackingSlip
content String Base64 encoded string of packing slip PDF file. PackingSlip
inboundShipments[].billOfLading[]      
id String ID associated with bill of lading document. BOL
content String Base64 encoded string of BOL PDF file. BOL
paging      
previous String Link to retrieve the previous page (if applicable)  
next String Link to retrieve the next page (if applicable)  
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-ASN-0005 Shipment is received by the warehouse and cannot be updated
ERR-ASN-0006 Invalid Origin facility name
ERR-ASN-0007 Origin facility name does not exist
ERR-ASN-0008 Invalid Origin address line 1 value
ERR-ASN-0009 Invalid Origin city value
ERR-ASN-0010 Invalid Origin state code
ERR-ASN-0011 Invalid Origin postal code
ERR-ASN-0012 Invalid Origin country code
ERR-ASN-0013 Invalid destination facility code
ERR-ASN-0016 Invalid Lpn type value <Lpn type>
ERR-ASN-0017 Invalid number of LPNs value
ERR-ASN-0018 Quantity of custom LPN IDs does not match number of LPNs (<Number of LPNs>)
ERR-ASN-0019 Invalid length value
ERR-ASN-0020 Invalid width value
ERR-ASN-0021 Invalid height value
ERR-ASN-0022 Invalid weight value
ERR-ASN-002 <Field name> - Value must be true or false
ERR-ASN-0024 Product <SKU> is not recognized in the Product Catalog
ERR-ASN-0025 Invalid quantity
ERR-ASN-0026 Invalid expiration date: <Expiration date>
ERR-ASN-0027 Expiration date is required for the product <SKU>
ERR-ASN-0028 Expiration date <Expiration date> cannot be less than current date
ERR-ASN-0029 Invalid service level <service level code>
ERR-ASN-0030 Invalid Item SKU
ERR-ASN-0031 Product <SKU> does not exist in LpnDetail record
ERR-ASN-0032 When shipping internationally, please ship with third party service
ERR-ASN-0033 Invalid Expected arrival date <Expected arrival date>
ERR-ASN-0034 Expected arrival date <Expected arrival date> cannot be less than current date
ERR-ASN-0035 Invalid Inbound carrier name
ERR-ASN-0036 Invalid Contact name
ERR-ASN-0037 Invalid Phone number
ERR-ASN-0038 Invalid Pickup date
ERR-ASN-0039 Invalid Pickup start time
ERR-ASN-0040 Pickup start time should be less than end time
ERR-ASN-0041 Invalid Pickup end time
ERR-ASN-0042 Multiple Lpn type values found
ERR-ASN-0043 Inbound shipment already exists
ERR-ASN-0044 Update failed because inbound shipment status does not allow updates
ERR-ASN-0045 Shipping section cannot be empty for this inbound shipment
ERR-ASN-0046 Inbound shipment does not exist
ERR-ASN-0047 Connection is inactive
ERR-ASN-0048 There is an address error on your origin facility
ERR-ASN-0049 Shipping information is missing for this inbound shipment
ERR-ASN-0051 Pallet information is missing
ERR-ASN-0052 Rates cannot be retrieved due to invalid shipment status
ERR-ASN-0053 Required fields are missing
ERR-ASN-0054 Bill of Lading document is not generated at this time. Please try after some time.
ERR-ASN-0055 Lot number provided for a product which has Batch/Lot not enabled
ERR-ASN-0056 Invalid Origin Contact Name
ERR-ASN-0057 Invalid Origin Contact Phone number
ERR-ASN-0058 Invalid Email address format
ERR-ASN-0059 Invalid Quote ID
ERR-ASN-0060 Quote already approved
ERR-ASN-0061 Destination facility cannot be updated