Version: 202201
Create Procurement
POST/openapi/2022-01/procurements
Allows users to create a procurement record associated with a specific supplier.
Request
- application/json
- Body
- Example
Body
procurement objectrequired
supplier_idstringrequired
Supplier's ID
notestring
{
"procurement": {
"supplier_id": "string",
"note": "string"
}
}
Responses
- 200
- 422
200
- application/json
- Schema
- Example
- Result
Schema
procurement object
idstring
Example:
382451985837728044procurement_snstring
Example:
00000002supplier_idstring
Example:
382411381263052204location_idstring
Example:
190035786870033452notestring
Example:
testaaastateinteger
Default value:
0Example:
1pending_quantityinteger
Default value:
0Example:
0received_quantityinteger
Default value:
0Example:
0rejected_quantityinteger
Default value:
0Example:
0transfer_quantityinteger
Default value:
0Example:
0created_bystring
Example:
created_atstring
Example:
2024-05-21T08:47:39Zupdated_atstring
Example:
2024-05-21T08:50:36Z{
"procurement": {
"id": "382451985837728044",
"procurement_sn": "00000002",
"supplier_id": "382411381263052204",
"location_id": "190035786870033452",
"note": "testaaa",
"state": 1,
"pending_quantity": 0,
"received_quantity": 0,
"rejected_quantity": 0,
"transfer_quantity": 0,
"created_by": "",
"created_at": "2024-05-21T08:47:39Z",
"updated_at": "2024-05-21T08:50:36Z"
}
}
{
"procurement": {
"id": "382451985837728044",
"procurement_sn": "00000002",
"supplier_id": "382411381263052204",
"location_id": "190035786870033452",
"note": "testaaa",
"state": 1,
"pending_quantity": 0,
"received_quantity": 0,
"rejected_quantity": 0,
"transfer_quantity": 0,
"created_by": "",
"created_at": "2024-05-21T08:47:39Z",
"updated_at": "2024-05-21T08:50:36Z"
}
}
422
- application/json
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"Supplier not found"
]
}
{
"errors": [
"Supplier not found"
]
}