# Creating a specialty desk session event The steps below explain how to create a specialty desk (SPD) session event from a template. | Step | Name | Endpoint | Details | | --- | --- | --- | --- | | 1. | [List templates](/openapi/templateapi/event-templates/listeventtemplates) (Optional) | `/v2/event-templates/list` | List all the templates that have been created for a company. **Request body requires:** `companyId` of the company. Alternatively, you can also use the event name to list all templates that match the name. **Response will contain:** List of templates that match the request criteria, along with the `templateIds` and the respective event details. **Other APIs will use:** `templateId` | | 1. | [Get template](/openapi/templateapi/event-templates/geteventtemplate) | `/v2/event-templates/{templateId}` | Retrieve a template. **URL path requires:** `templateId` from step 1. **Response will contain:** The `templateId` along with the event details mapped to the template, such as the event name, description, location, payment sources, custom field responses, allowed travel types, and policy details. **Note:** Be sure to inherit details from the template by copying all the event details in the response and using them in the next step when creating an event. **Other APIs will use:** `templateId` and all the event details in the response. | | 1. | [Create a parent event](/openapi/eventapi/events/createevent) | `v2/events` | Create a parent event. **Request body requires:** All the event details copied from step 2, the `parentEventId` (i.e., the `templateId` from step 2), `bookingStyle`, and `type`. In this workflow, the `type` must be `PROGRAM_SESSION`. **Note:** A parent event may not contain any travelers. If you wish to override the event details copied from the template, pass the new values in the request. For example, if you want to override the event location value copied from the template, set the `location` field to the new location. Use the [air search autocomplete](/openapi/airapi/autocomplete/airautocomplete) API to get the list of airport codes for overriding the `bookingGuidelines` > `airBookingGuideline` > `allowedAirports` field. Use the [hotel search autocomplete](/openapi/hotelapi/autocomplete) API to get the list of hotel codes for overriding `bookingGuidelines` > `hotelBookingGuideline` > `allowedHotels` field. **Response will contain:** `eventId` **Other APIs will use:** `eventId` | | 1. | [Update event booking guidelines](/openapi/eventapi/events/updateeventbookingguidelines) (Optional) | `/v2/events/{eventId}/edit-booking-guidelines` | Update the booking guidelines for the parent event. Use this endpoint to override specific event details such as allowed booking types, payment mappings, travel start and end date, and guidelines for the travel types (e.g., allowed airports). **Note:** Use the [air search autocomplete](/openapi/airapi/autocomplete/airautocomplete) API to get the list of airport codes for overriding the `bookingGuidelines` > `airBookingGuideline` > `allowedAirports` field. Use the [hotel search autocomplete](/openapi/hotelapi/autocomplete) API to get the list of hotel codes for overriding `bookingGuidelines` > `hotelBookingGuideline` > `allowedHotels` field. **URL path requires:** `eventId` from step 3. **Request body requires:** `bookingGuidelines`, `allowedBookingTypes`, and `paymentMappings` | | 1. | [Create a child event](/openapi/eventapi/events/createevent) | `v2/events` | Create a child event and add a traveler to it. **Note:** Only one traveler can be added to a child event. For example, if there are 10 attendees, 10 child events must be created (one for each traveler). In the API request, copy all the event details from the parent event using its `eventId` from step 3 (use the [get event](/openapi/eventapi/events/getevent) API). For all child events, the `parentEventId` field must have the `eventId` of the parent event from step 3, and the `type` must be set to `PROGRAM_TRIP`. **Response will contain:** `eventId` **Other APIs will use:** `eventId` | | 1. | [Bulk edit events](/openapi/eventapi/events/bulkeditevents) (Optional) | `/v2/events/bulk-edit` | Modify the parent event and all its associated child events using a single API call. This API can also be used to update specific child events directly. **Request body requires:** The `eventsToUpdate` > `eventId` field must contain the `eventId` of the parent event from step 3, the `type` must be set to `PROGRAM_SESSION`, and the `updateAsync` field must be set to `true`. Along with these details, pass the respective event fields that need to be edited (e.g., event location, date, payment sources, etc.). **Response will contain:** An array of `eventIds` along with their edit status. The `updateEventResponse` > `status` field will contain `SUCCESS` or `FAILED` depending on whether the event edit has been successful or not. If the `updateAsync` field is set to `true`, use the [bulk processing job status](/spotnana/spd_bulk_process_status_workflow) workflow to know the edit status. | | 1. | [Bulk cancel events](/openapi/eventapi/events/bulkcancelevents) (Optional) | `/v2/events/bulk-cancel` | Bulk cancel published events or bulk delete unpublished events. You can cancel an event only if all the bookings associated with the event are inactive (i.e., PNRs with status `CANCELLED`, `VOIDED`, `CANCELLED_BY_VENDOR`, `INOPERATIVE`, or `UNCONFIRMED`). **Request body requires:** To cancel all child events, the `cancelEventRequests` > `eventId` must have the parent `eventId`, and the `type` must be set to `PROGRAM_SESSION`. Use the individual child `eventIds` if you wish to cancel or delete specific child events separately. **Note:** If all the child events are canceled then the `status` of the parent event will be set to `CANCELLED`. **Response will contain:** An array of `eventIds` along with their cancellation status (i.e., `SUCCESS`, `FAILED`, or `PARTIAL_SUCCESS`). If the `cancelAsync` field is set `true`, then use the [bulk processing job status](/spotnana/spd_bulk_process_status_workflow) workflow to determine the cancellation status. | | 1. | [Bulk publish events](/openapi/eventapi/events/bulkpublishevents) | `/v2/events/bulk-publish` | Publish all child events associated with a parent event using a single API call. **Request body requires:** The `publishEventList` > `id` must contain the `eventId` of the parent event from step 3 and the `type` field should be set to `PRGORAM_SESSION`. This API will publish the events asynchronously. To determine the status of event publishing, use the [bulk processing job status](/spotnana/spd_bulk_process_status_workflow) workflow. **Note:** Publishing the events will create the respective trips for the travelers. The travelers must log in to the OBT to start creating their travel bookings. | ## Important notes: - Both [creating a parent event](/openapi/eventapi/events/createevent) (step 3) and [creating a child event](/openapi/eventapi/events/createevent) (step 5) use the same API endpoint (i.e., `/v2/events`). They are distinguished from one another using the `parentEventId` and the event `type` fields. - To view all the child events associated with a parent event, use the [list events](/openapi/eventapi/events/listevents) API with the `filters` > `eventParentFilter` set to contain the parent event's `eventId`. - If you’re editing any specific child events using the [bulk edit events](/openapi/eventapi/events/bulkeditevents) API, then those child events will be detached from its parent event. See [attached and detached child events concept](/spotnana/spd_types#attached-and-detached-child-events) to learn more.