Skip to content

Latest commit

 

History

History
55 lines (46 loc) · 5.12 KB

inventory-adjustment.md

File metadata and controls

55 lines (46 loc) · 5.12 KB

Inventory Adjustment

Represents a change in state or quantity of product inventory at a particular time and location.

Structure

InventoryAdjustment

Fields

Name Type Tags Description
id string | undefined Optional A unique ID generated by Square for the
InventoryAdjustment.
Constraints: Maximum Length: 100
referenceId string | undefined Optional An optional ID provided by the application to tie the
InventoryAdjustment to an external
system.
Constraints: Maximum Length: 255
fromState string | undefined Optional Indicates the state of a tracked item quantity in the lifecycle of goods.
toState string | undefined Optional Indicates the state of a tracked item quantity in the lifecycle of goods.
locationId string | undefined Optional The Square-generated ID of the Location where the related
quantity of items is being tracked.
Constraints: Maximum Length: 100
catalogObjectId string | undefined Optional The Square-generated ID of the
CatalogObject being tracked.
Constraints: Maximum Length: 100
catalogObjectType string | undefined Optional The type of the 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.
Constraints: Maximum Length: 14
quantity string | undefined Optional The number of items affected by the adjustment as a decimal string.
Can support up to 5 digits after the decimal point.
Constraints: Maximum Length: 26
totalPriceMoney Money | undefined Optional Represents an amount of money. Money fields can be signed or unsigned.
Fields that do not explicitly define whether they are signed or unsigned are
considered unsigned and can only hold positive amounts. For signed fields, the
sign of the value indicates the purpose of the money transfer. See
Working with Monetary Amounts
for more information.
occurredAt string | undefined Optional 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.
Constraints: Maximum Length: 34
createdAt string | undefined Optional An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.
Constraints: Maximum Length: 34
source SourceApplication | undefined Optional Represents information about the application used to generate a change.
employeeId string | undefined Optional The Square-generated ID of the Employee responsible for the
inventory adjustment.
Constraints: Maximum Length: 100
teamMemberId string | undefined Optional The Square-generated ID of the Team Member responsible for the
inventory adjustment.
Constraints: Maximum Length: 100
transactionId string | undefined Optional The Square-generated ID of the Transaction that
caused the adjustment. Only relevant for payment-related state
transitions.
Constraints: Maximum Length: 255
refundId string | undefined Optional The Square-generated ID of the Refund that
caused the adjustment. Only relevant for refund-related state
transitions.
Constraints: Maximum Length: 255
purchaseOrderId string | undefined Optional The Square-generated ID of the purchase order that caused the
adjustment. Only relevant for state transitions from the Square for Retail
app.
Constraints: Maximum Length: 100
goodsReceiptId string | undefined Optional The Square-generated ID of the goods receipt that caused the
adjustment. Only relevant for state transitions from the Square for Retail
app.
Constraints: Maximum Length: 100
adjustmentGroup InventoryAdjustmentGroup | undefined Optional -

Example (as JSON)

{
  "id": null,
  "reference_id": null,
  "from_state": null,
  "to_state": null,
  "location_id": null,
  "catalog_object_id": null,
  "catalog_object_type": null,
  "quantity": null,
  "total_price_money": null,
  "occurred_at": null,
  "source": null,
  "employee_id": null,
  "team_member_id": null,
  "adjustment_group": null
}