/inventory/adjustments
Adjust stock at a location
Books a manual stock movement and returns the resulting ledger entry in the same shape as GET /preview/inventory/transactions/{transactionId}, so the balance after the movement is readable without a second request. quantity is a signed delta, not a target balance: -3 writes off three units, +3 adds three.
Show the full description
Zero is rejected. transactionType defaults to Adjustment; Scrap is the other allowed value and always reduces stock, so it requires a negative quantity. Receipt, Issue and Transfer belong to the purchase, picking and transfer flows and are rejected here — booking them without their counterpart would leave the ledger inconsistent with the documents behind it. Returning goods to stock is done through the return flow, POST /preview/returns/{returnNumber}/receive. The movement is booked at the location's current average cost; there is no way to set a cost here, because neither an adjustment nor a scrap revalues stock. Use a revaluation for that. Reducing below the quantity on hand at that location returns 409. Known error codes: Item.NotFound, Warehouse.NotFound, WarehouseLocation.NotFound, Inventory.InsufficientStock, Inventory.NoStockAtLocation.
Body required
| Field | Type | Description |
|---|---|---|
batchNumber
|
string · nullable | Batch (lot) the movement applies to. Required when the item is batch tracked in this warehouse; the batch must already exist. Omitting it on a tracked item returns 400. |
itemNumber
Required
|
string | Item to adjust. |
locationCode
Required
|
string | Location within the warehouse. |
notes
|
string · nullable | Reason for the adjustment. Recommended — this is the audit trail. |
quantity
Required
|
decimal | Signed change. Positive increases stock, negative decreases it. This is a delta, not the new balance — pass -3 to write off three units. |
serialNumber
|
string · nullable | Serial number the movement applies to. Required when the item is serial tracked. |
transactionType
|
enum |
How to classify the movement: Adjustment (default) or Scrap. Receipt, Issue and Transfer
are produced by their own flows and are rejected here; Return belongs to the return flow.
Receipt
Issue
Adjustment
Transfer
Return
Scrap
ConsignmentConsumption
Revaluation
|
warehouseCode
Required
|
string | Warehouse the stock sits in. |
Responses
PublicInventoryTransactionResponse
-
Location— URL of the newly created resource.
| Field | Type | Description |
|---|---|---|
averageCostAfter
|
decimal | Average cost after the movement, in the tenant's base currency. |
balanceAfter
|
decimal | On-hand quantity after the movement. Serialised as a decimal string. |
batchNumber
|
string · nullable | Batch / lot number, for batch-tracked items. |
itemNumber
|
string · nullable | Item number the movement applies to. |
locationCode
|
string · nullable | Location code within the warehouse. |
notes
|
string · nullable | Free-text notes stored on the movement. |
quantity
|
decimal | Signed quantity: positive increases stock, negative decreases it. Serialised as a decimal string. |
referenceId
|
string · nullable | Identifier of the originating record, as text. Null if manual. |
referenceType
|
string · nullable | What the movement originated from, e.g. `SalesOrder`, `PurchaseOrder`. Null if manual. |
serialNumber
|
string · nullable | Serial number, for serial-tracked items. |
targetLocationCode
|
string · nullable | Destination location code. Only set on Transfer movements. |
transactionDate
|
string(date-time) | UTC timestamp of the movement. |
transactionId
|
string(uuid) | Internal unique identifier of the transaction (UUID v7). Stable, use it to deduplicate. |
transactionType
|
enum |
What caused a stock movement. Mirrors the internal transaction types.
Receipt
Issue
Adjustment
Transfer
Return
Scrap
ConsignmentConsumption
Revaluation
|
unitCost
|
decimal · nullable | Unit cost booked on the movement, in the tenant's base currency. |
warehouseCode
|
string · nullable | Warehouse code the movement happened in. |
ProblemDetails
The quantity is zero, a Scrap was sent with a positive quantity, the transaction type may not be booked manually, the item, warehouse or location does not exist, or the adjustment would take the location below zero.
| Field | Type |
|---|---|
detail
|
string · nullable |
instance
|
string · nullable |
status
|
integer · nullable |
title
|
string · nullable |
type
|
string · nullable |
Standard errors:
401
403
409
Errors
Examples
curl -X POST "https://api.erp.fluit.cloud/preview/inventory/adjustments" \
-H "X-Api-Key: fluit_live_sk_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d @body.json
{
"itemNumber": "ART-1001",
"locationCode": "A-01-01",
"notes": "Quality inspection reject, NCR-2026-0042",
"quantity": "-1",
"transactionType": "Scrap",
"warehouseCode": "HUVUD"
}
{
"itemNumber": "ART-1001",
"locationCode": "A-01-01",
"notes": "Damaged in handling",
"quantity": "-3",
"warehouseCode": "HUVUD"
}
{
"averageCostAfter": "299.00",
"balanceAfter": "299.00",
"batchNumber": "ABC-001",
"itemNumber": "WIDGET-A",
"locationCode": "STD",
"notes": "string",
"quantity": "10",
"referenceId": "string",
"referenceType": "string",
"serialNumber": "ABC-001",
"targetLocationCode": "STD",
"transactionDate": "2026-06-11T09:24:13.418",
"transactionId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
"transactionType": "Receipt",
"unitCost": "299.00",
"warehouseCode": "MAIN"
}
Base URL https://api.erp.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.