Endpoint Get Vendor PurchaseOrders
Name
get_vendor_purchaseorders
Description
Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. [API reference]
Parameters
Parameter | Required | Options | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: CreatedAfter Purchase orders that became available after this time will be included in the result. Must be in ISO 8601 date/time format. Date format must be UTC - ISO 8601 format (e.g. short date 2017-02-10 -OR- date and time 2017-02-10T12:10:02). If LastUpdatedAfter is not specified. Specifying both CreatedAfter and LastUpdatedAfter returns an error. You can use static values or date functions. Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start) |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: CreatedBefore Purchase orders that became available before this time will be included in the result. Must be in ISO 8601 date/time format. Date format must be UTC - ISO 8601 format (e.g. short date 2017-02-10 -OR- date and time 2017-02-10T12:10:02) You can use static values or date functions. Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start) |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: ChangedAfter Purchase orders that changed after this timestamp will be included in the result. Must be in ISO 8601 date/time format. Date format must be UTC - ISO 8601 format (e.g. short date 2017-02-10 -OR- date and time 2017-02-10T12:10:02). If CreatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.If LastUpdatedAfter is specified, then BuyerEmail and SellerOrderId cannot be specified. You can use static values or date functions. Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start) |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: ChangedBefore Purchase orders that changed before this timestamp will be included in the result. Must be in ISO 8601 date/time format. Date format must be UTC - ISO 8601 format (e.g. short date 2017-02-10 -OR- date and time 2017-02-10T12:10:02) You can use static values or date functions. Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start) |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: IncludeDetails When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true. |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: SortOrder Sort in ascending or descending order by purchase order creation date. |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: PoItemState Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero. |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: IsPOChanged When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false. |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: PurchaseOrderState Filters purchase orders based on the purchase order state. |
|
|||||||||||||||||||||||||||||||||||||||
Name:
Label: OrderingVendorCode Filters purchase orders based on the specified ordering vendor code. This value should be same as 'sellingParty.partyId' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned. |
||||||||||||||||||||||||||||||||||||||||
Name:
Label: PageSize |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
PurchaseOrderNumber |
DT_WSTR
|
nvarchar(50)
|
50 | |
PurchaseOrderState |
DT_WSTR
|
nvarchar(50)
|
50 | |
PurchaseOrderDate |
DT_DBTIMESTAMP
|
datetime
|
||
PurchaseOrderChangedDate |
DT_DBTIMESTAMP
|
datetime
|
||
PurchaseOrderStateChangedDate |
DT_DBTIMESTAMP
|
datetime
|
||
PurchaseOrderType |
DT_WSTR
|
nvarchar(50)
|
50 | |
PaymentMethod |
DT_WSTR
|
nvarchar(50)
|
50 | |
BuyingPartyPartyId |
DT_WSTR
|
nvarchar(50)
|
50 | |
SellingPartyPartyId |
DT_WSTR
|
nvarchar(50)
|
50 | |
ShipToPartyPartyId |
DT_WSTR
|
nvarchar(50)
|
50 | |
BillToPartyPartyId |
DT_WSTR
|
nvarchar(50)
|
50 | |
ShipWindow |
DT_WSTR
|
nvarchar(200)
|
200 | |
Items |
DT_NTEXT
|
nvarchar(MAX)
|
||
ImportContainers |
DT_WSTR
|
nvarchar(100)
|
100 | |
InternationalCommercialTerms |
DT_WSTR
|
nvarchar(500)
|
500 | |
MethodOfPayment |
DT_WSTR
|
nvarchar(100)
|
100 | |
PortOfDelivery |
DT_WSTR
|
nvarchar(50)
|
50 | |
ShippingInstructions |
DT_WSTR
|
nvarchar(2000)
|
2000 |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Amazon Selling Partner (SP-API) Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
Optional Parameters | |
---|---|
CreatedAfter | 1900-01-01T00:00:00 |
CreatedBefore | |
ChangedAfter | |
ChangedBefore | |
IncludeDetails | |
SortOrder | |
PoItemState | |
IsPOChanged | |
PurchaseOrderState | |
OrderingVendorCode |

API Destination
Optional Parameters | |
---|---|
CreatedAfter | 1900-01-01T00:00:00 |
CreatedBefore | |
ChangedAfter | |
ChangedBefore | |
IncludeDetails | |
SortOrder | |
PoItemState | |
IsPOChanged | |
PurchaseOrderState | |
OrderingVendorCode |

ODBC application
Use these SQL queries in your ODBC application data source:
Get vendor purchaseorders
SELECT * FROM get_vendor_purchaseorders
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get vendor purchaseorders
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_vendor_purchaseorders';
EXEC (@MyQuery) AT [LS_TO_AMAZON_SELLING_PARTNER_SP_API_IN_GATEWAY];