Create Item
Endpoint: POST /items
Authentication: Bearer Token (required)
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication. Format: Bearer <token> |
| Content-Type | string | Yes | Must be application/json |
Request Body
The request body must be a JSON object with the following structure:
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the item (e.g., "Tissues") |
| itemCode | string | Yes | Unique code identifying the item (e.g., "010") |
| itemGroup | string or null | No | Item group classification. Use null if not applicable |
| uom | string | Yes | Unit of measure (e.g., "Nos", "Kgs", "Ltrs") |
| valuationMethod | string | Yes | Inventory valuation method. Supported values: "MAVG" (Moving Average), "FIFO", "LIFO", "STANDARD" |
| maintainStock | boolean | Yes | Whether to track stock levels for this item |
| allowNegativeStock | boolean | Yes | Whether negative stock levels are allowed |
| qty | number | Yes | Initial quantity of the item in stock |
| unitPrice | string | Yes | Selling price per unit as a string (e.g., "5") |
| cost | string | Yes | Cost per unit as a string (e.g., "4") |
| companyIdString | string | Yes | UUID of the company that owns this item |
Example Request Body
{
"name": "Tissues",
"itemCode": "010",
"itemGroup": null,
"uom": "Nos",
"valuationMethod": "MAVG",
"maintainStock": true,
"allowNegativeStock": false,
"qty": 100,
"unitPrice": "5",
"cost": "4",
"companyIdString": "{{companyId}}"
}