Platforms
Amazon

Amazon Integration

The Web Action SDK provides powerful actions to interact with Amazon. This guide covers all available Amazon actions, their inputs, outputs, and usage examples.

Actions

Search For Item

Search for an item on Amazon.

Function: sdk.amazon.searchForItem
 
Input:
{
  searchQuery: string,
}
 
Output:
{
  items: Array<{
    title: string,
    price: string,
    productUrl: string,
    rating: string,
    numberOfReviews: string,
  }>
}

Example:

const items = await sdk.amazon.searchForItem({
  searchQuery: "iphone 15",
});
 
console.log(items);

View Order History

View the order history for the connected Amazon account.

Function: sdk.amazon.viewOrderHistory
 
Input:
{
  dateRange: string, // "last 30 days" | "past 3 months" | "2024" | "2023" | "2022"
}
 
Output:
{
  orders: Array<{
    orderPlaced: string,
    productName: string,
    productUrl: string,
    price: string,
    orderNumber: string,
    returnStatus: string,
  }>
}

Example:

const orders = await sdk.amazon.viewOrderHistory({
  dateRange: "past 3 months",
});
 
console.log(orders);

Order Item

Order an item on Amazon.

Function: sdk.amazon.orderItem
 
Input:
{
  searchQuery: string,
}
 
Output:
{
  message: string, // success of action
}

Example:

const message = await sdk.amazon.orderItem({
  searchQuery: "iphone 15 blue",
});
 
console.log(message);

Troubleshooting

If you encounter any issues while using the Amazon integration, please refer to our Troubleshooting guide for common problems and their solutions.