Create an Item
POST
/api/v1/itemsRegister an item with full control over all Kenya Revenue Authority fields. Use this when the simplified /items/service or /items/goods endpoints do not cover your requirements.
Requires x-api-key
http://localhost:8100/api/v1/items
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key |
| Content-Type | string | Required | Must be application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| itemCd | string | Optional | Custom item code. Auto-generated if omitted. |
| itemClsCd | string | Required | Item class code: SV=Service, GD=Goods |
| itemTyCd | string | Required | Item type code from Kenya Revenue Authority code class 20 |
| itemNm | string | Required | Item name (max 100 chars) |
| itemStdNm | string | Optional | Standardized item name |
| orgnNatCd | string | Optional | Origin nation code (default: KE) |
| pkgUnitCd | string | Required | Packaging unit code from Kenya Revenue Authority code class 17 |
| qtyUnitCd | string | Required | Quantity unit code from Kenya Revenue Authority code class 10 |
| taxTyCd | string | Required | Tax type code: A, B, C, or D |
| btchNo | string | Optional | Batch number for tracked goods |
| bcd | string | Optional | Barcode |
| dftPrc | number | Optional | Default price in KES |
| addInfo | string | Optional | Additional information |
| sftyQty | number | Optional | Safety/minimum stock quantity |
| useYn | string | Required | Active: Y or N |
Request
{
"itemClsCd": "SV",
"itemTyCd": "2",
"itemNm": "Annual Licence Fee",
"pkgUnitCd": "NT",
"qtyUnitCd": "U",
"taxTyCd": "B",
"dftPrc": 120000,
"useYn": "Y"
}Response
{
"resultCd": "000",
"resultMsg": "Item registered successfully",
"data": {
"itemCd": "SV0000000Z002",
"itemNm": "Annual Licence Fee",
"itemClsCd": "SV",
"taxTyCd": "B",
"useYn": "Y",
"regDt": "20240115",
"modiDt": "20240115"
}
}curl -X POST http://localhost:8100/api/v1/items \\
-H "x-api-key: YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"itemClsCd": "SV",
"itemTyCd": "2",
"itemNm": "Annual Licence Fee",
"pkgUnitCd": "NT",
"qtyUnitCd": "U",
"taxTyCd": "B",
"dftPrc": 120000,
"useYn": "Y"
}'