Reference

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: CreatedAfter

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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: CreatedBefore

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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: ChangedAfter

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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: ChangedBefore

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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: IncludeDetails

Label: IncludeDetails

When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
Option Value
true true
false false
Name: SortOrder

Label: SortOrder

Sort in ascending or descending order by purchase order creation date.
Option Value
ASC ASC
DESC DESC
Name: PoItemState

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.
Option Value
ACCEPTED ACCEPTED
PARTIALLY_ACCEPTED PARTIALLY_ACCEPTED
REJECTED REJECTED
UNCONFIRMED UNCONFIRMED
Name: IsPOChanged

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.
Option Value
true true
false false
Name: PurchaseOrderState

Label: PurchaseOrderState

Filters purchase orders based on the purchase order state.
Option Value
New New
Acknowledged Acknowledged
Closed Closed
Name: OrderingVendorCode

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: PageSize

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
If the column you are looking for is missing, consider customizing Amazon Selling Partner (SP-API) Connector.

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

API Source - Amazon Selling Partner (SP-API)
Amazon Selling Partner Connector (SP-API) can be used to integrated SP-API that helps Amazon sellers to programmatically exchange data on listings, orders, payments, reports, and more.
Amazon Selling Partner (SP-API)
Get Vendor PurchaseOrders
Optional Parameters
CreatedAfter 1900-01-01T00:00:00
CreatedBefore
ChangedAfter
ChangedBefore
IncludeDetails
SortOrder
PoItemState
IsPOChanged
PurchaseOrderState
OrderingVendorCode
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Amazon Selling Partner (SP-API)
Amazon Selling Partner Connector (SP-API) can be used to integrated SP-API that helps Amazon sellers to programmatically exchange data on listings, orders, payments, reports, and more.
Amazon Selling Partner (SP-API)
Get Vendor PurchaseOrders
Optional Parameters
CreatedAfter 1900-01-01T00:00:00
CreatedBefore
ChangedAfter
ChangedBefore
IncludeDetails
SortOrder
PoItemState
IsPOChanged
PurchaseOrderState
OrderingVendorCode
SSIS API Destination - Access table or endpoint

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];