Items
Products and services.
| Endpoint | Permission | Notes |
|---|---|---|
GET /masterdata/getItems/{gtimeStamp?} | any role | Returns Item[], each with the current stockBalance for stocked items. |
GET /masterdata/getItem/{itemId} | Item · Read | Returns an Item, or 404. |
POST /masterdata/upsertItem | Item · Write | JSON body: an Item. itemId and itemName are required. Item names must be unique; a duplicate returns 400. |
POST /masterdata/upsertItemwFile | Item · Write | Multipart with images — see Uploading files. |
DELETE /masterdata/deleteItem/{itemId} | Item · Full | An item with transactions cannot be deleted (409). |
POST /masterdata/deleteItems | Item · Full | Body: JSON array of item IDs. Returns partial-success details if some fail. |
upsertItem response:
{ "item": { "itemId": "...", "itemName": "..." }, "status": "Success" }
curl -X POST "$BASE_URL/masterdata/upsertItem" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemId": "8f14e45f-ceea-467a-9575-7d1b6c1a2b33",
"itemName": "Widget A",
"itemCode": "WID-A",
"salesFlag": true,
"purchaseFlag": true,
"salesRate": 500,
"purchaseRate": 350,
"inventoryFlag": true,
"taxId": "TAX_ID_FROM_getTaxes",
"isActive": true
}'
Data model
Only the commonly used properties are listed. Unless marked required, every property is optional. Properties that the server sets itself (bizId, createdBy, modifiedBy, app, and creation/modification timestamps) should be left out of requests. The OpenAPI document has the complete definitions.
Item
| Property | Type | Notes |
|---|---|---|
itemId | string | Required. Caller-generated unique ID. |
itemName | string | Required. Unique within the business. |
itemCode, barcode | string | |
itemTyp | string | Goods or service type. |
itemTxt, salesDesc, purchaseDesc | string | Descriptions. |
salesFlag, purchaseFlag | boolean | Whether the item can be sold / bought. |
salesRate, purchaseRate, mrp | number | |
salesAcct, purchaseAcct | string | Account IDs. |
taxId | string | Default tax. |
taxCalcType | string | Inclusive or Exclusive. |
uomId | string | Unit of measure ID. |
secondaryUomId, conversionFactor | string, number | Secondary unit of measure. |
inventoryFlag | boolean | true to track stock. |
openingStockQuantity, openingStockPrice, openingStockDate | number, number, date | Opening stock. |
reorderQuantity | number | |
stockBalance | number | Read-only. Current stock, returned by getItems. |
itemCategory, itemGroup | string | |
inHsnCode, inSacCode | string | India HSN/SAC codes. |
isActive | boolean | Set false to archive; archived items cannot be added to new transactions. |
subItems | object[] | Components, for bundled items. |
customFields | object[] | User-defined fields. |