Marketplaces / Amazon SP API - Technical Scope / Amazon SP API - Vendor Technical Scope / Amazon SP API Vendor Direct Fulfillment Phase 2 / Amazon...

Amazon Vendor DF Get Orders

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Version Date Created / Updated Notes
v1.0 09.02.2024 Bogomil Pavlov First publish

All validations, triggers and standardizations are as per

Order management general requirements

Get Orders

The first run of the cron will need to check for orders in the last 6 months and after successful run to store a new record in last_date_run table.

If we already have a record for the specific cron we will need to overlap 90 minutes from the last_date_run > date_created field.

API Call: GET /[vendor/directFulfillment/orders/v1/purchaseOrders?](https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/orders/v1/purchaseOrders?limit=2&createdAfter=2020-02-15T14:00:00-08:00&createdBefore=2020-02-20T00:00:00-08:00&sortOrder=DESC&includeDetails=true)

Docs: selling-partner-api-docs/ordersV0.md at main · amzn/selling-partner-api-docs · GitHub

All available parameters:

Name Description Required
shipFromPartyId The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.Type: string No
status Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.Type: enum ( Status ) No
limit The limit to the number of purchase orders returned.Minimum : 1

Maximum : 100 Type: integer (int64) | No | | createdAfter | Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.Type: string (date-time) | Yes | | createdBefore | Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.Type: string (date-time) | Yes | | sortOrder | Sort the list in ascending or descending order by order creation date.Type: enum ( SortOrder ) | No | | nextToken | Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.Type: string | No | | includeDetails | When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.Type: string (boolean) Default: true | No |

The parameters which we want to use are: includeDetails - always true

nextToken - used for pagination

createdAfter - for the first run we want 6 months back or we use the date from last_date_run with 90 minutes overlap in ISO-8601 format

createdBefore- this will be always the current time in ISO-8601 format

limit - Always 100

Sample Request: GET [https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/orders/v1/purchaseOrders?limit=2&createdAfter=2020-02-15T14:00:00-08:00&createdBefore=2020-02-20T00:00:00-08:00&sortOrder=DESC&includeDetails=true](https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/orders/v1/purchaseOrders?limit=2&createdAfter=2020-02-15T14:00:00-08:00&createdBefore=2020-02-20T00:00:00-08:00&sortOrder=DESC&includeDetails=true)

Sample Response:

{
  "pagination": {
    "nextToken": "MDAwMDAwMDAwMQ=="
  },
  "orders": [
    {
      "purchaseOrderNumber": "2JK3S9VC",
      "orderDetails": {
        "customerOrderNumber": "123-ABC",
        "orderDate": "2020-02-20T13:51:00Z",
        "shipmentDetails": {
          "isPriorityShipment": false,
          "isScheduledDeliveryShipment": false,
          "isPslipRequired": true,
          "isGift": false,
          "shipMethod": "UPS_2ND",
          "shipmentDates": {
            "requiredShipDate": "2020-02-21T00:00:00Z",
            "promisedDeliveryDate": "2020-02-24T00:00:00Z"
          },
          "messageToCustomer": "This shipment completes your order. You can always check the status of your orders from the \"Your Account\" link at the top of each page of our site.Thank you for shopping at Amazon.com"
        },
        "taxTotal": {
          "taxLineItem": [
            {
              "taxRate": "0.1",
              "taxAmount": {
                "currencyCode": "USD",
                "amount": "190"
              },
              "type": "TOTAL"
            }
          ]
        },
        "sellingParty": {
          "partyId": "999US"
        },
        "shipFromParty": {
          "partyId": "ABCD"
        },
        "shipToParty": {
          "name": "John Doe",
          "attention": "John Doe",
          "addressLine1": "123 Any Street",
          "addressLine2": "Apt 5",
          "city": "Any Town",
          "stateOrRegion": "CA",
          "postalCode": "94086",
          "countryCode": "USA"
        },
        "billToParty": {
          "partyId": "ABCD"
        },
        "items": [
          {
            "itemSequenceNumber": "00001",
            "buyerProductIdentifier": "B07DFVDRAB",
            "vendorProductIdentifier": "8806098286500",
            "title": "LG 8 kg Inverter Wi-Fi Fully-Automatic Front Loading Washing Machine (FHT1408SWS, STS-VCM, Inbuilt Heater)",
            "orderedQuantity": {
              "amount": 1,
              "unitOfMeasure": "EACH"
            },
            "netPrice": {
              "currencyCode": "USD",
              "amount": "500"
            },
            "taxDetails": {
              "taxLineItem": [
                {
                  "taxRate": "0.1",
                  "taxAmount": {
                    "currencyCode": "USD",
                    "amount": "50"
                  },
                  "type": "TOTAL"
                }
              ]
            }
          },
          {
            "itemSequenceNumber": "00002",
            "buyerProductIdentifier": "B07DFYF5AB",
            "vendorProductIdentifier": "8806098286123",
            "title": "LG 6.5 kg Inverter Fully-Automatic Front Loading Washing Machine (FHT1065SNW, Blue and White, Inbuilt Heater)",
            "orderedQuantity": {
              "amount": 2,
              "unitOfMeasure": "EACH"
            },
            "netPrice": {
              "currencyCode": "USD",
              "amount": "700"
            },
            "taxDetails": {
              "taxLineItem": [
                {
                  "taxRate": "0.1",
                  "taxAmount": {
                    "currencyCode": "USD",
                    "amount": "140"
                  },
                  "type": "TOTAL"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

Mapping:

Status Mapping:

Limits:

Is this article helpful?
0 0 0