Last updated

Managing event templates

The following API endpoints can be used to create, update, view, and delete event templates.

Note: Only the user profiles with the role of COMPANY_ADMIN, COMPANY_TRAVEL_ARRANGER, TRAVEL_ARRANGER, or TMC_ADMIN are allowed to create and manage event templates.

Creating an event template

NameEndpoint Details
Create an event template/v2/event-templatesCreate an event template for a recurring company program.

Request body contains: The event name, customFieldResponses, companyId, travelerTypes, and bookingStyle.

Response will contain: templateId

Other APIs will use: templateId

Note: Payment sources cannot be mapped using this endpoint. After creating a new template, use the update template guidelines endpoint to map the payment source to the template.

In the create event template endpoint request there are optional fields such as the event description, location, allowedBookingTypes, internalNotes, etc. Any information provided in the request schema (i.e., both required and optional) when creating a template can be inherited when creating an event from the template. For example, administrators can use the internalNotes field to provide instructions to the event coordinators when they create a new event.

Ideally, a template should contain as much reusable information as possible. This allows the event coordinators to prefill most recurring information, making the event creation process faster and more efficient.

Updating a template

The following endpoints allow you to update an existing template.

Note: Use the get event template endpoint to view template information before making any updates.

NameEndpoint Details
Update a template’s basic information/v2/event-templates/{templateId}/edit-basic-infoUpdate a template’s basic information such as the name, description, internal notes, location, traveler types, booking style, and policy details.

URL path requires: templateId generated using the create an event template endpoint.

Request body requires: The event name, description, internalNotes, location, travelerTypes, bookingStyle, and policyId. Include these optional fields based on which information you’d like to update.
Update a template’s booking guidelines/v2/event-templates/{templateId}/edit-booking-guidelinesUpdate a template’s booking guidelines such as allowed booking types (e.g., air, hotel, etc.), booking guidelines (e.g., allowed airports, departure and arrival windows, etc), and payment mappings.

URL path requires: templateId generated using the create an event template endpoint.

Request body requires: The event bookingGuidelines, allowedBookingTypes, and paymentMappings.
Update a template’s custom field responses/v2/event-templates/{templateId}/custom-field-responsesUpdate the template’s custom field responses that are presented to a traveler during checkout.

URL path requires: templateId generated using the create an event template endpoint.

Request body requires: The customFieldId, responseItems, and travelerAccess (e.g., READ_ACCESS).