POST
/
api
/
inventories
Create an inventory
curl --request POST \
  --url http://localhost:3000/api/inventories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "material": "<string>",
  "quantity": 1,
  "location": "<string>",
  "storageColor": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "material": "<string>",
    "quantity": 123,
    "location": "<string>",
    "storageColor": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
material
string
required
Minimum string length: 1
stockType
enum<string>
required
Available options:
Raw,
Reuse
quantity
number
required
Required range: x >= 0
location
string
required
Minimum string length: 1
storageColor
string

Response

Inventory created

success
boolean
Example:

true

message
string
data
object