Last updated

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
List event templates (Optional)/v2/event-templates/listList all the event 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
Get event template/v2/event-templates/{templateId}Retrieve an event 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.
Create a parent eventv2/eventsCreate 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 API to get the list of airport codes for overriding the bookingGuidelines > airBookingGuideline > allowedAirports field. Use the hotel search autocomplete API to get the list of hotel codes for overriding bookingGuidelines > hotelBookingGuideline > allowedHotels field.

Response will contain: eventId

Other APIs will use: eventId
Update event booking guidelines (Optional)/v2/events/{eventId}/edit-booking-guidelinesUpdate 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 API to get the list of airport codes for overriding the bookingGuidelines > airBookingGuideline > allowedAirports field. Use the hotel search 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
Create a child eventv2/eventsCreate 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 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
Bulk edit events (Optional)/v2/events/bulk-editModify 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 workflow to know the edit status.
Bulk cancel events (Optional)/v2/events/bulk-cancelBulk 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 workflow to determine the cancellation status.
Bulk publish events/v2/events/bulk-publishPublish 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 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 (step 3) and creating a child event (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 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 API, then those child events will be detached from its parent event. See attached and detached child events concept to learn more.