Marketplaces / Amazon SP API - Technical Scope / Amazon SP API - Vendor Technical Scope / Amazon SP API Vendor Procurement / Amazon Vendor Procurem...

Amazon Vendor Procurement Get Shipments

Get Shipments

After we create the SubmitShipment we need to get its amazonReferenceNumber which we have to use if the vendor is using Amazon for collection and delivery.

API Call: GET /vendor/shipping/v1/shipments

Docs: https://developer-docs.amazon.com/sp-api/docs/vendor-shipments-api-v1-reference#getshipmentdetails

Sample Request: GET https://sellingpartnerapi-na.amazon.com/vendor/shipping/v1/shipments

Parameters

Name Description Schema
limit The limit to the number of records returned. Default value is 50 records.Minimum : 1Maximum : 50 integer (int64)
sortOrder Sort in ascending or descending order by purchase order creation date. enum (SortOrder)
nextToken Used for pagination when there are more shipments than the specified result size limit. string
createdAfter Get Shipment Details that became available after this timestamp will be included in the result. Must be in ISO 8601 format. string (date-time)
createdBefore Get Shipment Details that became available before this timestamp will be included in the result. Must be in ISO 8601 format. string (date-time)
shipmentConfirmedBefore Get Shipment Details by passing Shipment confirmed create Date Before. Must be in ISO 8601 format. string (date-time)
shipmentConfirmedAfter Get Shipment Details by passing Shipment confirmed create Date After. Must be in ISO 8601 format. string (date-time)
packageLabelCreatedBefore Get Shipment Details by passing Package label create Date by buyer. Must be in ISO 8601 format. string (date-time)
packageLabelCreatedAfter Get Shipment Details by passing Package label create Date After by buyer. Must be in ISO 8601 format. string (date-time)
shippedBefore Get Shipment Details by passing Shipped Date Before. Must be in ISO 8601 format. string (date-time)
shippedAfter Get Shipment Details by passing Shipped Date After. Must be in ISO 8601 format. string (date-time)
estimatedDeliveryBefore Get Shipment Details by passing Estimated Delivery Date Before. Must be in ISO 8601 format. string (date-time)
estimatedDeliveryAfter Get Shipment Details by passing Estimated Delivery Date Before. Must be in ISO 8601 format. string (date-time)
shipmentDeliveryBefore Get Shipment Details by passing Shipment Delivery Date Before. Must be in ISO 8601 format. string (date-time)
shipmentDeliveryAfter Get Shipment Details by passing Shipment Delivery Date After. Must be in ISO 8601 format. string (date-time)
requestedPickUpBefore Get Shipment Details by passing Before Requested pickup date. Must be in ISO 8601 format. string (date-time)
requestedPickUpAfter Get Shipment Details by passing After Requested pickup date. Must be in ISO 8601 format. string (date-time)
scheduledPickUpBefore Get Shipment Details by passing Before scheduled pickup date. Must be in ISO 8601 format. string (date-time)
scheduledPickUpAfter Get Shipment Details by passing After Scheduled pickup date. Must be in ISO 8601 format. string (date-time)
currentShipmentStatus Get Shipment Details by passing Current shipment status. string
vendorShipmentIdentifier Get Shipment Details by passing Vendor Shipment ID string
buyerReferenceNumber Get Shipment Details by passing buyer Reference ID string
buyerWarehouseCode Get Shipping Details based on buyer warehouse code. This value should be same as 'shipToParty.partyId' in the Shipment. string
sellerWarehouseCode Get Shipping Details based on vendor warehouse code. This value should be same as 'sellingParty.partyId' in the Shipment. string

The parameters which we want to use are:

nextToken - used for pagination

createdAfter- Either 90 days or 90 minutes earlier from the last_date_run > date_created for this cron

limit - Always 50

This way we will obtain all shipments for the certain period and we can map the ids using the Order > Marketplace Order Id. We want to get the shipments for all “Shipped” or “Partially Shipped” orders that have completed order shipment and do not have Order Shipment > External Id. Sample Response:

