Create/Update Shipping Details

This API creates or updates the shipping details for a shipment. The inbound shipment will not be sent to a fulfillment center by the system until the shipping details are provided. The shipping details cannot be updated if the shipment is already received by the fulfillment center.

Swagger

         
swagger: '2.0'
info:
  x-ibm-name: inboundShipments
  title: inboundShipments
  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:
  /inboundShipments/{shipmentId}/shipping:
    post:
      responses:
        200:
          description: 200 OK
      parameters:
      - name: sample_json_body
        required: true
        in: body
        schema:
          type: json
        description: ''
      - name: AccessToken
        type: string
        required: false
        in: header
        description: Enter Access Token, it is required header
      	

      

Sample Request

         
FedEx-managed – Pallet shipment
{
	"fedexManaged": true,
	"freightShipping": true,
	"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
}

FedEx - managed – Pallet shipment for case packing
{
	"fedexManaged": true,
	"freightShipping": true,
	"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,
	"palletLpns": [{
			"dimension": {
				"length": 25.6,
				"width": 45.6,
				"height": 19
			},
			"weight": 12,
			"stackable": true
		}, {
			"dimension": {
				"length": 25.6,
				"width": 45.6,
				"height": 19
			},
			"weight": 12,
			"stackable": true
		}
	]
}

Non-FedEx-managed – Parcel shipment

{
  "fedexManaged": false,
  "expectedArrivalDate": "2017-07-15",
  "carrierName": "USPS",
  "trackingBOLNumbers": [
    "13432432421",
    "324231412342314"
  ]
}

 
      

Sample Response

Success Response

         
{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "success": true,
  "inboundShipment": {
    "shipmentId": "0001-063017-0001",
    "status": "In Transit"
  }
}


      

Error Response

Error Response

         
{
  "requestIdentifier": "01749ea2-4b8f-4f3d-a9dc-f0b862a3d72e",
  "transactionDate": "2017-01-20T15:12:54-05:00",
  "success": false,
  "errors": [
    {
      "code": "ERR-CMR-0001",
      "description": "Input data validation failed"
    }
  ]
}


      

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

Request Attributes

Parameter Data type Description Required
fedexManaged Boolean Indicates whether shipment is managed by FedEx or third-party carrier.
Currently, FedEx supports US domestic shipments only.
Y
freightShipping Boolean Indicates whether this is a freight shipment.
Applicable only for case (parcel) shipment.
N
expectedArrivalDate String Date when the facility can expect the shipment. Mandatory when fedexManaged = false.
Format: YYYY-MM-DD
C
carrierName String Inbound carrier handling the shipment.
Standard values accepted are given below. Non-standard values are also accepted.
Mandatory when fedexManaged = false.
Standard values: UPS, USPS, DHL.
C
contactName String Contact name for the carrier.
Mandatory for non-standard carrier name.
C
phoneCountryCode String Country code for the phone number.
Default is +1 (US/Canada)
N
contactPhone String Contact name for the Carrier.
Mandatory for non-standard carrier name.
C
trackingBOLNumbers[] String Tracking number or BOL number to track the shipment. N
pickupDate String Shipment pickup date.
Applicable and mandatory only for FedEx-managed pallet shipment.
Format: YYYY-MM-DD
C
pickupStartTime String Shipment pickup start time.
Applicable and mandatory only for FedEx-managed pallet shipment.
Format: HH:MM (24-hour format)
C
pickupEndTime String Shipment pickup end time.
Applicable and mandatory only for FedEx-managed pallet shipment.
Format: HH:MM (24-hour format)
C
insidePickup Boolean Handling freight at positions not immediately adjacent to vehicle.
Applicable only for FedEx-managed pallet shipment.
N
liftGateAtPickup Boolean To include construction sites, schools, churches, military bases.
Applicable only for FedEx-managed pallet shipment.
N
limitedAccess Boolean To include construction sites, schools, churches, military bases.
Applicable only for FedEx-managed pallet shipment.
N
palletLpns[]      
weight Number Weight of the container.
Mandatory when fedexManaged= true and freightShipping = true.
C
stackable Boolean Indicates whether pallets are stackable. N
palletLpns[].dimension      
length Number Length of the container.
Mandatory when fedexManaged=true and freightShipping = true.
C
width Number Width of the container.
Mandatory when fedexManaged= true and freightShipping = true.
C
height Number Height of the container.
Mandatory when fedexManaged= true and freightShipping = true.
C

Response Attribute

Parameter Data type Description
requestIdentifier String Request identifier.
transactionDate Date Transaction date/time.
success boolean Status of the transaction
Valid Values: true or false
inboundShipment    
shipmentId String Identifier for the shipment.
status String Status of the shipment.
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-0023 <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