Docs
Create Procurement
POST /procurements
POST
/procurementsCreates a procurement, optionally with groups and needs in the same call; a need references a group by its index in the groups list. Returns the new procurement's id. To add a need to an existing procurement, use Procurements_AddProcurementResource. Resource type ids come from Resources_Get and area ids from Events_GetAreas. Attribute values are for attributes placed on the type and active on Procurement; a Select value is the option id.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Optional | |
| description | string | Optional | |
| resources | AddProcurementRequestResource[] | Optional | |
| groups | AddProcurementRequestGroup[] | Optional |
AddProcurementRequestResource
| Field | Type | Description |
|---|---|---|
| resourceTypeId | uuid | |
| quantity | number | |
| areaId | uuid| null | |
| groupIndex | integer| null | |
| attributeValues | AddProcurementRequestAttributeValue[]| null |
AddProcurementRequestGroup
| Field | Type | Description |
|---|---|---|
| name | string| null | |
| notes | string| null |
AddProcurementRequestAttributeValue
| Field | Type | Description |
|---|---|---|
| resourceAttributeId | uuid | |
| value | string| null |
Response
Type: uuid