Docs

Create Order

POST /Orders

POST/Orders

Creates an empty Draft order on the event and returns its id. Source (Internal or External) is optional and defaults to External; vendorCollaboratorRecordId (one of the organization's collaborator records) is optional. Add lines with Orders_AddLineItems, rename it with Orders_UpdateOrder, or use Orders_CreateOrderFromProcurement to pre-fill from a procurement. With an org token (resource inventory edit) it creates an organization-level order instead: vendorCollaboratorRecordId (a collaborator record) is required, defaultDisposition (Pool or OrgUse) defaults to Pool, and requestingDepartmentId is optional. Either scope takes an optional orderTypeId (an active type from OrderTypes_GetOrderTypes), values for attributes that type places and intakeAnswers to its intake form. roleOccupants fills the roles the type places (one entry per role, the list matching the role as in Orders_SetOrderRoleOccupants, checked the same way). A crew member or collaborator filling a role is an organization record: it never adds them to the event. A role named with occupants skips its fill-from default, one left out or named empty keeps it. The candidates come from Orders_GetEventOrderRoleCandidates and Orders_GetOrganizationOrderRoleCandidates. The order is created Draft and never refused for missing required values; the type's template runs and its effects, tracking and AI fill start.

Request Body

FieldTypeRequiredDescription
namestringOptional
sourcestringOptional
vendorCollaboratorRecordIduuidOptional
defaultDispositionstringOptional
requestingDepartmentIduuidOptional
orderTypeIduuidOptional
valuesCreateOrderRequestAttributeValueInput[]Optional
intakeAnswersCreateOrderRequestIntakeAnswerInput[]Optional
roleOccupantsCreateOrderRequestRoleOccupantsInput[]Optional

CreateOrderRequestAttributeValueInput

FieldTypeDescription
attributeIduuid
valueJsonElement| null
expiresOnJsonElement| null
itemExpiriesJsonElement| null

CreateOrderRequestIntakeAnswerInput

FieldTypeDescription
questionIduuid
valueJsonElement| null

CreateOrderRequestRoleOccupantsInput

FieldTypeDescription
roleDefinitionIduuid
crewIdsuuid[]| null
collaboratorRecordIdsuuid[]| null
resourceIdsuuid[]| null
procurementResourceIdsuuid[]| null

Response

Type: uuid