Reference

Table Orders


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_orders
INSERT
UPDATE
UPSERT
DELETE
LOOKUP get_order

Examples

SSIS

Use Amazon Selling Partner (SP-API) Connector in API Source component to read data or in API Destination component to read/write data:

Read from Orders table using API Source

API Source - Amazon Selling Partner (SP-API)
Read and write Amazon Selling Partner (SP-API) data effortlessly. Integrate, manage, and automate listings, orders, payments, and reports — almost no coding required.
Amazon Selling Partner (SP-API)
Orders
There are no parameters to configure.
SSIS API Source - Read from table or endpoint

Read/write to Orders table using API Destination

API Destination - Amazon Selling Partner (SP-API)
Read and write Amazon Selling Partner (SP-API) data effortlessly. Integrate, manage, and automate listings, orders, payments, and reports — almost no coding required.
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:

List orders

<p>Read orders. You can filter by date range, marketplace, order status, fulfillment channel, payment method, and more.</p>

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'
--)

Get order by ID

<p>Read a single order by specifying the order ID. Use the order you want to inspect.</p>

SELECT * FROM Orders 
WHERE AmazonOrderId='902-1845936-5435065'
--CONNECTION(
--	ServiceUrl='https://sellingpartnerapi-na.amazon.com'
--)

Sandbox: list orders (fake data)

<p>Read sandbox orders with fake data. Use sandbox test values and the sandbox service URL.</p>

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'
)

SQL Server

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

List orders

<p>Read orders. You can filter by date range, marketplace, order status, fulfillment channel, payment method, and more.</p>

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

Get order by ID

<p>Read a single order by specifying the order ID. Use the order you want to inspect.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Orders 
WHERE AmazonOrderId=''902-1845936-5435065''
--CONNECTION(
--	ServiceUrl=''https://sellingpartnerapi-na.amazon.com''
--)';

EXEC (@MyQuery) AT [LS_TO_AMAZON_SELLING_PARTNER_SP_API_IN_GATEWAY];

Sandbox: list orders (fake data)

<p>Read sandbox orders with fake data. Use sandbox test values and the sandbox service URL.</p>

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