Square: Deprecated Retrieve Inventory Adjustment
Square inventory.deprecatedRetrieveInventoryAdjustment: arguments, response, policy and SDK examples.
← Inventory operations · Get started
Operation square.deprecatedretrieveinventoryadjustment
Provider route: GET /v2/inventory/adjustment/{adjustment_id}. 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"]["deprecatedRetrieveInventoryAdjustment"]>[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.deprecatedRetrieveInventoryAdjustment(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.deprecated_retrieve_inventory_adjustment(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.adjustment_id | string | Required within parent |
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 Retrieve Inventory Adjustment — response body |
Referenced models: Retrieve Inventory Adjustment — response body
Schemas
Section titled “Schemas”7 more schemas are linked from the tables above, on the schema pages.
Retrieve Inventory Adjustment — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adjustment | Model | Optional | Expand Update Inventory Adjustment — response body — adjustment The requested [InventoryAdjustment](entity:InventoryAdjustment). |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Shift — response body — errors item, Update Inventory Adjustment — response body — adjustment
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
Update Inventory Adjustment — response body — adjustment
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a change in state or quantity of product inventory at a particular time and location. |
adjustment_group | Model | Optional | Expand Update Inventory Adjustment — response body — adjustment adjustment group An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event. Read only: true |
catalog_object_id | JSON | Optional | |
catalog_object_id (anyOf 1) | string | Alternative | The Square-generated ID of the [CatalogObject](entity:CatalogObject) being tracked. Maximum length: 100 |
catalog_object_id (anyOf 2) | null | Alternative | |
catalog_object_type | JSON | Optional | |
catalog_object_type (anyOf 1) | string | Alternative | The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value. In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app. Maximum length: 14 |
catalog_object_type (anyOf 2) | null | Alternative | |
cost_money | JSON | Optional | |
cost_money (anyOf 1) | Model | Alternative | Expand Pay Order — response body — order total money The total amount paid by the merchant to the supplying vendor for these units of the product. This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). May be empty. This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. |
cost_money (anyOf 2) | null | Alternative | |
created_at | string | Optional | An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received. Maximum length: 34 Read only: true |
employee_id | JSON | Optional | |
employee_id (anyOf 1) | string | Alternative | The Square-generated ID of the [Employee](entity:Employee) responsible for the inventory adjustment. Maximum length: 100 |
employee_id (anyOf 2) | null | Alternative | |
from_location_id | JSON | Optional | |
from_location_id (anyOf 1) | string | Alternative | The Square-generated ID of the [Location](entity:Location) where the related quantity of items is being tracked before the adjustment. Maximum length: 100 |
from_location_id (anyOf 2) | null | Alternative | |
from_state | JSON | Optional | |
from_state (anyOf 1) | string | Alternative | Indicates the state of a tracked item quantity in the lifecycle of goods. The [inventory state](entity:InventoryState) of the related quantity of items before the adjustment. See [InventoryState](#type-inventorystate) for possible values Known values: CUSTOM, IN_STOCK, SOLD, RETURNED_BY_CUSTOMER, RESERVED_FOR_SALE, SOLD_ONLINE, ORDERED_FROM_VENDOR, RECEIVED_FROM_VENDOR, IN_TRANSIT_TO, NONE, WASTE, UNLINKED_RETURN, COMPOSED, DECOMPOSED, SUPPORTED_BY_NEWER_VERSION, IN_TRANSIT, UNTRACKED |
from_state (anyOf 2) | null | Alternative | |
goods_receipt_id | string | Optional | The Square-generated ID of the goods receipt that caused the adjustment. Only relevant for state transitions from the Square for Retail app. Maximum length: 100 Read only: true |
id | string | Optional | A unique ID generated by Square for the `InventoryAdjustment`. Maximum length: 100 |
occurred_at | JSON | Optional | |
occurred_at (anyOf 1) | string | Alternative | A client-generated RFC 3339-formatted timestamp that indicates when the inventory adjustment took place. For inventory adjustment updates, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. Maximum length: 34 |
occurred_at (anyOf 2) | null | Alternative | |
physical_count_id | string | Optional | The Square-generated ID of the InventoryPhysicalCount (recount) that generated this adjustment, if applicable. The quantity of an adjustment generated by a physical count cannot be edited. Read only: true |
purchase_order_id | string | Optional | The Square-generated ID of the purchase order that caused the adjustment. Only relevant for state transitions from the Square for Retail app. Maximum length: 100 Read only: true |
quantity | JSON | Optional | |
quantity (anyOf 1) | string | Alternative | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. Maximum length: 26 |
quantity (anyOf 2) | null | Alternative | |
reason_id | JSON | Optional | |
reason_id (anyOf 1) | Model | Alternative | Expand Create Inventory Adjustment Reason — response body — adjustment reason id Identifies the reason for this inventory adjustment. |
reason_id (anyOf 2) | null | Alternative | |
reference_id | JSON | Optional | |
reference_id (anyOf 1) | string | Alternative | An optional ID provided by the application to tie the `InventoryAdjustment` to an external system. Maximum length: 255 |
reference_id (anyOf 2) | null | Alternative | |
refund_id | string | Optional | The Square-generated ID of the [Refund](entity:Refund) that caused the adjustment. Only relevant for refund-related state transitions. Maximum length: 255 Read only: true |
source | Model | Optional | Expand Retrieve Inventory Physical Count — response body — count source Information about the application that caused the inventory adjustment. Read only: true |
team_member_id | JSON | Optional | |
team_member_id (anyOf 1) | string | Alternative | The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the inventory adjustment. Maximum length: 100 |
team_member_id (anyOf 2) | null | Alternative | |
to_location_id | JSON | Optional | |
to_location_id (anyOf 1) | string | Alternative | The Square-generated ID of the [Location](entity:Location) where the related quantity of items is being tracked after the adjustment. Maximum length: 100 |
to_location_id (anyOf 2) | null | Alternative | |
to_state | JSON | Optional | |
to_state (anyOf 1) | string | Alternative | Indicates the state of a tracked item quantity in the lifecycle of goods. The [inventory state](entity:InventoryState) of the related quantity of items after the adjustment. See [InventoryState](#type-inventorystate) for possible values Known values: CUSTOM, IN_STOCK, SOLD, RETURNED_BY_CUSTOMER, RESERVED_FOR_SALE, SOLD_ONLINE, ORDERED_FROM_VENDOR, RECEIVED_FROM_VENDOR, IN_TRANSIT_TO, NONE, WASTE, UNLINKED_RETURN, COMPOSED, DECOMPOSED, SUPPORTED_BY_NEWER_VERSION, IN_TRANSIT, UNTRACKED |
to_state (anyOf 2) | null | Alternative | |
total_price_money | Model | Optional | Expand Pay Order — response body — order total money The total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. Read only: true |
transaction_id | string | Optional | The Square-generated ID of the [Transaction](entity:Transaction) that caused the adjustment. Only relevant for payment-related state transitions. Maximum length: 255 Read only: true |
vendor_id | JSON | Optional | |
vendor_id (anyOf 1) | string | Alternative | The Square-generated ID of the Vendor from which the merchant purchased this product. This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. Maximum length: 100 |
vendor_id (anyOf 2) | null | Alternative |
Referenced models: Update Inventory Adjustment — response body — adjustment adjustment group, Create Inventory Adjustment Reason — response body — adjustment reason id, Pay Order — response body — order total money, Retrieve Inventory Physical Count — response body — count source
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.deprecatedretrieveinventoryadjustment. Catalog operation: DeprecatedRetrieveInventoryAdjustment. 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_READ"]
Pinned headers: {"Square-Version": "2026-11-18"}