Docs
Create Procurement
POST /procurements
POST
/procurementsRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually. |
Creates a procurement, optionally with groups and needs in the same call.
Event scoping: This endpoint does not include
{eventId} in the URL. The event is determined automatically from your x-Event-Token.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Display name. |
| description | string | Optional | Description. |
| groups | array | Optional | `{ name, notes }`. Needs reference a group by its index in this list. |
| resources | array | Optional | Initial needs. Pass `[]` for none. |
| resources[].resourceTypeId | Guid | Required | The resource type. |
| resources[].quantity | decimal | Required | Quantity. |
| resources[].areaId | Guid? | Optional | Area context. |
| resources[].groupIndex | int? | Optional | Index into `groups`. Null leaves the need ungrouped. |
| resources[].attributeValues | array | Optional | `{ resourceAttributeId, value }`: values for attributes placed on the type and active on Procurement. A `Select` value is the option id. |
Response
201 Created with the new procurement's id as a bare Guid.