Reference

Endpoint Get Orders


Name

get_orders

Description

Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria.

Related Tables

Orders

Parameters

Parameter Required Options
Name: MarketplaceIds

Label: MarketplaceIds

YES
Option Value
United States of America ATVPDKIKX0DER
Brazil A2Q3Y263D00KWC
Canada A2EUQ1WTGCTBG2
Mexico A1AM78C64UM0Y8
Spain A1RKKUPIHCS9HS
United Kingdom A1F83G8C2ARO7P
France A13V1IB3VIYZZH
Belgium AMEN7PMS3EDWL
Netherlands A1805IZSGTT6HS
Germany A1PA6795UKMFR9
Italy APJ6JRA9NG5V4
Sweden A2NODRKZP88ZB9
South Africa AE08WJ6YKNBMC
Poland A1C3SOZRARQ6R3
Egypt ARBP9OOSHTCHU
Turkey A33AVAJ2PDY3EV
Saudi Arabia A17E79C6D8DWNP
United Arab Emirates (U.A.E.) A2VIGQ35RCS4UG
India A21TJRUUN4KGV
Singapore A19VAU5U5O7RUS
Australia A39IBJ37TRP1C6
Japan A1VC38T7YXB528
Name: CreatedAfter

Label: CreatedAfter

A UTC date used for selecting orders created after (or at) a specified time. 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

A UTC date used for selecting orders created before (or at) a specified time. 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: LastUpdatedAfter

Label: LastUpdatedAfter

A UTC date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. 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: LastUpdatedBefore

Label: LastUpdatedBefore

A UTC date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. 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: OrderStatuses

Label: OrderStatuses

A list of OrderStatus values. Used to select orders with a current status that matches one of the status values that you specify.
Option Value
Pending Pending
Unshipped Unshipped
PartiallyShipped PartiallyShipped
PendingAvailability PendingAvailability
Shipped Shipped
Canceled Canceled
Unfulfillable Unfulfillable
Name: FulfillmentChannels

Label: FulfillmentChannels

A list that indicates how an order was fulfilled.
Option Value
Fulfilled by Amazon AFN
Fulfilled by the seller MFN
Name: PaymentMethods

Label: PaymentMethods

A list of PaymentMethod values. Used to select orders paid for with the payment methods that you specify.
Option Value
Cash on delivery COD
Convenience store payment CVS
Any payment method other than COD or CVS Other
Name: BuyerEmail

Label: BuyerEmail

The e-mail address of a buyer. Used to select only the orders that contain the specified e-mail address. If BuyerEmail is specified, then FulfillmentChannel, OrderStatus, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and SellerOrderId cannot be specified.
Name: SellerOrderId

Label: SellerOrderId

An order identifier that is specified by the seller. Not an Amazon order identifier. Used to select only the orders that match a seller-specified order identifier. If SellerOrderId is specified, then FulfillmentChannel, OrderStatus, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified.
Name: MaxResultsPerPage

Label: MaxResultsPerPage

A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
Name: EasyShipShipmentStatuses

Label: EasyShipShipmentStatuses

A list of EasyShipShipmentStatus values. Used to select Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus is specified, only Amazon Easy Ship orders are returned. Possible values: - PendingSchedule (The package is awaiting the schedule for pick-up.) - PendingPickUp (Amazon has not yet picked up the package from the seller.) - PendingDropOff (The seller will deliver the package to the carrier.) - LabelCanceled (The seller canceled the pickup.) - PickedUp (Amazon has picked up the package from the seller.) - DroppedOff (The package is delivered to the carrier by the seller.) - AtOriginFC (The packaged is at the origin fulfillment center.) - AtDestinationFC (The package is at the destination fulfillment center.) - Delivered (The package has been delivered.) - RejectedByBuyer (The package has been rejected by the buyer.) - Undeliverable (The package cannot be delivered.) - ReturningToSeller (The package was not delivered and is being returned to the seller.) - ReturnedToSeller (The package was not delivered and was returned to the seller.) - Lost (The package is lost.) - OutForDelivery (The package is out for delivery.) - Damaged (The package was damaged by the carrier.)
Option Value
PendingSchedule PendingSchedule
PendingPickUp PendingPickUp
PendingDropOff PendingDropOff
LabelCanceled LabelCanceled
PickedUp PickedUp
DroppedOff DroppedOff
AtOriginFC AtOriginFC
AtDestinationFC AtDestinationFC
Delivered Delivered
RejectedByBuyer RejectedByBuyer
Undeliverable Undeliverable
ReturningToSeller ReturningToSeller
ReturnedToSeller ReturnedToSeller
Lost Lost
OutForDelivery OutForDelivery
Damaged Damaged
Name: ElectronicInvoiceStatuses

