Docs

Create Schedule Block

POST /procurement-resources/{resourceId}/schedule-blocks

POST/procurement-resources/{resourceId}/schedule-blocks

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **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

FieldTypeRequiredDescription
resourceIdGuidRequiredThe need (procurement resource).

Request Body

FieldTypeRequiredDescription
typeIdGuidRequiredA schedule block type.
namestringOptionalDisplay name.
startDateTimeDateTimeOffsetRequiredStart. Before `endDateTime`.
endDateTimeDateTimeOffsetRequiredEnd.
activityIdGuid?OptionalLinked activity.
notesstringOptionalNotes.
areaIdGuid?OptionalArea context for the block.
collaboratorIdGuid?OptionalCollaborator 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 StatusDescription
400resourceId 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.
404Need not found.