Skip to content
Last updated

Creating a specialty desk event without a template

Creating an SPD event without a template involves the following 2 steps:

  1. Allowing events to be created without a template
  2. Creating an SPD event without a template

Note: Be sure to read types of specialty desk events to familiarize yourself with SPD events, parent events, and child events. See events without a template to learn how these events work.

Allowing events to be created without a template

The steps below explain how to check whether the option is enabled for a company, and how to turn it on or off.

Note: The action listed in step 2 below can only be performed by administrators with the COMPANY_MANAGEMENT (write access) permission. You can also assign the Company Settings Administrator role to the user who wishes to perform this action.

Step Name Endpoint Details
Get hidden template status (Optional)GET /v2/event-templates/hiddenCheck whether the option is enabled for a company.

Query parameter requires: companyId.

Response will contain: enabled and templateId. The enabled field is set to true when the option is turned on. It is set to false when the option has never been turned on or has been turned off.

The templateId field contains the hidden template’s ID and is returned only when enabled is set to true. You don’t need this ID in the requests that create events. You need it only if you want to limit an event coordinator’s permission to this template.
Turning on the hidden templatePOST /v2/event-templates/hiddenTurn the option on or off for a company.

Request body requires: companyId > id and enabled.

When enabled is set to true for the first time, the Spotnana platform creates the hidden template for the company. If enabled is later set to false, this hidden template is archived and reused if the administrator re-enables the option.

Response will contain: templateId (the hidden template's ID) when enabled is set to true.

Creating an SPD event without a template

The steps below explain how to create an SPD event without a template, create a child event for each traveler, and publish the events.

Note: Creating an SPD event without a template (including its child events), requires the EVENT_MANAGEMENT permission with the CREATE action. The Event Management Administrator role includes this permission. The permission must be scoped to either of the following:

Step Name Endpoint Details
Get hidden template status (Optional)GET /v2/event-templates/hiddenConfirm that the option is turned on for the company before you create the event.

Query parameter requires: companyId.

Response will contain: enabled set to true.

If it’s false, a company administrator must turn it on as explained in allowing events to be created without a template.
Create a parent eventPOST /v2/eventsCreate the parent SPD event without a template.

You can also set bookingGuidelines (e.g., allowed airports and arrival and departure windows) and allowedBookingTypes (AIR, HOTEL, CAR, or RAIL) in this request.

To set a travel policy for the event, include policyId with the ID of the policy you want to apply. To find a policy ID, use the list policies API. When policyId is omitted, each traveler's default policy applies.

Request body requires: name, location, type, and useHiddenTemplate.

Set type to PROGRAM_SESSION and useHiddenTemplate to true. Don't include parentEventId. A request that contains both useHiddenTemplate set to true and parentEventId will fail.

Since there’s no template to copy the event settings (e.g., event start date, end date, event description) from, an event coordinator must update that information in this API request.

Note: A parent event can't contain travelers. You add travelers to child events in step 4.

Response will contain: The parent event's id.

Other APIs will use: id.

Steps 3 to 5 refer to it as eventId and use it to update the parent event, link child events to it, and publish the events.

Update event booking guidelines (Optional)

POST /v2/events/{eventId}/edit-booking-guidelines

Set the payment settings for the event.

URL path requires: eventId from step 2.

Request body requires: bookingGuidelines and eventType set to PROGRAM_SESSION. You can also include allowedBookingTypes.

In step 2, if you’ve set the bookingGuidelines and allowedBookingTypes, then pass the same values when using this API.

If you want to control which payment methods travelers can use, include allowedPaymentConfig and, if needed, paymentMappings. Both fields are optional. When both are omitted, the event doesn't restrict which payment methods travelers can use. The allowedPaymentConfig must contain a paymentConfig for each of the four travel types (AIR, HOTEL, CAR, and RAIL). The paymentConfig field accepts the following values:

  • TRAVELER_DEFAULT: the traveler's default payment methods
  • TRAVELER_DEFAULT_CENTRAL: only the centralized payment methods provided by the company or the TMC
  • PERSONAL: only the traveler's personal payment methods
  • SELECTED_METHODS: only the payment methods listed in paymentMappings

Include paymentMappings only for travel types set to SELECTED_METHODS. To find the payment source IDs to use in paymentMappings, use the get allowed payment sources API.

Response will contain: The parent event’s id.

Create a child eventPOST /v2/eventsCreate a child event for a traveler. Each child event contains exactly one traveler. For example, if 10 travelers are attending, create 10 child events (one for each traveler).

Request body requires: name, location, type set to PROGRAM_TRIP, parentEventId set to the eventId from step 2, and travellers containing the traveler's userId. To copy the parent event's details into the child event, retrieve them using the get event API.

Note: The traveler must belong to the same company as the event, and their persona must match the travelerTypes set for the parent event. If the traveler doesn't meet both conditions, the request fails.

Response will contain: The child event’s id.
Bulk publish eventsPOST /v2/events/bulk-publishPublish all the child events of the parent event using a single API call.

Request body requires: publishEventList. Its entry must contain the id of the parent event from step 2, type set to PROGRAM_SESSION, and sendInvite. When sendInvite is set to true, travelers receive an event invite. When it is set to false, no invites are sent.

This API publishes the events asynchronously. To check the progress, use the bulk processing job status workflow.

Note: Publishing the events creates a trip for each traveler.

Important notes:

  • useHiddenTemplate is supported only when type is set to PROGRAM_SESSION.
  • When useHiddenTemplate is set to false (the default), a PROGRAM_SESSION request must contain the template's ID in parentEventId, and the event is created from that template. See creating a specialty desk event.
  • To bulk edit or bulk cancel these events, follow steps 6 and 7 of creating a specialty desk event.