Transfer Stock
POST
/api/v1/stock/transferRecord an inter-branch stock transfer in Kenya Revenue Authority eTIMS. Submitted as stock movement type 13 (sarTyCd: 13) via the stock I/O endpoint. Use this when physically moving goods between your business branches.
Requires x-api-key
http://localhost:8100/api/v1/stock/transfer
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key. |
| Content-Type | string | Required | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| items | array | Required | Array of items being transferred. |
| fromBhfId | string | Optional | Source branch ID. Defaults to '00' (head office). |
| toBhfId | string | Optional | Destination branch ID. |
| sarNo | number | Optional | Stock adjustment record number. Auto-generated from timestamp if omitted. |
| ocrnDt | string | Optional | Occurrence date, yyyyMMddHHmmss format. Defaults to now. |
| regrId | string | Optional | Registering user ID. Defaults to 'USR01'. |
| regrNm | string | Optional | Registering user name. Defaults to 'Admin'. |
Item Fields
| Field | Type | Required | Description |
|---|---|---|---|
| itemCd | string | Required | Kenya Revenue Authority item code. |
| itemClsCd | string | Required | Kenya Revenue Authority item classification code. |
| itemNm | string | Required | Item name. |
| pkgUnitCd | string | Required | Packaging unit code. |
| pkg | number | Required | Number of packages. |
| qtyUnitCd | string | Required | Quantity unit code. |
| qty | number | Required | Quantity transferred. |
| prc | number | Required | Unit price. |
| splyAmt | number | Required | Supply amount (qty x prc). |
| taxblAmt | number | Required | Taxable amount. |
| taxTyCd | string | Required | Tax type code. |
| taxAmt | number | Required | Tax amount. |
| totAmt | number | Required | Total amount. |
Request
{
"fromBhfId": "00",
"toBhfId": "01",
"sarNo": 2024011501,
"ocrnDt": "20240115103045",
"regrId": "USR01",
"regrNm": "Admin",
"items": [
{
"itemCd": "GD0000000Z001",
"itemClsCd": "5020230000",
"itemNm": "Raw Material A",
"pkgUnitCd": "BX",
"pkg": 5,
"qtyUnitCd": "KG",
"qty": 50,
"prc": 1000,
"splyAmt": 50000,
"totDcAmt": 0,
"taxblAmt": 43103.45,
"taxTyCd": "B",
"taxAmt": 6896.55,
"totAmt": 50000
}
]
}Response
{
"success": true,
"message": "Stock transfer recorded in Kenya Revenue Authority eTIMS.",
"data": {
"success": true,
"sarNo": 2024011501
}
}curl -X POST http://localhost:8100/api/v1/stock/transfer \\
-H "x-api-key: YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"fromBhfId": "00",
"toBhfId": "01",
"regrId": "USR01",
"regrNm": "Admin",
"items": [{
"itemCd": "GD0000000Z001",
"itemClsCd": "5020230000",
"itemNm": "Raw Material A",
"pkgUnitCd": "BX",
"pkg": 5,
"qtyUnitCd": "KG",
"qty": 50,
"prc": 1000,
"splyAmt": 50000,
"totDcAmt": 0,
"taxblAmt": 43103.45,
"taxTyCd": "B",
"taxAmt": 6896.55,
"totAmt": 50000
}]
}'