Skip to content

Know what is on the shelf, promised and due

Reserve, receive, sell or count. Watch Available move.

What the animation shows:
  1. Receipt NIR-2026-0214 arrives from Moara Vadului SRL.
  2. The sugar line is read: 100 bags.
  3. It lands on Expected in the sugar balance.
  4. The balance: 70 on hand, 15 reserved, 55 available.
  5. Available 55 is under the reorder point of 100.
  6. Posting the receipt brings the 100 bags into stock.
  7. Posted: 170 on hand, 155 available, 0 expected.
  8. The next receipt starts the same way.

Stock

All locations

Stock

12 of 17 rows

Stock by item and location
White flour, 10 kg bagFA-0010Main warehouse68105860
Sunflower oil, 1 lUL-0101Main warehouse1800180—
Sugar, 1 kgZA-0201Main warehouse701555100
Rice, 1 kgOR-0620Main warehouse8008040
Dishwashing liquid, 5 lDT-0412Main warehouse26026—
Paper bags, pack of 100AM-0518Main warehouse909—
Cheese, 400 gLA-0307Cold room8608648
Cheese, sold by weightLA-0315Cold room78.5 kg0 kg78.5 kg—
Sunflower oil, 1 lUL-0101Shop Piatra-Neamț57057—
Rice, 1 kgOR-0620Shop Piatra-Neamț34034—
Sugar, 1 kgZA-0201Shop Piatra-Neamț50050—
White flour, 10 kg bagFA-0010Shop Piatra-Neamț12012—

Press Enter to open the record.

Reservation CV-1038

Reserved
+15
Revision after
3
Recorded
6 Nov, 13:15
By
Andrei Pop

Location

Main warehouse6Cold room2Shop Piatra-Neamț6Shop Roman3

Movements

7
  1. Return RET-2026-0007
    Change in on hand: +4
  2. Sale LIV-2026-01811
    Change in on hand: -64
  3. Sale LIV-2026-01790
    Change in on hand: -60

Every movement stays on the card

Rice, 1 kg, at Shop Roman: till receipt Bon 0411 was entered a second time as a new operation. It had a different operationId, so it was applied twice and the rice fell twice. The correction is a reversal: a new line linked to the second entry, while the line it undoes stays as it was.

Stock card: Rice, 1 kg, Shop Roman
TimeKindDocumentOn handOn hand after
16 Nov, 12:20ReversalReverses Bon 0411Bon 0411+624
16 Nov, 12:00SaleReversedBon 0411-618
16 Nov, 12:00SaleBon 0411-624
9 Nov, 12:05TransferTR-2026-0032+3030

Reserve, receive, sell, count

  1. Reserve

    Reserved goes up and Available goes down by the same quantity. On hand does not move. The order keeps its place until it is delivered or the reservation is reversed.

    Show it: Reserve
  2. Receive

    Posting a receipt adds to On hand and to Available. Until it is posted the goods are only Expected. If the stock changed after the receipt was read, posting is refused; the receipt is read again and sent as a new operation.

    Show it: Receive
  3. Sell

    A sale takes from On hand. A sale taken from a reservation also lowers Reserved, so Available is counted once.

    Show it: Sell
  4. Count

    A count sets On hand to what was found on the shelf and writes the difference as a movement. A count under what is reserved is refused.

    Show it: Count

The same request, sent twice, changes nothing

curl

curl -X POST "$RDC_BASE_URL/inventory/v1/reservations" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "90aebca5-208b-47dd-9e6d-c9159d4aab06",
  "customerOrgId": "690fa0e3-547f-4f93-96b7-824475cc3d7c",
  "legalCompanyId": "d84ba982-ca9a-4e91-9566-21bd23f7227b",
  "occurredAt": "2026-11-23T07:12:00Z",
  "source": {
    "service": "erp",
    "documentId": "46091949-3c11-414b-9157-994f3048e568",
    "documentType": "sales-order",
    "documentRevision": 1
  },
  "actor": {
    "serviceId": "brumar-erp",
    "userId": "4e2f591e-3df0-4f36-8741-3e49134249b0"
  },
  "lines": [
    {
      "productId": "6cbfcba3-55fd-4cf0-9709-6e75c9717bb3",
      "locationId": "b006344d-2fae-4970-bb6f-c32877084b4f",
      "quantity": "24",
      "expectedRevision": 5
    }
  ]
}'

Response

202 Accepted, the first time and the second
{
  "operationId": "90aebca5-208b-47dd-9e6d-c9159d4aab06",
  "status": "completed",
  "aggregateRevision": 6,
  "movementIds": [
    "771d53db-5d2c-4a12-b9a6-bb3c86e5eeea"
  ]
}

409 Conflict, a new operationId on the old revision
{
  "code": "revision_conflict",
  "message": "A balance has changed since the revision you sent.",
  "requestId": "req_4f9d2a7c1b6e8035"
}

From the till to the books

Step 1 of 5

  1. ERP, product
  2. POS, product
  3. INV, product
  4. Accounting, product

