Docs

Create Procurement

POST /procurements

POST/procurements

Creates 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

FieldTypeRequiredDescription
namestringOptional
descriptionstringOptional
resourcesAddProcurementRequestResource[]Optional
groupsAddProcurementRequestGroup[]Optional

AddProcurementRequestResource

FieldTypeDescription
resourceTypeIduuid
quantitynumber
areaIduuid| null
groupIndexinteger| null
attributeValuesAddProcurementRequestAttributeValue[]| null

AddProcurementRequestGroup

FieldTypeDescription
namestring| null
notesstring| null

AddProcurementRequestAttributeValue

FieldTypeDescription
resourceAttributeIduuid
valuestring| null

Response

Type: uuid