Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10329,6 +10329,13 @@ paths:
Changes an Event Format's settings, as **Edit** on the Manage Event Formats page does. Only
the settings you send change. Only an **Organisation Admin** of its organisation may edit it.

**Organisation default:** send `is_organisation_default: true` to make this the organisation's
default Event Format, as **Make default** on the Manage Event Formats page does. The default
is added to a Project whenever events are turned on there (on Project Preferences, by adding
the Events app to the Project, or by a Project Automation), unless the Project's Event Formats
are chosen at the same time. It moves from any other Event Format, so an organisation has at
most one. `false` stops this Event Format being the default.

**Add to Calendar email** (all optional): `send_add_to_calendar_email`, `allow_guests_to_cancel`
and `cancellation_guest_status_id`, as on Create. The Guest Status used for cancellations must
stay one of the Event Format's Guest Statuses, so remove it from `guest_status_ids` only after
Expand All @@ -10350,12 +10357,19 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/EventFormatInput'
allOf:
- $ref: '#/components/schemas/EventFormatInput'
- type: object
properties:
is_organisation_default:
type: boolean
description: true makes this the organisation's default Event Format; false stops it being the default
example:
appointment_type: group
default_length_minutes: 90
preparation_minutes: 15
debrief_minutes: 15
is_organisation_default: true
responses:
"200":
description: The edited Event Format
Expand Down Expand Up @@ -32654,6 +32668,11 @@ components:
is_default:
type: boolean
description: One of the Event Formats every organisation starts with
is_organisation_default:
type: boolean
description: |
Whether this is the organisation's default Event Format, which is added to a Project
whenever events are turned on there. An organisation has at most one.
charity_id:
type: integer
description: The Organisation (Charity) that owns it
Expand Down Expand Up @@ -33035,6 +33054,11 @@ components:
type: string
is_default:
type: boolean
is_organisation_default:
type: boolean
description: |
Whether this is the organisation's default Event Format, which is added to a Project
whenever events are turned on there. An organisation has at most one.
charity_id:
type: integer
attendance_form_id:
Expand Down
8 changes: 5 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4903,6 +4903,7 @@ function buildDocsPage() {
<div class="section-desc">
<p>Event Formats (Event Categories in the API) are the templates an organisation's events are created from, such as Workshops, Classes or Meetings. Only an Organisation Admin can list, read, create, edit or delete an organisation's Event Formats. An Event Format can be deleted only once it has no events and is not added to any project; the list says which ones can be deleted and why not. Default formats can be deleted under the same rules.</p>
<p><strong>Appointments:</strong> an Event Format can be a One-to-one or Group appointment (<code>appointment_type</code> <code>one_to_one</code> or <code>group</code>; <code>null</code> means "Not an appointment"). <code>default_length_minutes</code> (5-minute steps) sets the end time on the Create Event page, and <code>preparation_minutes</code> and <code>debrief_minutes</code> are the time a colleague needs either side of each appointment.</p>
<p><strong>Organisation default:</strong> an organisation can make one Event Format its default (<code>is_organisation_default</code>), as <b>Make default</b> on the Manage Event Formats page does. It is added to a project whenever events are turned on there, unless the project's Event Formats are chosen at the same time.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/event_categories", "List Event Formats", true, [
Expand All @@ -4911,7 +4912,7 @@ function buildDocsPage() {
{ name: "per_page", type: "integer", required: false, desc: "Records per page" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
], [
{ code: "200", cls: "response-2xx", desc: "Paginated list — each with events_count, projects_count, can_delete and delete_blocked_reason" },
{ code: "200", cls: "response-2xx", desc: "Paginated list — each with is_organisation_default, events_count, projects_count, can_delete and delete_blocked_reason" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin (of charity_id, if given)" }
])}
${endpointCard("POST", "/event_categories", "Create an Event Format", true, [
Expand Down Expand Up @@ -4944,7 +4945,7 @@ function buildDocsPage() {
${endpointCard("GET", "/event_categories/{id}", "Get an Event Format", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Event Format (Event Category) ID" }
], [
{ code: "200", cls: "response-2xx", desc: "The Event Format with its settings, Guest Statuses, project_ids, appointment settings and Add to Calendar email settings" },
{ code: "200", cls: "response-2xx", desc: "The Event Format with is_organisation_default, its settings, Guest Statuses, project_ids, appointment settings and Add to Calendar email settings" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the owning organisation" },
{ code: "404", cls: "response-4xx", desc: "Not found, or belongs to an organisation you are not in" }
])}
Expand All @@ -4969,7 +4970,8 @@ function buildDocsPage() {
{ name: "debrief_minutes", in: "body", type: "integer", required: false, desc: "Debrief time after each appointment, 0–1440 (default 0)" },
{ name: "send_add_to_calendar_email", in: "body", type: "boolean", required: false, desc: "Send an 'Add to Calendar' email to each guest added to an event of this format. Needs the organisation's email messaging turned on" },
{ name: "allow_guests_to_cancel", in: "body", type: "boolean", required: false, desc: "Let guests cancel from that email. Only kept while send_add_to_calendar_email is true" },
{ name: "cancellation_guest_status_id", in: "body", type: "integer", required: false, desc: "The Guest Status a guest who cancels is moved to: one of the Event Format's own. Required when allow_guests_to_cancel is true" }
{ name: "cancellation_guest_status_id", in: "body", type: "integer", required: false, desc: "The Guest Status a guest who cancels is moved to: one of the Event Format's own. Required when allow_guests_to_cancel is true" },
{ name: "is_organisation_default", in: "body", type: "boolean", required: false, desc: "true makes this the organisation's default Event Format, added to a project whenever events are turned on there (it moves from any other); false stops it being the default" }
], [
{ code: "200", cls: "response-2xx", desc: "Edited — only the settings sent change" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the owning organisation" },
Expand Down
Loading