Sale from reserved stock

  1. ERP, product

    Reserve for the order

    Sales order CV-1042 asks INV to set aside 24 bags, with the revision of the balance it read.

    Document
    CV-1042
    On hand
    68
    Reserved
    10
    Available
    58
    Revision
    5
  2. INV, product

    Record the reservation

    The balance holds 24 more as reserved. On hand does not change; available falls by 24.

    Document
    CV-1042
    On hand
    68
    Reserved
    34
    Available
    34
    Revision
    6
  3. POS, product

    Sell at the till

    The customer collects the order. The till sends Bon 1042: 24 bags sold, all 24 taken from the reservation, with revision 6.

    Document
    Bon 1042
    On hand
    68
    Reserved
    34
    Available
    34
    Revision
    6
  4. INV, product

    Take the sale from the reservation

    The sale takes 24 from on hand and releases the same 24 from reserved in one step, so available does not change a second time.

    Document
    Bon 1042
    On hand
    44
    Reserved
    10
    Available
    34
    Revision
    7
  5. Accounting, product

    Book the issue of goods

    The event of the sale reaches Accounting, which books the goods that left.

    Document
    Bon 1042
    On hand
    44
    Reserved
    10
    Available
    34
    Revision
    7

Receipt

  1. ERP, product

    Receive the goods

    Receipt NIR-2026-0214 lists sugar, flour and rice for the main warehouse. Sugar is expected: 100 more are on their way into the balance.

    Document
    NIR-2026-0214
    On hand
    70
    Reserved
    15
    Available
    55
    Expected
    100
    Revision
    7
  2. INV, product

    Post the receipt

    Each line adds its quantity to on hand and to available. Expected falls back to zero.

    Document
    NIR-2026-0214
    On hand
    170
    Reserved
    15
    Available
    155
    Expected
    0
    Revision
    8
  3. Accounting, product

    Book the receipt

    The event of each movement reaches Accounting, which books the goods that came in.

    Document
    NIR-2026-0214
    On hand
    170
    Reserved
    15
    Available
    155
    Expected
    0
    Revision
    8

Stale revision refused and retried

  1. ERP, product

    Read the balance

    The receipt is prepared against revision 7 of the sugar balance.

    Document
    NIR-2026-0214
    On hand
    70
    Reserved
    15
    Available
    55
    Expected
    100
    Revision
    7
  2. INV, product

    Another sale lands first

    Delivery LIV-2026-01850 takes 5 bags before the receipt arrives. The balance moves to revision 8.

    Document
    LIV-2026-01850
    On hand
    65
    Reserved
    15
    Available
    50
    Expected
    100
    Revision
    8
  3. INV, product

    Refuse the old revision

    The stock changed after you read it. Read it again and retry. Nothing is applied.

    Document
    NIR-2026-0214
    On hand
    65
    Reserved
    15
    Available
    50
    Expected
    100
    Revision
    8
  4. ERP, product

    Read again, send again

    The refusal says to read again and send a new operation: the receipt goes out with revision 8 and a new operationId.

    Document
    NIR-2026-0214
    On hand
    65
    Reserved
    15
    Available
    50
    Expected
    100
    Revision
    8
  5. INV, product

    Record it once

    The receipt is recorded once. Sent again with this operationId, it would return this outcome and change nothing.

    Document
    NIR-2026-0214
    On hand
    165
    Reserved
    15
    Available
    150
    Expected
    0
    Revision
    9

What each step writes

Sale from reserved stock
StepRecord created or changed
1 Reserve for the orderRequest with operationId and expectedRevision
2 Record the reservationReservation movement, revision 6
3 Sell at the tillSale with reservedQuantity 24
4 Take the sale from the reservationSale movement, revision 7
5 Book the issue of goodsEntry for the goods issued
Receipt
StepRecord created or changed
1 Receive the goodsReceipt with its lines
2 Post the receiptReceipt movement per line
3 Book the receiptEntry for the goods received
Stale revision refused and retried
StepRecord created or changed
1 Read the balanceReceipt with expectedRevision 7
2 Another sale lands firstSale movement, revision 8
3 Refuse the old revisionNothing: the operation is not recorded
4 Read again, send againReceipt with expectedRevision 8
5 Record it onceReceipt movement, revision 9

Questions about stock figures

What is the difference between on hand and available?

On hand is what the books say is on the shelf. Reserved is promised to orders. Available is on hand minus reserved: what you can still promise or sell. Expected is only on its way: it is in no other figure until the receipt is posted.

Can available stock go below zero?

No. A change that would leave a balance with less on hand than reserved is refused as a whole, and none of its lines is applied. The refusal names the reason, and the balance stays as it was.

How do I correct a mistake?

A movement is never edited. A correction is a reversal, a new movement linked to the first one, and both stay on the card. The card keeps who sent each movement, from which document, and the revision the balance reached.

What happens when two systems change the same item at once?

Every change names the revision of the balance it read. The second one reaches a balance that has moved on and is refused. It reads again and sends again. The refusal is a 409 with the code revision_conflict.

What if my till sends the same sale twice?

The sale carries an operationId. The second send returns the first outcome and changes nothing, so a retry after a timeout is safe. A different body under the same operationId is refused as a reuse.

Related guides

Proposal for INV

Tell us your locations and the systems that send stock changes, and we scope INV with you.

Request a proposal