Creating a specialty desk event
The steps below explain how to create a specialty desk event from a template.
Step | Name | Endpoint | Details |
---|---|---|---|
List event templates (Optional) | /v2/event-templates/list | List 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.Note: The request body also contains an optional offset and limit field to retrieve a paginated list of available templates.Response will contain: List of templates that match the request criteria, along with the templateIds and 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 that are mapped to the template such as the event name, description, location, payment sources, custom field responses, allowed travel types, and policy details.Note: Inherit details from the template by copying all relevant event details in the response and using them in the next step when creating an event. Other APIs will use: templateId and the relevant event details in the response. | |
Create event | v2/events | Create a draft event and add a traveler to the event. Request body requires: All the event details copied from step 2, the parentEventId (i.e., the templateId from step 2), bookingStyle , type , and the travelerId . In this workflow, the type must be set to PROGRAM and bookingStyle to SELF_SERVE .When creating events using a template, you can only add 1 traveler per event. To add more travelers, create a new event (from the template) for each traveler. If you wish to override the event details copied from the template, then pass the new values in the request. For example, if you want to override the event location from the value copied from the template, then set the location field to the new location.Response will contain: eventId Other APIs will use: eventId Note: If creating multiple events from a template, store the generated eventIds in a persistent data storage location (e.g., local storage, a database) to enable bulk publishing in step 7. | |
Update event booking guidelines | /v2/events/{eventId}/edit-booking-guidelines | Update the booking guidelines for the draft event. Use this endpoint to override specific event details such as allowed booking types, payment mappings, and booking guidelines for the travel types (e.g., allowed airports). URL path requires: eventId from step 3.Request body requires: bookingGuidelines , allowedBookingTypes , and paymentMappings | |
Bulk edit events (Optional) | /v2/events/bulk-edit | Edit events (created from the template) in bulk with a single API call. Request body requires: An eventsToUpdate array object. This object can hold multiple eventIds and their respective event fields 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. | |
Bulk delete events (Optional) | /v2/events/bulk-delete | Delete events in bulk. Request body requires: A deleteEventList array object containing all the draft eventIds to be deleted.Response will contain: An array of eventIds along with their deletion status (SUCCESS or FAILED ).Note: You can also use this endpoint to remove a traveler. Since a specialty desk event can contain only one traveler, deleting an event will also remove the traveler. | |
Bulk publish events | /v2/events/bulk-publish | Publish events in bulk via a single API call. Request body requires: A publishEventList array object. This object can hold multiple draft eventIds to be published along with a sendInvite boolean flag which if set to true will send an event invite to the traveler added to the event.Response will contain: eventIds along with their publishing status (i.e., SUCCESS or FAILED ).Note: Publishing the events will create the respective trips for the travelers. The travelers must login to the OBT to start creating their travel bookings for their trips. |
Important notes
- For all the events created using a template (i.e.,
type: PROGRAM
), theparentEventId
must be set to thetemplateId
of the selected template. - The
type
field cannot be modified once the draft event is created. - When creating multiple events from the same template, it's recommended to store the
eventIds
generated in a persistent storage location (e.g., local storage, database) so they can be bulk published in step 7. - Events created from a template can only contain one traveler. Repeat steps 3, 4, and 5 above if you need to add more travelers.