Square: Update Inventory Adjustment Reason
Square inventory.updateInventoryAdjustmentReason: arguments, response, policy and SDK examples.
← Inventory operations · Get started
Operation square.updateinventoryadjustmentreason
Provider route: PUT /v2/inventory/adjustment-reasons/update. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["inventory"]["updateInventoryAdjustmentReason"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.inventory.updateInventoryAdjustmentReason(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_square import SquareIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.inventory.update_inventory_adjustment_reason(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Update Inventory Adjustment Reason — request body — body |
Referenced models: Update Inventory Adjustment Reason — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Update Inventory Adjustment Reason — response body |
Referenced models: Update Inventory Adjustment Reason — response body
Schemas
Section titled “Schemas”3 more schemas are linked from the tables above, on the schema pages.
Update Inventory Adjustment Reason — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an output from a call to [UpdateInventoryAdjustmentReason](api-endpoint:Inventory-UpdateInventoryAdjustmentReason). |
adjustment_reason | Model | Optional | Expand Create Inventory Adjustment Reason — response body — adjustment reason The successfully updated inventory adjustment reason. |
errors | array | Optional | Errors encountered when the request fails. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Shift — response body — errors item, Create Inventory Adjustment Reason — response body — adjustment reason
Update Inventory Adjustment Reason — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an input to a call to [UpdateInventoryAdjustmentReason](api-endpoint:Inventory-UpdateInventoryAdjustmentReason). |
adjustment_reason | Model | Required within parent | Expand Create Inventory Adjustment Reason — request body — body adjustment reason The requested custom inventory adjustment reason update. Only the `name` field can be updated. Deleted custom reasons cannot be updated. To restore a deleted custom reason, call [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). |
reason_id | Model | Required within parent | Expand Delete Inventory Adjustment Reason — request body — body reason id The identifier of the custom inventory adjustment reason to update. |
Referenced models: Create Inventory Adjustment Reason — request body — body adjustment reason, Delete Inventory Adjustment Reason — request body — body reason id
Get Shift — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an error encountered during a request to the Connect API. See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information. |
category | string | Required within parent | Indicates which high-level category of error has occurred during a request to the Connect API. The high-level category for the error. See [ErrorCategory](#type-errorcategory) for possible values Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR |
code | Model | Required within parent | Expand Get Shift — response body — errors item code The specific code of the error. See [ErrorCode](#type-errorcode) for possible values |
detail | string | Optional | A human-readable description of the error for debugging purposes. |
field | string | Optional | The name of the field provided in the original request (if any) that the error pertains to. |
Referenced models: Get Shift — response body — errors item code
Create Inventory Adjustment Reason — response body — adjustment reason
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an inventory adjustment reason. |
created_at | string | Optional | An RFC 3339-formatted timestamp that indicates when the custom adjustment reason was created. This field is empty for standard adjustment reasons. Maximum length: 34 Read only: true |
direction | JSON | Optional | |
direction (anyOf 1) | string | Alternative | Indicates whether this inventory adjustment reason increases or decreases inventory. This field is set for custom reasons and for standard seller-selectable reasons. It is empty for system-generated inventory events. See [Direction](#type-direction) for possible values Known values: INCREASE, DECREASE |
direction (anyOf 2) | null | Alternative | |
id | Model | Required within parent | Expand Create Inventory Adjustment Reason — response body — adjustment reason id The identifier for this inventory adjustment reason. |
is_deleted | JSON | Optional | |
is_deleted (anyOf 1) | boolean | Alternative | Indicates whether this custom inventory adjustment reason has been deleted. Deleted custom reasons can still be retrieved by ID, but are omitted from list responses unless deleted reasons are explicitly included. To restore a deleted custom reason, call [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). This field is always `false` for standard and system-generated adjustment reasons. |
is_deleted (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The seller-facing name for a custom inventory adjustment reason. This field is empty for standard and system-generated adjustment reasons. Maximum length: 50 |
name (anyOf 2) | null | Alternative | |
updated_at | string | Optional | An RFC 3339-formatted timestamp that indicates when the custom adjustment reason was last updated. This field is empty for standard adjustment reasons. Maximum length: 34 Read only: true |
Referenced models: Create Inventory Adjustment Reason — response body — adjustment reason id
Create Inventory Adjustment Reason — request body — body adjustment reason
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an inventory adjustment reason. |
created_at | string | Optional | An RFC 3339-formatted timestamp that indicates when the custom adjustment reason was created. This field is empty for standard adjustment reasons. Maximum length: 34 Read only: true |
direction | JSON | Optional | |
direction (anyOf 1) | string | Alternative | Indicates whether this inventory adjustment reason increases or decreases inventory. This field is set for custom reasons and for standard seller-selectable reasons. It is empty for system-generated inventory events. See [Direction](#type-direction) for possible values One of: INCREASE, DECREASE |
direction (anyOf 2) | null | Alternative | |
id | Model | Required within parent | Expand Delete Inventory Adjustment Reason — request body — body reason id The identifier for this inventory adjustment reason. |
is_deleted | JSON | Optional | |
is_deleted (anyOf 1) | boolean | Alternative | Indicates whether this custom inventory adjustment reason has been deleted. Deleted custom reasons can still be retrieved by ID, but are omitted from list responses unless deleted reasons are explicitly included. To restore a deleted custom reason, call [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). This field is always `false` for standard and system-generated adjustment reasons. |
is_deleted (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The seller-facing name for a custom inventory adjustment reason. This field is empty for standard and system-generated adjustment reasons. Maximum length: 50 |
name (anyOf 2) | null | Alternative | |
updated_at | string | Optional | An RFC 3339-formatted timestamp that indicates when the custom adjustment reason was last updated. This field is empty for standard adjustment reasons. Maximum length: 34 Read only: true |
Referenced models: Delete Inventory Adjustment Reason — request body — body reason id
Delete Inventory Adjustment Reason — request body — body reason id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Identifies a standard or custom inventory adjustment reason. |
custom_reason_id | JSON | Optional | |
custom_reason_id (anyOf 1) | string | Alternative | The Square-generated ID of the custom adjustment reason. This field is only set when `type` is `CUSTOM`. Maximum length: 100 |
custom_reason_id (anyOf 2) | null | Alternative | |
type | Model | Required within parent | Expand Delete Inventory Adjustment Reason — request body — body reason id type The adjustment reason type. See [Type](#type-type) for possible values |
Referenced models: Delete Inventory Adjustment Reason — request body — body reason id type
Create Inventory Adjustment Reason — response body — adjustment reason id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Identifies a standard or custom inventory adjustment reason. |
custom_reason_id | JSON | Optional | |
custom_reason_id (anyOf 1) | string | Alternative | The Square-generated ID of the custom adjustment reason. This field is only set when `type` is `CUSTOM`. Maximum length: 100 |
custom_reason_id (anyOf 2) | null | Alternative | |
type | Model | Required within parent | Expand Create Inventory Adjustment Reason — response body — adjustment reason id type The adjustment reason type. See [Type](#type-type) for possible values |
Referenced models: Create Inventory Adjustment Reason — response body — adjustment reason id type
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.updateinventoryadjustmentreason. Catalog operation: UpdateInventoryAdjustmentReason. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["INVENTORY_WRITE"]
Pinned headers: {"Square-Version": "2026-11-18"}