Update Inbound Shipment

This API updates an existing shipment within the fulfillment platform. If the shipment cannot be updated, the API call will return an error.

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}:
    put:
      responses:
        200:
          description: 200 OK
      parameters:
      - name: update_inboundShipments_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

         
{
	"externalRefNumber": "32421-1314324-2131",
	"shipmentName": "FedEx Shipment01",
	"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"
	},
	"lpns": [{
			"lpnType": "C",
			"lpnName": "Case 1",
			"numberOfLpns": 10,
			"customLpnIds": [],
			"dimension": {
				"length": 25.6,
				"width": 45.6,
				"height": 19
			},
			"weight": 12,
			"stackable": true,
			"applyDeclaredValue": true,
			"declaredValue": 125.60,
			"lpnDetails": [{
					"sku": "Fancy1",
					"quantity": 20,
					"batchLotNumber": "A131231",
					"expireDate": "2017-10-14",
					"purchaseOrderId": "324324214123421",
					"purchaseOrderLineItemId": "43532423432432"
				}, {
					"sku": "Fancy2",
					"quantity": 200,
					"batchlotNumber": null,
					"expireDate": null,
					"purchaseOrderId": "324324214123421",
					"purchaseOrderLineItemId": "43532423432433"
				}
			]
		}, {
			"lpnType": "C",
			"lpnName": "Case 2",
			"numberOfLpns": 5,
			"customLpnIds": [
				"00000999990000128970",
				"00000999990000128971",
				"00000999990000128972",
				"00000999990000128973",
				"00000999990000128974"
			],
			"dimension": {
				"length": 25.6,
				"width": 45.6,
				"height": 19
			},
			"weight": 12,
			"stackable": true,
			"applyDeclaredValue": false,
			"lpnDetails": [{
					"sku": "Fancy1",
					"quantity": 500,
					"batchlotNumber": "A131231",
					"expireDate": "2017-10-15",
					"purchaseOrderNumber": "324324214123421",
					"purchaseOrderLineItemId": "43532423432434"
				}
			]
		}
	],
	"productLevelServices": [{
			"sku": "Fancy1",
			"serviceLevelCode": "quality_audit_100"
		}, {
			"sku": "Fancy1",
			"serviceLevelCode": "bubble_wrap_small"
		}, {
			"sku": "Fancy2",
			"serviceLevelCode": "dust_bag_small"
		}
	],
	"shipping": {
		"fedexManaged": false,
		"freightShipment": true,
		"expectedArrivalDate": "2017-07-15",
		"transportation": "carrier",
		"carrierSCAC": "FEDX",
		"trackingBOLNumbers": [
			"134324324214242",
			"324231412342314"
		],
		"pickupDate": "2017-11-01",
		"pickupStartTime": "11:01",
		"pickupEndTime": "21:30",
		"insidePickup": true,
		"liftGateAtPickup": true,
		"limitedAccess": false,
		"palletLpns": [{
				"dimension": {
					"length": 35.6,
					"width": 45.6,
					"height": 29
				},
				"weight": 32,
				"stackable": true
			}
		]
	}
}

      

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

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

Request Attributes

