get_orders
Retrieve Amazon order history in batches for a chosen site and time range, including Household members' orders the account can view, and return a cursor for the next batch.
Instructions
Get a batch of the Amazon Order history for a given time period, with the Amazon Household members whose Orders the account can view and a cursor to fetch the next batch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | The Amazon site to read, e.g. `amazon.de`, since each site has its own orders. By default, the user's default site (see `check_session`). | |
| year | No | The year for which to get history. Ignored if `time_filter` or `cursor` is provided. Defaults to the current year if neither `year` nor `time_filter` is specified. | |
| limit | No | Stop fetching history pages once at least this many Orders are collected. Whole pages are fetched, so the batch can hold up to a page more than `limit`. `None` fetches every page. | |
| cursor | No | The `cursor` of the previous batch, to fetch the next one. The filters it was fetched with carry over. | |
| start_index | No | The index of the Order from which to start fetching in the history. Ignored if `cursor` is provided. | |
| time_filter | No | The time filter to use. Supported values are `"last30"` (last 30 days), `"months-3"` (past 3 months), or `"year-YYYY"` (specific year). If provided, this takes precedence over the `year` parameter. | |
| full_details | No | Get the full details for each Order in the batch. This will execute an additional request per Order. | |
| order_filter | No | The order type filter to use, e.g. `"digital-orders"` for Kindle and other digital purchases, which the default history doesn't include. If provided, appended alongside the time filter. | |
| family_member_id | No | The ID of an Amazon Household member whose Orders to get, such as a linked Teen account, from `household_members`. An account in an Amazon Household gets the whole household's Orders by default; pass `"self"` for only its own. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | The results in this batch. | |
| cursor | No | Pass this back as `cursor` to the same call to fetch the next batch. A JSON-safe `dict` to keep as it is, not to build or change. `None` when there are no more results. | |
| has_more | No | `True` if there are more results to fetch with `cursor`. | |
| household_members | No | The Amazon Household members whose Orders the account can view, such as linked Teen accounts, from the Order history's member filter. Pass a member's `id` as `family_member_id` to get their Orders. Empty if the account has none. |