Amazon Selling Partner (SP-API) Connector
Documentation
Version: 1
Documentation

Table OrderItems


Parameters

Parameter Label Required Options Description Help
There are no parameters

Supported Operations

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

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 OrderItems table using API Source

Amazon Selling Partner (SP-API)
OrderItems
SSIS API Source - Read from table or endpoint

Read/write to OrderItems table using API Destination

Amazon Selling Partner (SP-API)
OrderItems
Select
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Read Order Items (For All Orders - Slow)

Read order items with search criteria on orders such as CreatedAfter, CreatedBefore, MarketPlaceIds, OrderStatuses, PaymentType and many more. This is slow way of pulling all items for all orders without reading one by one order.

SELECT * FROM OrderItems
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'
--)

SQL Server

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

Read Order Items (For All Orders - Slow)

Read order items with search criteria on orders such as CreatedAfter, CreatedBefore, MarketPlaceIds, OrderStatuses, PaymentType and many more. This is slow way of pulling all items for all orders without reading one by one order.

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM OrderItems
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 [LINKED_SERVER_TO_AMAZON_SELLING_PARTNER_SP_API_IN_DATA_GATEWAY];