EndPoint Get Order Items (For Single Order)
Name
get_order_items
Description
Returns the order items information for a specified OrderId [API reference]
Parameters
Parameter | Label | Required | Options | Description |
---|---|---|---|---|
AmazonOrderId | AmazonOrderId | NO | Filters purchase orders based on the specified orderid. |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
AmazonOrderId |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
OrderItemId |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
Title |
DT_WSTR
|
nvarchar(300)
|
300 | False |
|
ASIN |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
SellerSKU |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
QuantityOrdered |
DT_I8
|
bigint
|
False |
||
QuantityShipped |
DT_I8
|
bigint
|
False |
||
Model |
DT_WSTR
|
nvarchar(100)
|
100 | False |
|
NumberOfItems |
DT_WSTR
|
nvarchar(4)
|
4 | False |
|
PriceCurrencyCode |
DT_WSTR
|
nvarchar(10)
|
10 | False |
|
PriceAmount |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
TaxCurrencyCode |
DT_WSTR
|
nvarchar(10)
|
10 | False |
|
TaxAmount |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
ResponsibleParty |
DT_WSTR
|
nvarchar(84)
|
84 | False |
|
IsBuyerRequestedCancel |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
BuyerCancelReason |
DT_WSTR
|
nvarchar(80)
|
80 | False |
|
IsGift |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
ConditionSubtypeId |
DT_WSTR
|
nvarchar(40)
|
40 | False |
|
IsTransparency |
DT_BOOL
|
bit
|
False |
||
PromotionDiscountCurrencyCode |
DT_WSTR
|
nvarchar(10)
|
10 | False |
|
PromotionDiscountAmount |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
PromotionDiscountTaxCurrencyCode |
DT_WSTR
|
nvarchar(10)
|
10 | False |
|
PromotionDiscountTaxAmount |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
ConditionId |
DT_WSTR
|
nvarchar(20)
|
20 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | 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 component to read data or in API Destination component to read/write data:
Get Order Items (For Single Order) using API Source

Get Order Items (For Single Order) using API Destination

ODBC application
Use these SQL queries in your ODBC application data source:
Read Order Items (For Single Order)
Read order items for a specified orderid
SELECT * FROM get_order_items
WITH(
AmazonOrderId ='902-1845936-5435065'
)
--CONNECTION(
-- ServiceUrl='https://sellingpartnerapi-na.amazon.com'
--)
Sandbox - Read Order Items (Fake data for testing)
Read order items with orderid which has fake values (sandbox data)
SELECT *
FROM get_order_items
--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(
AmazonOrderId='TEST_CASE_200'
-- AmazonOrderId='TEST_CASE_IBA_200'
)
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:
Read Order Items (For Single Order)
Read order items for a specified orderid
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_order_items
WITH(
AmazonOrderId =''902-1845936-5435065''
)
--CONNECTION(
-- ServiceUrl=''https://sellingpartnerapi-na.amazon.com''
--)';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_AMAZON_SELLING_PARTNER_SP_API_IN_DATA_GATEWAY];
Sandbox - Read Order Items (Fake data for testing)
Read order items with orderid which has fake values (sandbox data)
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM get_order_items
--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(
AmazonOrderId=''TEST_CASE_200''
-- AmazonOrderId=''TEST_CASE_IBA_200''
)
CONNECTION(
ServiceUrl=''https://sandbox.sellingpartnerapi-na.amazon.com''
)';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_AMAZON_SELLING_PARTNER_SP_API_IN_DATA_GATEWAY];