Docs
Create Schedule Block
POST /procurement-resources/{resourceId}/schedule-blocks
POST
/procurement-resources/{resourceId}/schedule-blocksRequired 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. |
Adds a schedule block to a need and re-evaluates its planned states.
Event scoping: This endpoint does not include
{eventId} in the URL. The event is determined automatically from your x-Event-Token.Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| resourceId | Guid | Required | The need (procurement resource). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| typeId | Guid | Required | A schedule block type. |
| name | string | Optional | Display name. |
| startDateTime | DateTimeOffset | Required | Start. Before `endDateTime`. |
| endDateTime | DateTimeOffset | Required | End. |
| activityId | Guid? | Optional | Linked activity. |
| notes | string | Optional | Notes. |
| areaId | Guid? | Optional | Area context for the block. |
| collaboratorId | Guid? | Optional | Collaborator context for the block. |
Response
201 Created with { "id": "<blockId>", "revisedOrders": [...] }. revisedOrders is [{ id, name, versionNumber }]: orders a revision was minted on because this edit changed what a sent order covers. Empty when none.
Error Codes
| HTTP Status | Description |
|---|---|
| 400 | resourceId is a composite parent. A composite has no schedule of its own: schedule each component need instead (create blocks on one, then Copy Schedule to the others). Also returned for invalid times. |
| 404 | Need not found. |