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

# Update Transfer Order

> Updates an existing transfer order.

`square.updateTransferOrder` updates an existing transfer order.

## Example

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

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

  square.updateTransferOrder({
    transferOrderId: "transfer_order_id",
    idempotencyKey: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    transferOrder: {
      sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_789",
      destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_101",
      expectedAt: "2025-11-10T08:00:00Z",
      notes: "Updated: Priority transfer due to low stock at destination",
      trackingNumber: "TRACK987654321",
      lineItems: [
        {
          uid: "1",
          quantityOrdered: "7",
        },
        {
          itemVariationId: "EXAMPLE_NEW_ITEM_VARIATION_ID_003",
          quantityOrdered: "2",
        },
        {
          uid: "2",
          remove: true,
        },
      ],
    },
    version: BigInt("1753109537351"),
  })
})
```

## Inputs

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

| Field             | Type                             | Required | Default | Description                                                                                                                              |
| ----------------- | -------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `transferOrderId` | `string`                         | Yes      | —       | The ID of the transfer order to update                                                                                                   |
| `idempotencyKey`  | `string`                         | Yes      | —       | A unique string that identifies this UpdateTransferOrder request. Keys must contain only alphanumeric characters, dashes and underscores |
| `transferOrder`   | `Square.UpdateTransferOrderData` | Yes      | —       | The transfer order updates to apply                                                                                                      |
| `version`         | `bigint`                         | No       | —       | Version for optimistic concurrency                                                                                                       |

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

## Output

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