> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Batch Retrieve Orders

> Retrieves a set of [orders](entity:Order) by their IDs.

`square.batchRetrieveOrders` retrieves a set of [orders](entity:Order) by their IDs.

## Example

```ts automations/square-batch-retrieve-orders.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Batch Square Retrieve Orders", () => {
  onDashboardRun({ title: "Batch Square Retrieve Orders" })

  square.batchRetrieveOrders({
    locationId: "057P5VYJ4A5X1",
    orderIds: ["CAISEM82RcpmcFBM0TfOyiHV3es", "CAISENgvlJ6jLWAzERDzjyHVybY"],
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `ORDERS_READ`.

| Field        | Type             | Required | Default | Description                                                                                                                                              |
| ------------ | ---------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `locationId` | `string \| null` | No       | —       | The ID of the location for these orders. This field is optional: omit it to retrieve orders within the scope of the current authorization's merchant ID. |
| `orderIds`   | `string[]`       | Yes      | —       | The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request.                                                                 |

Use the official [BatchRetrieveOrders reference](https://developer.squareup.com/reference/square/orders-api/batch-retrieve-orders) for provider field semantics and limits.

## Output

Returns the official `Square.BatchGetOrdersResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
