On this page6 sections
Update Inventory Level
Performs an idempotent stock adjustment (`SET`, `IN`, or `OUT`) inside a database transaction using `idempotencyKey`. Rejects negative stock outcomes with `409 Conflict`.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Outlet Scope Enforcement: Results and mutations are automatically scoped to the actor's accessible outlets when the
inventorymodule restriction applies.
Request
Provide the following fields in the request payload.
outlet Id parameter.
product Id parameter.
variant Id parameter.
operation parameter.
quantity parameter.
minimum Stock parameter.
reason parameter.
idempotency Key parameter.
Responses
Select a status code to inspect schema.
Success (true).
Message.
Response payload or null.
curl -X POST "https://api.invoger.com/api/inventory/update-inventory" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "outletId": "o1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c", "productId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "operation": "IN", "quantity": 25, "reason": "Restock shipment #PO-104", "idempotencyKey": "11111111-2222-4333-8444-555555555555" }'Response
{
"success": true,
"message": "Inventory updated successfully",
"data": {
"quantityAfter": 70,
"Duplicate": false
}
}