Creating an SPD event without a template involves the following 2 steps:
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.
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/hidden | Check 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 template | POST /v2/event-templates/hidden | Turn 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. |
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:
- the company (i.e.,
COMPANYscope) - the hidden template’s ID (i.e.,
TRIP_TEMPLATEscope). This ID exists only after the option is turned on. Use thetemplateIdreturned in step 2 of allowing events to be created without a template.
| Step | Name | Endpoint | Details |
|---|---|---|---|
| Get hidden template status (Optional) | GET /v2/event-templates/hidden | Confirm 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 event | POST /v2/events | Create 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) |
| Set the payment settings for the event.
Include | |
| Create a child event | POST /v2/events | Create 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 events | POST /v2/events/bulk-publish | Publish 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:
useHiddenTemplateis supported only whentypeis set toPROGRAM_SESSION.- When
useHiddenTemplateis set tofalse(the default), aPROGRAM_SESSIONrequest must contain the template's ID inparentEventId, 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.