Label: ElectronicInvoiceStatuses

A list of ElectronicInvoiceStatus values. Used to select orders with electronic invoice statuses that match the specified values. Possible values: - NotRequired (Electronic invoice submission is not required for this order.) - NotFound (The electronic invoice was not submitted for this order.) - Processing (The electronic invoice is being processed for this order.) - Errored (The last submitted electronic invoice was rejected for this order.) - Accepted (The last submitted electronic invoice was submitted and accepted.)
Option Value
NotRequired NotRequired
NotFound NotFound
Processing Processing
Errored Errored
Accepted Accepted
Name: AmazonOrderIds

Label: AmazonOrderIds

Comma separated list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format. Max count : 50
Name: ActualFulfillmentSupplySourceId

Label: ActualFulfillmentSupplySourceId

Denotes the recommended sourceId where the order should be fulfilled from.
Name: IsISPU

Label: IsISPU

When true, this order is marked to be picked up from a store rather than delivered.
Name: StoreChainStoreId

Label: StoreChainStoreId

The store chain store identifier. Linked to a specific store in a store chain.

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
AmazonOrderId DT_WSTR nvarchar(500) 500
PurchaseDate DT_DBTIMESTAMP datetime
LastUpdateDate DT_DBTIMESTAMP datetime
OrderStatus DT_WSTR nvarchar(100) 100
FulfillmentChannel DT_WSTR nvarchar(50) 50
SalesChannel DT_WSTR nvarchar(100) 100
ShipServiceLevel DT_WSTR nvarchar(500) 500
CurrencyCode DT_WSTR nvarchar(50) 50
Amount DT_WSTR nvarchar(50) 50
NumberOfItemsShipped DT_I4 int
NumberOfItemsUnshipped DT_I4 int
PaymentMethod DT_WSTR nvarchar(50) 50
PaymentMethodDetails DT_WSTR nvarchar(500) 500
IsReplacementOrder DT_BOOL bit
MarketplaceId DT_WSTR nvarchar(500) 500
ShipmentServiceLevelCategory DT_WSTR nvarchar(100) 100
OrderType DT_WSTR nvarchar(500) 500
EarliestShipDate DT_DBTIMESTAMP datetime
LatestShipDate DT_DBTIMESTAMP datetime
EarliestDeliveryDate DT_DBTIMESTAMP datetime
LatestDeliveryDate DT_DBTIMESTAMP datetime
IsBusinessOrder DT_BOOL bit
IsPrime DT_BOOL bit
IsGlobalExpressEnabled DT_BOOL bit
IsPremiumOrder DT_BOOL bit
IsSoldByAB DT_BOOL bit
IsIBA DT_BOOL bit
DefaultShipFromName DT_WSTR nvarchar(500) 500
DefaultShipAddressLine1 DT_WSTR nvarchar(500) 500
DefaultShipFromCity DT_WSTR nvarchar(100) 100
DefaultShipFromStateOrRegion DT_WSTR nvarchar(50) 50
DefaultShipFromPostalCode DT_WSTR nvarchar(100) 100
DefaultShipFromCountryCode DT_WSTR nvarchar(50) 50
DefaultShipFromPhone DT_WSTR nvarchar(500) 500
DefaultShipFromAddressType DT_WSTR nvarchar(100) 100
FulfillmentSupplySourceId DT_WSTR nvarchar(500) 500
IsISPU DT_BOOL bit
IsAccessPointOrder DT_BOOL bit
HasAutomatedShippingSettings DT_BOOL bit
EasyShipShipmentStatus DT_WSTR nvarchar(500) 500
ElectronicInvoiceStatus DT_WSTR nvarchar(500) 500
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