{
  "payload": {
    "pagination": {
      "nextToken": "MDAwMDAwMDAwMQ=="
    },
    "shipments": [
      {
        "vendorShipmentIdentifier": "00050003",
        "buyerReferenceNumber": "1234567",
        "currentShipmentStatus": "CarrierAssigned",
        "currentshipmentStatusDate": "2019-08-09T19:56:45.632",
        "shipmentStatusDetails": [
          {
            "shipmentStatus": "CarrierAssigned",
            "shipmentStatusDate": "2019-08-09T19:56:45.632"
          },
          {
            "shipmentStatus": "TransportationRequested",
            "shipmentStatusDate": "2019-07-07T19:56:45.632"
          },
          {
            "shipmentStatus": "Created",
            "shipmentStatusDate": "2019-07-06T19:56:45.632"
          }
        ],
        "shipmentCreateDate": "2019-07-07T19:56:45.632",
        "shipmentConfirmDate": "2019-08-07T19:56:45.632",
        "packageLabelCreateDate": "2019-08-07T19:56:45.632",
        "shipmentFreightTerm": "Collect",
        "sellingParty": {
          "partyId": "998US"
        },
        "shipFromParty": {
          "address": {
            "name": "ABC electronics warehouse",
            "addressLine1": "DEF 1st street",
            "city": "Lisses",
            "stateOrRegion": "abcland",
            "postalCode": "91090",
            "countryCode": "DE"
          },
          "partyId": "ABCD12"
        },
        "shipToParty": {
          "partyId": "999US"
        },
        "shipmentMeasurements": {
          "totalCartonCount": 30,
          "totalPalletStackable": 30,
          "totalPalletNonStackable": 30,
          "shipmentWeight": {
            "unitOfMeasure": "Kg",
            "value": "120.45"
          },
          "shipmentVolume": {
            "unitOfMeasure": "CuFt",
            "value": "2.4"
          }
        },
        "collectFreightPickupDetails": {
          "requestedPickUp": "2019-08-07T19:56:45.632",
          "scheduledPickUp": "2019-08-07T19:56:45.632",
          "carrierAssignmentDate": "2019-08-07T19:56:45.632"
        },
        "purchaseOrders": [
          {
            "purchaseOrderNumber": "1BBBAAAA",
            "purchaseOrderDate": "2019-08-06T19:56:45.632",
            "shipWindow": "08/25/2021 - 08/31/2021",
            "items": [
              {
                "itemSequenceNumber": "001",
                "vendorProductIdentifier": "9782700001659",
                "buyerProductIdentifier": "9782700001690",
                "shippedQuantity": {
                  "amount": 100,
                  "unitOfMeasure": "Eaches",
                  "unitSize": 1
                },
                "maximumRetailPrice": {
                  "currencyCode": "USD",
                  "amount": "12345"
                }
              }
            ]
          }
        ],
        "importDetails": {
          "methodOfPayment": "PaidByBuyer",
          "sealNumber": "1232142132",
          "route": {
            "stops": [
              {
                "functionCode": "PortOfDischarge",
                "locationIdentification": {
                  "type": "string",
                  "locationCode": "string",
                  "countryCode": "US"
                },
                "arrivalTime": "2021-07-12T22:22:25.038Z",
                "departureTime": "2021-07-12T22:22:25.038Z"
              }
            ]
          },
          "importContainers": "string",
          "billableWeight": {
            "unitOfMeasure": "G",
            "value": "10"
          },
          "estimatedShipByDate": "2021-07-12T22:22:25.038Z",
          "handlingInstructions": "Oversized"
        },
        "containers": [
          {
            "containerType": "carton",
            "containerSequenceNumber": "001",
            "containerIdentifiers": [
              {
                "containerIdentificationType": "SSCC",
                "containerIdentificationNumber": "213124134213"
              }
            ],
            "trackingNumber": "XXXX",
            "dimensions": {
              "length": "12",
              "width": "12",
              "height": "12",
              "unitOfMeasure": "IN"
            },
            "weight": {
              "unitOfMeasure": "KG",
              "value": "10"
            },
            "packedItems": [
              {
                "itemSequenceNumber": "001",
                "buyerProductIdentifier": "B07DFVDRAA",
                "vendorProductIdentifier": "12312412421",
                "packedQuantity": {
                  "amount": 1,
                  "unitOfMeasure": "Each"
                },
                "itemDetails": {
                  "purchaseOrderNumber": "string",
                  "lotNumber": "string",
                  "expiry": {
                    "manufacturerDate": "2021-07-12T22:22:25.038Z",
                    "expiryDate": "2021-07-12T22:22:25.038Z",
                    "expiryAfterDuration": {
                      "durationUnit": "Days",
                      "durationValue": 0
                    }
                  }
                }
              },
              {
                "containerType": "pallet",
                "containerSequenceNumber": "002",
                "containerIdentifiers": [
                  {
                    "containerIdentificationType": "SSCC",
                    "containerIdentificationNumber": "ARK123214214213"
                  }
                ],
                "trackingNumber": "TRACK001",
                "dimensions": {
                  "length": "12",
                  "width": "12",
                  "height": "12",
                  "unitOfMeasure": "IN"
                },
                "weight": {
                  "unitOfMeasure": "KG",
                  "value": "10"
                },
                "tier": 2,
                "block": 2,
                "innerContainersDetails": {
                  "containerCount": 10,
                  "containerSequenceNumbers": [
                    {
                      "containerSequenceNumber": "002"
                    },
                    {
                      "containerSequenceNumber": "003"
                    }
                  ]
                },
                "packedItems": [
                  {
                    "itemSequenceNumber": "001",
                    "buyerProductIdentifier": "B07DFVDRAA",
                    "vendorProductIdentifier": "12312412421",
                    "packedQuantity": {
                      "amount": 1,
                      "unitOfMeasure": "Each"
                    },
                    "itemDetails": {
                      "purchaseOrderNumber": "string",
                      "lotNumber": "string",
                      "expiry": {
                        "manufacturerDate": "2021-07-12T22:22:25.038Z",
                        "expiryDate": "2021-07-12T22:22:25.038Z",
                        "expiryAfterDuration": {
                          "durationUnit": "Days",
                          "durationValue": 0
                        }
                      }
                    }
                  }
                ]
              }
            ]
          }
        ],
        "transportationDetails": {
          "shipMode": "LessThanTruckLoad",
          "transportationMode": "Road",
          "shippedDate": "2019-08-07T19:56:45.632",
          "estimatedDeliveryDate": "2019-08-07T19:56:45.632",
          "shipmentDeliveryDate": "2019-08-07T19:56:45.632",
          "carrierDetails": {
            "name": "UPS",
            "phone": "1234567890",
            "email": "abc@xyz.com",
            "code": "string",
            "shipmentReferenceNumber": "TRACK001"
          },
          "billOfLadingNumber": "string"
        }
      }
    ]
  }
}

Sample Mapping: From the response we want to store only the buyerReferenceNumber and use the purchaseOrderNumber for mapping purposes.

Amazon Field Hemi Field Comment
shipments
vendorShipmentIdentifier <v1.2>We want to use the vendorShipmentIdentifier which is our Order Shipment > ID to map the correct shipment</v1.2>
buyerReferenceNumber Order Shipment > External Id
purchaseOrders
purchaseOrderNumber We want to use the purchaseOrderNumber which is our Orders > Marketplace Order Id to map the shipment to the correct order

Error Response: TBA

Is this article helpful?
0 0 0