Add New Items
The "Add New Items" API facilitates the addition of new items to the items master for a specific project.
Add an Item
curl --location 'https://demo.hng.one/developerapi/lab/add-items' \
--header 'Authorization: Bearer <<JWT_TOKEN>>' \
--header 'Content-Type: application/json' \
--data-raw '[{
"itemUID" : "LABREA00025",
"itemName" : "blood urea - 4x50 - agappe",
"usageName" : "blood urea",
"description" : "blood urea"
"itemType" : "REAGENT",
"packSize" : "4x50",
"units" : "ml",
"price" : 693.0,
"manufacturer" : "agappe",
"subItems" : [
{
"itemName" : "blood urea r1",
"packSize" : "2x40"
},
{
"itemName" : "blood urea r2",
"packSize" : "2x10"
}
]
},
{
"itemUID" : "LABCON00105",
"itemName" : "needles 22g",
"usageName" : "needles 22g",
"description" : "needles 22g",
"itemType" : "CONSUMABLE",
"packSize" : "1X1000",
"units" : "nos",
"price" : 693.0,
"manufacturer" : "bd"
}]'
API Fields Description
Item Info
| Field | Description | Type | Required |
|---|---|---|---|
| itemUID | unique ID of the Item | String | Yes |
| itemName | name of the Item and this may vary based on manufaturer, pack size etc... | String | Yes |
| usageName | usage Name of the Item | String | Yes |
| description | item description | String | No |
| itemType | REAGENT / CONSUMABLE | String | Yes |
| packSize | item package details | String | No |
| units | units of the Item | String | Yes |
| price | price of the Item | Number | No |
| manufacturer | manfufacture name of the Item | String | Yes |
| subItems | this is for an item consits of multiple types of components. For example, blood urea consists of multiple types of components, such as R1 and R2. | String | No |
Sub Items Info
| Field | Description | Type | Required |
|---|---|---|---|
| itemName | name of the Sub Item | String | Yes |
| packSize | item package details | String | No |