> ## 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 Inventory Adjustment Reason

> Creates a custom inventory adjustment reason.

`square.createInventoryAdjustmentReason` creates a custom inventory adjustment reason.

## Example

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

export default automation("Create Square Inventory Adjustment Reason", () => {
  onDashboardRun({ title: "Create Square Inventory Adjustment Reason" })

  square.createInventoryAdjustmentReason({
    idempotencyKey: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47",
    adjustmentReason: {
      id: {
        type: "CUSTOM",
      },
      name: "Donated to charity",
      direction: "DECREASE",
    },
  })
})
```

## Inputs

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

| Field              | Type                               | Required | Default | Description                                                                                                       |
| ------------------ | ---------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey`   | `string`                           | Yes      | —       | A client-supplied, universally unique identifier to make this CreateInventoryAdjustmentReason request idempotent. |
| `adjustmentReason` | `Square.InventoryAdjustmentReason` | Yes      | —       | The custom inventory adjustment reason to create. Only custom adjustment reasons can be created.                  |

Use the official [CreateInventoryAdjustmentReason reference](https://developer.squareup.com/reference/square/inventory-api/create-inventory-adjustment-reason) for provider field semantics and limits.

## Output

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