> ## 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.

# Create Transfer Order

> Creates a new transfer order in [DRAFT](entity:TransferOrderStatus) status.

`square.createTransferOrder` creates a new transfer order in [DRAFT](entity:TransferOrderStatus) status.

## Example

```ts automations/square-create-transfer-order.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Create Square Transfer Order", () => {
  onDashboardRun({ title: "Create Square Transfer Order" })

  square.createTransferOrder({
    idempotencyKey: "65cc0586-3e82-384s-b524-3885cffd52",
    transferOrder: {
      sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_123",
      destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_456",
      expectedAt: "2025-11-09T05:00:00Z",
      notes:
        "Example transfer order for inventory redistribution between locations",
      trackingNumber: "TRACK123456789",
      createdByTeamMemberId: "EXAMPLE_TEAM_MEMBER_ID_789",
      lineItems: [
        {
          itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_001",
          quantityOrdered: "5",
        },
        {
          itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_002",
          quantityOrdered: "3",
        },
      ],
    },
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `INVENTORY_READ` and `INVENTORY_WRITE`.

| Field            | Type                             | Required | Default | Description                                                                                                                                              |
| ---------------- | -------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey` | `string`                         | Yes      | —       | A unique string that identifies this CreateTransferOrder request. Keys can be any valid string but must be unique for every CreateTransferOrder request. |
| `transferOrder`  | `Square.CreateTransferOrderData` | Yes      | —       | The transfer order to create                                                                                                                             |

Use the official [CreateTransferOrder reference](https://developer.squareup.com/reference/square/transfer-order-api/create-transfer-order) for provider field semantics and limits.

## Output

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