Docs

Add Activity

POST /Activities

POST/Activities

Creates an activity with crew, collaborator and area participants, and returns the new activity's id. Only the name is required: with no state it lands Draft until it has a start time, then Tentative, and asking for Tentative or Confirmed without a start time is refused with the missing list. A start with no end makes a marker. With no participants the organizer is the owning organization's collaborator (for its members) or the caller's crew record. Needs Activity.Manage at the event, or Activity.Manage at one attached collaborator or area and Activity.Edit at every other; an activity with no collaborator or area needs the caller among its crew organizers (or no participants named), and a global one needs Activity.Manage at the event. Crew ids come from Crew_GetCrew, collaborator ids from Events_GetCollaborators and area ids from Events_GetAreas; needs an event token. With an organization token and no event token it creates an organization activity with org crew, department and location participants instead (areas and collaborators are refused), under the same rule at the organization, departments and locations. activityTypeId is optional: a type of this organization, not archived and offered on this calendar (from Activities_GetActivityTypeOptions); its role slots are created with the activity. With a type, values and roleOccupants are written in the same create under Activities_SetActivityValue's and Activities_SetActivityRoleOccupants' rules, before the gate decides the state; either without a type, or naming an attribute or role the type does not place, is a 400 and creates nothing.

Request Body

FieldTypeRequiredDescription
statestringOptional
namestringOptional
descriptionstringOptional
startDateTimedate-timeOptional
endDateTimedate-timeOptional
isDateOnlybooleanOptional
exactLocationstringOptional
meetingLinkstringOptional
isGlobalbooleanOptional
isAllDaybooleanOptional
areasuuid[]Optional
crewMembersAddActivityRequestActivityParticipant[]Optional
collaboratorsAddActivityRequestActivityParticipant[]Optional
locationsuuid[]Optional
departmentsAddActivityRequestActivityParticipant[]Optional
activityTypeIduuidOptional
valuesAddActivityRequestAttributeValueInput[]Optional
roleOccupantsAddActivityRequestRoleOccupantsInput[]Optional

AddActivityRequestActivityParticipant

FieldTypeDescription
iduuid
pullBaseServiceCrewPull
rolestring| null

AddActivityRequestAttributeValueInput

FieldTypeDescription
attributeIduuid
valueJsonElement| null
expiresOnJsonElement| null
itemExpiriesJsonElement| null

AddActivityRequestRoleOccupantsInput

FieldTypeDescription
roleDefinitionIduuid
crewIdsuuid[]| null
collaboratorRecordIdsuuid[]| null
pullsBaseServiceCrewPull[]| null

BaseServiceCrewPull

FieldTypeDescription
orgCrewIduuid
placementCollaboratorIduuid| null