Represents a change in state or quantity of product inventory at a particular time and location.
InventoryAdjustment
Name | Type | Tags | Description | Getter | Setter |
---|---|---|---|---|---|
id |
?string |
Optional | A unique ID generated by Square for theInventoryAdjustment .Constraints: Maximum Length: 100 |
getId(): ?string | setId(?string id): void |
referenceId |
?string |
Optional | An optional ID provided by the application to tie theInventoryAdjustment to an externalsystem. Constraints: Maximum Length: 255 |
getReferenceId(): ?string | setReferenceId(?string referenceId): void |
fromState |
?string(InventoryState) |
Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | getFromState(): ?string | setFromState(?string fromState): void |
toState |
?string(InventoryState) |
Optional | Indicates the state of a tracked item quantity in the lifecycle of goods. | getToState(): ?string | setToState(?string toState): void |
locationId |
?string |
Optional | The Square-generated ID of the Location where the related quantity of items is being tracked. Constraints: Maximum Length: 100 |
getLocationId(): ?string | setLocationId(?string locationId): void |
catalogObjectId |
?string |
Optional | The Square-generated ID of the CatalogObject being tracked. Constraints: Maximum Length: 100 |
getCatalogObjectId(): ?string | setCatalogObjectId(?string catalogObjectId): void |
catalogObjectType |
?string |
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 |
getCatalogObjectType(): ?string | setCatalogObjectType(?string catalogObjectType): void |
quantity |
?string |
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 |
getQuantity(): ?string | setQuantity(?string quantity): void |
totalPriceMoney |
?Money |
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. |
getTotalPriceMoney(): ?Money | setTotalPriceMoney(?Money totalPriceMoney): void |
occurredAt |
?string |
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 |
getOccurredAt(): ?string | setOccurredAt(?string occurredAt): void |
createdAt |
?string |
Optional | An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received. Constraints: Maximum Length: 34 |
getCreatedAt(): ?string | setCreatedAt(?string createdAt): void |
source |
?SourceApplication |
Optional | Represents information about the application used to generate a change. | getSource(): ?SourceApplication | setSource(?SourceApplication source): void |
employeeId |
?string |
Optional | The Square-generated ID of the Employee responsible for the inventory adjustment. Constraints: Maximum Length: 100 |
getEmployeeId(): ?string | setEmployeeId(?string employeeId): void |
teamMemberId |
?string |
Optional | The Square-generated ID of the Team Member responsible for the inventory adjustment. Constraints: Maximum Length: 100 |
getTeamMemberId(): ?string | setTeamMemberId(?string teamMemberId): void |
transactionId |
?string |
Optional | The Square-generated ID of the Transaction that caused the adjustment. Only relevant for payment-related state transitions. Constraints: Maximum Length: 255 |
getTransactionId(): ?string | setTransactionId(?string transactionId): void |
refundId |
?string |
Optional | The Square-generated ID of the Refund that caused the adjustment. Only relevant for refund-related state transitions. Constraints: Maximum Length: 255 |
getRefundId(): ?string | setRefundId(?string refundId): void |
purchaseOrderId |
?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. Constraints: Maximum Length: 100 |
getPurchaseOrderId(): ?string | setPurchaseOrderId(?string purchaseOrderId): void |
goodsReceiptId |
?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. Constraints: Maximum Length: 100 |
getGoodsReceiptId(): ?string | setGoodsReceiptId(?string goodsReceiptId): void |
adjustmentGroup |
?InventoryAdjustmentGroup |
Optional | - | getAdjustmentGroup(): ?InventoryAdjustmentGroup | setAdjustmentGroup(?InventoryAdjustmentGroup adjustmentGroup): void |
{
"id": "id6",
"reference_id": "reference_id6",
"from_state": "WASTE",
"to_state": "RESERVED_FOR_SALE",
"location_id": "location_id0"
}