curl --location --request POST 'https://api.stateset.com/v1/inventory_items/:id/adjust' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_change": -5,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"cost_adjustment": -125.00
}'
mutation inventoryAdjustMutation {
inventoryAdjust(
inventoryItemId: "${inventoryItemId}",
adjustmentType: "${adjustmentType}",
quantityChange: ${quantityChange},
reason: "${reason}",
warehouseId: "${warehouseId}",
locationId: "${locationId}",
referenceNumber: "${referenceNumber}",
costAdjustment: ${costAdjustment}
) {
adjustment {
id
quantity_before
quantity_after
quantity_change
cost_impact
}
userErrors {
field
message
}
}
}
const adjustment = await stateset.inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
});
adjustment = stateset.inventory.adjust({
'inventory_item_id': 'inv_abc123',
'adjustment_type': 'reconciliation',
'quantity_change': -5,
'reason': 'Physical count showed 5 less than system',
'warehouse_id': 'wh_east_01',
'location_id': 'loc_a1_shelf_3',
'reference_number': 'COUNT_2024_001',
'cost_adjustment': -125.00
})
adjustment = Stateset::Inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
})
adjustment, err := stateset.Inventory.adjust({
InventoryItemID: 'inv_abc123',
AdjustmentType: 'reconciliation',
QuantityChange: -5,
Reason: 'Physical count showed 5 less than system',
WarehouseID: 'wh_east_01',
LocationID: 'loc_a1_shelf_3',
ReferenceNumber: 'COUNT_2024_001',
CostAdjustment: -125.00
})
InventoryAdjustment adjustment = stateset.inventory.adjust({
inventoryItemId: 'inv_abc123',
adjustmentType: 'reconciliation',
quantityChange: -5,
reason: 'Physical count showed 5 less than system',
warehouseId: 'wh_east_01',
locationId: 'loc_a1_shelf_3',
referenceNumber: 'COUNT_2024_001',
costAdjustment: -125.00
});
$adjustment = $stateset->inventory->adjust([
'inventory_item_id' => 'inv_abc123',
'adjustment_type' => 'reconciliation',
'quantity_change' => -5,
'reason' => 'Physical count showed 5 less than system',
'warehouse_id' => 'wh_east_01',
'location_id' => 'loc_a1_shelf_3',
'reference_number' => 'COUNT_2024_001',
'cost_adjustment' => -125.00
]);
var adjustment = await stateset.Inventory.Adjust(new {
InventoryItemId = 'inv_abc123',
AdjustmentType = 'reconciliation',
QuantityChange = -5,
Reason = 'Physical count showed 5 less than system',
WarehouseId = 'wh_east_01',
LocationId = 'loc_a1_shelf_3',
ReferenceNumber = 'COUNT_2024_001',
CostAdjustment = -125.00
});
{
"id": "adj_xyz789",
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_before": 100,
"quantity_after": 95,
"quantity_change": -5,
"cost_impact": -125.00,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"adjusted_by": "user_123",
"adjusted_at": "2024-01-15T14:30:00Z",
"success": true
}
{
"error": {
"code": "insufficient_stock",
"message": "Cannot adjust inventory below zero. Current quantity: 3, requested change: -5",
"details": {
"current_quantity": 3,
"requested_change": -5,
"minimum_allowed": 0
}
}
}
Adjust Inventory
This endpoint adjusts inventory levels for stock reconciliation, damage, or other reasons.
POST
/
v1
/
inventory_items
/
:id
/
adjust
curl --location --request POST 'https://api.stateset.com/v1/inventory_items/:id/adjust' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_change": -5,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"cost_adjustment": -125.00
}'
mutation inventoryAdjustMutation {
inventoryAdjust(
inventoryItemId: "${inventoryItemId}",
adjustmentType: "${adjustmentType}",
quantityChange: ${quantityChange},
reason: "${reason}",
warehouseId: "${warehouseId}",
locationId: "${locationId}",
referenceNumber: "${referenceNumber}",
costAdjustment: ${costAdjustment}
) {
adjustment {
id
quantity_before
quantity_after
quantity_change
cost_impact
}
userErrors {
field
message
}
}
}
const adjustment = await stateset.inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
});
adjustment = stateset.inventory.adjust({
'inventory_item_id': 'inv_abc123',
'adjustment_type': 'reconciliation',
'quantity_change': -5,
'reason': 'Physical count showed 5 less than system',
'warehouse_id': 'wh_east_01',
'location_id': 'loc_a1_shelf_3',
'reference_number': 'COUNT_2024_001',
'cost_adjustment': -125.00
})
adjustment = Stateset::Inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
})
adjustment, err := stateset.Inventory.adjust({
InventoryItemID: 'inv_abc123',
AdjustmentType: 'reconciliation',
QuantityChange: -5,
Reason: 'Physical count showed 5 less than system',
WarehouseID: 'wh_east_01',
LocationID: 'loc_a1_shelf_3',
ReferenceNumber: 'COUNT_2024_001',
CostAdjustment: -125.00
})
InventoryAdjustment adjustment = stateset.inventory.adjust({
inventoryItemId: 'inv_abc123',
adjustmentType: 'reconciliation',
quantityChange: -5,
reason: 'Physical count showed 5 less than system',
warehouseId: 'wh_east_01',
locationId: 'loc_a1_shelf_3',
referenceNumber: 'COUNT_2024_001',
costAdjustment: -125.00
});
$adjustment = $stateset->inventory->adjust([
'inventory_item_id' => 'inv_abc123',
'adjustment_type' => 'reconciliation',
'quantity_change' => -5,
'reason' => 'Physical count showed 5 less than system',
'warehouse_id' => 'wh_east_01',
'location_id' => 'loc_a1_shelf_3',
'reference_number' => 'COUNT_2024_001',
'cost_adjustment' => -125.00
]);
var adjustment = await stateset.Inventory.Adjust(new {
InventoryItemId = 'inv_abc123',
AdjustmentType = 'reconciliation',
QuantityChange = -5,
Reason = 'Physical count showed 5 less than system',
WarehouseId = 'wh_east_01',
LocationId = 'loc_a1_shelf_3',
ReferenceNumber = 'COUNT_2024_001',
CostAdjustment = -125.00
});
{
"id": "adj_xyz789",
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_before": 100,
"quantity_after": 95,
"quantity_change": -5,
"cost_impact": -125.00,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"adjusted_by": "user_123",
"adjusted_at": "2024-01-15T14:30:00Z",
"success": true
}
{
"error": {
"code": "insufficient_stock",
"message": "Cannot adjust inventory below zero. Current quantity: 3, requested change: -5",
"details": {
"current_quantity": 3,
"requested_change": -5,
"minimum_allowed": 0
}
}
}
Body
The unique identifier of the inventory item to adjust
The type of adjustment (e.g., “reconciliation”, “damage”, “theft”, “expiration”, “return”, “manual”)
The quantity to adjust (positive for increase, negative for decrease)
Detailed reason for the adjustment
The warehouse where the adjustment is being made
The specific location within the warehouse
Reference number for tracking (e.g., count sheet number, incident report)
The cost impact of this adjustment for accounting purposes
Response
The unique identifier of the adjustment record
The inventory item that was adjusted
The type of adjustment performed
The quantity before adjustment
The quantity after adjustment
The actual quantity change applied
The financial impact of this adjustment
The user who performed the adjustment
Timestamp when the adjustment was made
Indicates whether the adjustment was successful
Error Responses
curl --location --request POST 'https://api.stateset.com/v1/inventory_items/:id/adjust' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_change": -5,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"cost_adjustment": -125.00
}'
mutation inventoryAdjustMutation {
inventoryAdjust(
inventoryItemId: "${inventoryItemId}",
adjustmentType: "${adjustmentType}",
quantityChange: ${quantityChange},
reason: "${reason}",
warehouseId: "${warehouseId}",
locationId: "${locationId}",
referenceNumber: "${referenceNumber}",
costAdjustment: ${costAdjustment}
) {
adjustment {
id
quantity_before
quantity_after
quantity_change
cost_impact
}
userErrors {
field
message
}
}
}
const adjustment = await stateset.inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
});
adjustment = stateset.inventory.adjust({
'inventory_item_id': 'inv_abc123',
'adjustment_type': 'reconciliation',
'quantity_change': -5,
'reason': 'Physical count showed 5 less than system',
'warehouse_id': 'wh_east_01',
'location_id': 'loc_a1_shelf_3',
'reference_number': 'COUNT_2024_001',
'cost_adjustment': -125.00
})
adjustment = Stateset::Inventory.adjust({
inventory_item_id: 'inv_abc123',
adjustment_type: 'reconciliation',
quantity_change: -5,
reason: 'Physical count showed 5 less than system',
warehouse_id: 'wh_east_01',
location_id: 'loc_a1_shelf_3',
reference_number: 'COUNT_2024_001',
cost_adjustment: -125.00
})
adjustment, err := stateset.Inventory.adjust({
InventoryItemID: 'inv_abc123',
AdjustmentType: 'reconciliation',
QuantityChange: -5,
Reason: 'Physical count showed 5 less than system',
WarehouseID: 'wh_east_01',
LocationID: 'loc_a1_shelf_3',
ReferenceNumber: 'COUNT_2024_001',
CostAdjustment: -125.00
})
InventoryAdjustment adjustment = stateset.inventory.adjust({
inventoryItemId: 'inv_abc123',
adjustmentType: 'reconciliation',
quantityChange: -5,
reason: 'Physical count showed 5 less than system',
warehouseId: 'wh_east_01',
locationId: 'loc_a1_shelf_3',
referenceNumber: 'COUNT_2024_001',
costAdjustment: -125.00
});
$adjustment = $stateset->inventory->adjust([
'inventory_item_id' => 'inv_abc123',
'adjustment_type' => 'reconciliation',
'quantity_change' => -5,
'reason' => 'Physical count showed 5 less than system',
'warehouse_id' => 'wh_east_01',
'location_id' => 'loc_a1_shelf_3',
'reference_number' => 'COUNT_2024_001',
'cost_adjustment' => -125.00
]);
var adjustment = await stateset.Inventory.Adjust(new {
InventoryItemId = 'inv_abc123',
AdjustmentType = 'reconciliation',
QuantityChange = -5,
Reason = 'Physical count showed 5 less than system',
WarehouseId = 'wh_east_01',
LocationId = 'loc_a1_shelf_3',
ReferenceNumber = 'COUNT_2024_001',
CostAdjustment = -125.00
});
{
"id": "adj_xyz789",
"inventory_item_id": "inv_abc123",
"adjustment_type": "reconciliation",
"quantity_before": 100,
"quantity_after": 95,
"quantity_change": -5,
"cost_impact": -125.00,
"reason": "Physical count showed 5 less than system",
"warehouse_id": "wh_east_01",
"location_id": "loc_a1_shelf_3",
"reference_number": "COUNT_2024_001",
"adjusted_by": "user_123",
"adjusted_at": "2024-01-15T14:30:00Z",
"success": true
}
{
"error": {
"code": "insufficient_stock",
"message": "Cannot adjust inventory below zero. Current quantity: 3, requested change: -5",
"details": {
"current_quantity": 3,
"requested_change": -5,
"minimum_allowed": 0
}
}
}
⌘I