This Endpoint belongs to the Orders table, therefore it is better to use it, instead of accessing the endpoint directly:

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)
Orders
There are no parameters to configure.
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the Orders table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get orders:

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)
Orders
Select
There are no parameters to configure.
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Read Orders

Read orders with search criteria such as CreatedAfter, CreatedBefore, MarketPlaceIds, OrderStatuses, PaymentType and many more

SELECT * FROM Orders
--WHERE AmazonOrderId='902-1845936-5435065'		
WITH(
	  CreatedAfter='1900-01-01T00:00:00'
--	, CreatedBefore='1900-01-01T00:00:00'
--	, LastUpdatedAfter='1900-01-01T00:00:00'
--	, LastUpdatedBefore='1900-01-01T00:00:00'
--	, OrderStatuses='Pending~Unshipped~PartiallyShipped~PendingAvailability~Shipped~Canceled~Unfulfillable'
--	, MarketplaceIds='ATVPDKIKX0DER~A2Q3Y263D00KWC~A2EUQ1WTGCTBG2'
--	, FulfillmentChannels='AFN~MFN'
--	, PaymentMethods='COD~CVS~Other'
--	, AmazonOrderIds='1111111,222222,333333'
)
--CONNECTION(
--	ServiceUrl='https://sellingpartnerapi-na.amazon.com'
--)

Sandbox - Read Orders (Fake data for testing)

Read orders which has fake values (sandbox data)

SELECT *
FROM Orders
--DONOT try WHERE AmazonOrderId='TEST_CASE_200' (WHERE clause) for sandbox endpoint, it will return empty row. If you try in Live API then should work. 
WITH(
	  CreatedAfter='TEST_CASE_200' 
	  --CreatedAfter='TEST_CASE_200_NEXT_TOKEN'
	, MarketplaceIds='ATVPDKIKX0DER'
)
CONNECTION(
	ServiceUrl='https://sandbox.sellingpartnerapi-na.amazon.com'
)

get_orders endpoint belongs to Orders table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Read Orders

Read orders with search criteria such as CreatedAfter, CreatedBefore, MarketPlaceIds, OrderStatuses, PaymentType and many more

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders
--WHERE AmazonOrderId=''902-1845936-5435065''		
WITH(
	  CreatedAfter=''1900-01-01T00:00:00''
--	, CreatedBefore=''1900-01-01T00:00:00''
--	, LastUpdatedAfter=''1900-01-01T00:00:00''
--	, LastUpdatedBefore=''1900-01-01T00:00:00''
--	, OrderStatuses=''Pending~Unshipped~PartiallyShipped~PendingAvailability~Shipped~Canceled~Unfulfillable''
--	, MarketplaceIds=''ATVPDKIKX0DER~A2Q3Y263D00KWC~A2EUQ1WTGCTBG2''
--	, FulfillmentChannels=''AFN~MFN''
--	, PaymentMethods=''COD~CVS~Other''
--	, AmazonOrderIds=''1111111,222222,333333''
)
--CONNECTION(
--	ServiceUrl=''https://sellingpartnerapi-na.amazon.com''
--)';

EXEC (@MyQuery) AT [LS_TO_AMAZON_SELLING_PARTNER_SP_API_IN_GATEWAY];

Sandbox - Read Orders (Fake data for testing)

Read orders which has fake values (sandbox data)

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM Orders
--DONOT try WHERE AmazonOrderId=''TEST_CASE_200'' (WHERE clause) for sandbox endpoint, it will return empty row. If you try in Live API then should work. 
WITH(
	  CreatedAfter=''TEST_CASE_200'' 
	  --CreatedAfter=''TEST_CASE_200_NEXT_TOKEN''
	, MarketplaceIds=''ATVPDKIKX0DER''
)
CONNECTION(
	ServiceUrl=''https://sandbox.sellingpartnerapi-na.amazon.com''
)';

EXEC (@MyQuery) AT [LS_TO_AMAZON_SELLING_PARTNER_SP_API_IN_GATEWAY];

get_orders endpoint belongs to Orders table(s), and can therefore be used via those table(s).