Stock
This section covers direct eTIMS stock adjustments, incremental stock movements (stock in/out against the current balance), sending an adjustment to eTIMS, creating stock transfers, viewing current stock quantity for a product, and pulling stock movements from eTIMS.
Direct eTIMS stock adjustment
Description
Note: This endpoint sends to eTIMS automatically. If for any reason it was not sent (e.g. eTIMS submission was disabled at the time), trigger the send manually with Send adjustment to eTIMS using the
idreturned here.
Request body
| Priority | Key | Type | Description |
|---|---|---|---|
| REQUIRED | inventory_reference | text | A reference/label for the adjustment |
| REQUIRED | reason | text | Reason for the adjustment (e.g. Initial Quantity) |
| Optional | description | text | Free-text description |
| REQUIRED | lines | object[] | Adjustment lines: product (uuid) and quantity (number) |
| Optional | location | uuid | Inventory location; resolved from the user's branch when omitted |
| Optional | source_organisation_unit | uuid | Resolved from the user's department when omitted |
Required
- X-Workstation - [REQUIRED] The workstation ID of the user.
Headers
AcceptReturns the response in JSON format
X-Workstation[REQUIRED] Workstation ID
Direct eTIMS stock adjustment › Request Body
inventory_referencereasondescriptionlocationsource_organisation_unitDirect eTIMS stock adjustment › Responses
Created. Returns the processed inventory adjustment.
Incremental stock movement
Description
Records an incremental stock movement against the current on-hand balance. Unlike Direct eTIMS stock adjustment, which sets an absolute quantity, the quantity on each line here is a delta that is added to (STOCK_IN) or subtracted from (STOCK_OUT) the product's existing balance at the location.
Each response line shows both sides of the movement so the effect is auditable: previous_quantity is the balance before the movement and quantity is the resulting balance. In the example below a STOCK_IN of 5 moves the product from 10.0000 to 15.0000.
The inventory location is resolved from the requesting user's branch, and the adjustment is created and processed in one call (workflow_state: PROCESSED).
Note: This endpoint does not push to eTIMS automatically — the response returns
sent_to_etims: false. Submit the movement with Send adjustment to eTIMS using theidreturned here.
Request body
| Priority | Key | Type | Description |
|---|---|---|---|
| REQUIRED | inventory_reference | text | A reference/label for the movement (e.g. the source document) |
| REQUIRED | movement_type | text | STOCK_IN to increase the balance, STOCK_OUT to decrease it |
| REQUIRED | lines | object[] | Movement lines: product (product name) and quantity (the delta, a positive number) |
| Optional | date | datetime (ISO 8601) | When the movement occurred; defaults to the time of the request |
| Optional | reason | text | Reason for the movement (e.g. Stock-in for invoice INV-2045) |
Required
- X-Workstation - [REQUIRED] The workstation ID of the user.
Headers
AcceptReturns the response in JSON format
X-Workstation[REQUIRED] Workstation ID
Incremental stock movement › Request Body
inventory_referenceA reference/label for the movement
movement_typeDirection of the movement. STOCK_IN adds the line quantities to the current balance; STOCK_OUT subtracts them.
Movement lines
dateWhen the movement occurred. Defaults to the time of the request.
reasonReason for the movement
Incremental stock movement › Responses
Created. Returns the processed movement, with the balance before and after each line.
idThe inventory adjustment ID. Pass this to Send adjustment to eTIMS.
document_numberSystem-generated document number for the movement
workflow_stateState of the adjustment. The movement is created and processed in one call.
location_idInventory location the movement was applied to, resolved from the user's branch
location_nameName of the inventory location
sent_to_etimsWhether the movement has been pushed to eTIMS. This endpoint does not push automatically, so this is false.
Send adjustment to eTIMS
Description
Sends an existing inventory adjustment to the eTIMS stock IO on demand. Use this when an adjustment was not already sent automatically by Direct eTIMS stock adjustment. The id in the path is the adjustment ID.
Required
- id - [REQUIRED] The inventory adjustment ID.
- X-Workstation - [REQUIRED] The workstation ID of the user.
path Parameters
id[REQUIRED] The inventory adjustment ID
Headers
AcceptReturns the response in JSON format
X-Workstation[REQUIRED] Workstation ID
Send adjustment to eTIMS › Responses
Adjustment queued for eTIMS.
Create inventory transfer
Description
This API endpoint creates an inventory transfer
Headers
AcceptReturn response in json format
X-WorkstationCreate inventory transfer › Request Body optional
nameName of the transfer
descriptionDescription of the transfer
destination_locationInventory destination location
source_locationInventory source location
Create inventory transfer › Responses
OK
active_pricelistdepartmentdestination_location_namedocument_latest_commentdocument_typeidinventory_delivery_statusmade_bynameoperation_type_descriptionoperation_type_nameorganisationparent_document_numbersource_location_namesource_organisation_unitsupplier_nametransfer_typeupdated_by_nameactivecreatedcreated_byupdatedupdated_bydocument_numberworkflow_statesource_documentreference_numberdocument_countdescriptionsent_to_etimsis_importis_credit_notefinancial_yearparent_documentoperation_typesupplierView stock quantity for a product
Description
Returns the current stock quantity (quantity at hand) per product and location. Filter by product to view the current stock for a single product.
Query parameters
| Priority | Key | Type | Description |
|---|---|---|---|
| Optional | product | uuid | Filter to a single product's stock |
| Optional | location | uuid | Filter by inventory location |
| Optional | stockout | boolean | Filter to stocked-out rows |
Tip: The product detail endpoint (
GET /api/products/products/{id}/) also returns a summarisedquantity_at_handfor the product at the user's branch.
Required
- X-Workstation - [REQUIRED] The workstation ID of the user.
query Parameters
productFilter to a single product's stock
locationFilter by inventory location
stockoutFilter to stocked-out rows
Headers
AcceptReturns the response in JSON format
X-Workstation[REQUIRED] Workstation ID
View stock quantity for a product › Responses
OK
Stock movements
Description
Pulls inter-branch stock movements from eTIMS (KRA selectStockMoveList) for the user's branch.
Query parameters
| Priority | Key | Type | Description |
|---|---|---|---|
| REQUIRED | from_date | datetime (YYYY-MM-DDTHH:MM:SS) | Pull movements recorded on/after this date-time |
Required
- X-Workstation - [REQUIRED] The workstation ID of the user.
query Parameters
from_date[REQUIRED] Lower bound (YYYY-MM-DDTHH:MM:SS)
Headers
AcceptReturns the response in JSON format
X-Workstation[REQUIRED] Workstation ID
Stock movements › Responses
OK

