Squarespace - Update Inventory
Description
Section titled “Description”This module allows modifying the inventory quantity of a product variant in Squarespace. It can increment, decrement, or set an exact value.
Configuration
Section titled “Configuration”Required Credentials
Section titled “Required Credentials”- API Key: Squarespace API key
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credential | Yes | Squarespace credentials |
| inventory_id | string | Yes | Inventory ID (variant ID) |
| quantity | number | Yes | Quantity to adjust |
| adjustment_type | select | No | Type: increment, decrement, set |
Adjustment Types
Section titled “Adjustment Types”- increment: Adds the quantity to current stock
- decrement: Subtracts the quantity from current stock
- set: Sets the exact value
Output
Section titled “Output”{ "success": true, "inventory": {...}, "inventory_id": "5f3e...", "new_quantity": 100, "message": "Inventory 5f3e... updated successfully"}Usage Example
Section titled “Usage Example”Set exact stock
Section titled “Set exact stock”{ "inventory_id": "5f3e...", "quantity": 100, "adjustment_type": "set"}Increment stock
Section titled “Increment stock”{ "inventory_id": "5f3e...", "quantity": 50, "adjustment_type": "increment"}Decrement stock
Section titled “Decrement stock”{ "inventory_id": "5f3e...", "quantity": 10, "adjustment_type": "decrement"}API Used
Section titled “API Used”- Endpoint:
POST /1.0/commerce/inventory/{id}/adjustments - Documentation: Squarespace Inventory Adjustments
- The inventory_id corresponds to the product’s variantId
- Only products with
isFinite: truecan have inventory adjustments - To get the inventory_id, first use the GetInventory module
- Negative adjustments resulting in stock < 0 will be rejected
Related Nodes
Section titled “Related Nodes”- SquarespaceGetInventory - Get current inventory levels
- SquarespaceGetProducts - Get product and variant data
- SquarespaceGetOrders - Get orders that affect inventory