Parameter Data type Description Required
externalRefNumber String External reference number for the shipment.
If provided, the value should be unique in the system. Duplicate shipment validation will be performed using this value.
N
shipmentName String A free-text shipment name defined by user. N
originFacility      
facilityName String Origin facility name.
If facility name exists in the fulfillment platform, address fields need not be provided. If it does not exist, address fields are mandatory. Facility will be added to the platform if it does not exist.
Y
addressLine1 String Origin facility – address line 1.
Mandatory if facility name does not exist in the fulfillment platform.
C
addressLine2 String Origin facility – address line 2. N
city String Origin facility – city name.
Mandatory if facility name does not exist in the fulfillment platform.
C
stateCode String Origin facility – stateCode.
It should be 2-character state code for US and Canada. Mandatory for US and Canada and if the facility name does not exist in the fulfillment platform.
C
zipCode String Origin facility – ZIP code.
Mandatory if facility name does not exist in the fulfillment platform.
C
countryCode String Origin facility - ISO country code.
Mandatory if the facility name does not exist in the fulfillment platform.
C
contactName String Origin facility - contact name.
Mandatory if the facility name does not exist in the fulfillment platform.
C
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.
N
contactPhone String Origin facility – contact phone number.
Mandatory if the facility name does not exist in the fulfillment platform.
C
contactEmailAddress String Origin facility - contact email address.
Mandatory if the facility name does not exist in the fulfillment platform.
N
destinationFacility      
facilityCode String Destination facility code.
Valid Values:
HFY (Greenwood, IN)
FCA (Fontana, CA)
Y
lpns[]      
lpnType String Type of the container/LPN – Case or Pallet.
Valid Values: C, P.
Y
lpnName String Name of the container/LPN assigned by the user. If not provided, system will assign the name. N
numberOfLpns Number Number of containers/LPNs with the same contents. Default is 1. N
customLpnIds[] String Custom container IDs assigned by the user. Number of container IDs provided should match the number of containers. N
weight Number Weight of the container.
Mandatory for a FedEx-managed shipment.
C
stackable Boolean Indicates whether pallets are stackable. N
applyDeclaredValue Boolean Indicates whether declated value should be applied to the lpn.
Applicable only when lpnType = C
N
declaredValue Number Declared value of the lpn. Applicable only when applyDeclaredValue = true. Value cannot be more than $50,000. N
lpns[].dimensions      
length Number Length of the container.
Mandatory for a FedEx-managed shipment.
C
width Number Width of the container.
Mandatory for a FedEx-managed shipment.
C
height Number Height of the container.
Mandatory for a FedEx-managed shipment.
C
lpns[].lpnDetails[]      
sku String Item SKU associated with the container. Y
quantity Number Item quantity per container. Y
batchLotNumber String Batch lot number associated with the item. N
expireDate String Expiration date of the item.
Mandatory for perishable items.
Format: YYYY-MM-DD
C
purchaseOrderId String Purchase Order ID. N
purchaseOrderLineItemId String Purchase Order Line Item ID. N
productLevelServices[]      
sku String Stock keeping unit (SKU) of the item. N
serviceLevelCode String Service level to be performed for the item – refer to service level table. N
Shipping      
fedexManaged Boolean Indicates whether shipment is managed by FedEx or third-party carrier.
Currently, FedEx supports US domestic shipments only.
Y
freightShipment Boolean Indicates whether this is a freight shipment.
Applicable only for LPN type = C (Case).
N
expectedArrivalDate String Date when the facility can expect the shipment.
Mandatory when FedEx managed shipments = false.
Format: YYYY-MM-DD .
C
transportation String Tranportation entity – carrier or broker.
transportation is mandatory when fedexManaged = false
C
carrierSCAC   Inbound carrier SCAC handling the shipment.
carrierSCAC is mandatory if transportation=carrier
C
brokerName   Inbound broker name handling the shipment. Required if the transportation is “broker” C
carrierName String Inbound carrier handling the shipment.
Standard values accepted are given below. Non-standard values are also accepted.
Mandatory when FedEx-managed shipments = false.
Standard values: FedEx, UPS, USPS, DHL
C
contactName String Contact name for the carrier.
Mandatory for non-standard carrier name.
C
phoneCountryCode Boolean Country code for the phone number.
Default is +1 (US/Canada).
N
contactPhone String Contact phone number 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 Pick-up using liftgate equipment.
Applicable for FedEx-managed pallet shipment.
N
limitedAccess Boolean To include construction sites, schools, churches, military bases.
Applicable only for FedEx-managed pallet shipment.
N
shipping.palletLpns[]      
weight Number Weight of the container.
Mandatory when fedexManaged=true and freightShipping = true.
C
stackable Boolean Indicates whether pallets are stackable. N
shipping.palletLpns[].dimensions      
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
generateShippingLabel Boolean Shipping Label generation is required or not. N
generatePackingLabel Boolean Packing Label generation is required or not N

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
ERR-ASN-0062 Declared value cannot be provided when applyDeclaredValue is not true
ERR-ASN-0063 Invalid declared value
ERR-ASN-0064 Declared value cannot be more then $50,000
ERR-ASN-0065 Invalid transportation
ERR-ASN-0066 Invalid Broker Name
ERR-ASN-0067 ASN required field transportation is missing
ERR-ASN-0068 ASN required field carrierSCAC is missing
ERR-ASN-0069 ASN required field brokerName is missing
ERR-ASN-0070 Carrier SCAC not found
ERR-ASN-0071 Broker Organization not found
ERR-ASN-0072 Destination facility is not active for this retailer
ERR-MAC-0001 This transaction is not authorized at master account
ERR-MAC-0002 Required marketplaceRetailerId is missing in the request header
ERR-MAC-0003 The marketplaceRetailerId is not associated with the retailer Id