Skip to content

Square: Retrieve Inventory Adjustment

Square inventory.retrieveInventoryAdjustment: arguments, response, policy and SDK examples.

← Inventory operations · Get started

Operation square.retrieveinventoryadjustment

Provider route: GET /v2/inventory/adjustments/{adjustment_id}. Alter supplies the connection’s credentials and routing.

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"]["retrieveInventoryAdjustment"]>[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.retrieveInventoryAdjustment(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.retrieve_inventory_adjustment(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.adjustment_idstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve Inventory Adjustment — response body

Referenced models: Retrieve Inventory Adjustment — response body

7 more schemas are linked from the tables above, on the schema pages.

Retrieve Inventory Adjustment — response body
FieldTypePresenceDescription and constraints
$objectRoot
adjustmentModelOptionalExpand Update Inventory Adjustment — response body — adjustment
The requested [InventoryAdjustment](entity:InventoryAdjustment).
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
categorystringRequired within parentIndicates 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
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootRepresents a change in state or quantity of product inventory at a
particular time and location.
adjustment_groupModelOptionalExpand 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_idJSONOptional
catalog_object_id (anyOf 1)stringAlternativeThe Square-generated ID of the
[CatalogObject](entity:CatalogObject) being tracked.
Maximum length: 100
catalog_object_id (anyOf 2)nullAlternative
catalog_object_typeJSONOptional
catalog_object_type (anyOf 1)stringAlternativeThe [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)nullAlternative
cost_moneyJSONOptional
cost_money (anyOf 1)ModelAlternativeExpand 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)nullAlternative
created_atstringOptionalAn RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.
Maximum length: 34
Read only: true
employee_idJSONOptional
employee_id (anyOf 1)stringAlternativeThe Square-generated ID of the [Employee](entity:Employee) responsible for the
inventory adjustment.
Maximum length: 100
employee_id (anyOf 2)nullAlternative
from_location_idJSONOptional
from_location_id (anyOf 1)stringAlternativeThe 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)nullAlternative
from_stateJSONOptional
from_state (anyOf 1)stringAlternativeIndicates 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)nullAlternative
goods_receipt_idstringOptionalThe 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
idstringOptionalA unique ID generated by Square for the
`InventoryAdjustment`.
Maximum length: 100
occurred_atJSONOptional
occurred_at (anyOf 1)stringAlternativeA 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)nullAlternative
physical_count_idstringOptionalThe 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_idstringOptionalThe 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
quantityJSONOptional
quantity (anyOf 1)stringAlternativeThe 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)nullAlternative
reason_idJSONOptional
reason_id (anyOf 1)ModelAlternativeExpand Create Inventory Adjustment Reason — response body — adjustment reason id
Identifies the reason for this inventory adjustment.
reason_id (anyOf 2)nullAlternative
reference_idJSONOptional
reference_id (anyOf 1)stringAlternativeAn optional ID provided by the application to tie the
`InventoryAdjustment` to an external
system.
Maximum length: 255
reference_id (anyOf 2)nullAlternative
refund_idstringOptionalThe 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
sourceModelOptionalExpand Retrieve Inventory Physical Count — response body — count source
Information about the application that caused the
inventory adjustment.
Read only: true
team_member_idJSONOptional
team_member_id (anyOf 1)stringAlternativeThe Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
inventory adjustment.
Maximum length: 100
team_member_id (anyOf 2)nullAlternative
to_location_idJSONOptional
to_location_id (anyOf 1)stringAlternativeThe 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)nullAlternative
to_stateJSONOptional
to_state (anyOf 1)stringAlternativeIndicates 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)nullAlternative
total_price_moneyModelOptionalExpand 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_idstringOptionalThe 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_idJSONOptional
vendor_id (anyOf 1)stringAlternativeThe 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)nullAlternative

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

SDK function policy ID: square.retrieveinventoryadjustment. Catalog operation: RetrieveInventoryAdjustment. 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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.