Event API (v2)

Download OpenAPI description
Languages
Servers
Staging URL
https://apis.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/eventapi/

Events

APIs to create and manage events.

Operations

Update event custom field responses

Request

Update the response to a custom field question.

Path
eventIdstringrequired

Event ID

Example: 6926658168
Bodyapplication/json
customFieldV3ResponsesArray of objects(CustomFieldPrefilledResponse)

List of custom field responses for an event.

eventCustomFieldResponsesArray of objects(CustomFieldResponse)Deprecated

List of custom field responses for an event.

curl -i -X PUT \
  https://apis.spotnana.com/v2/events/6926658168/custom-field-responses \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "eventCustomFieldResponses": [
      {
        "customFieldId": "f49d00fe-1eda-4304-ba79-a980f565281d",
        "responseItems": [
          {
            "response": "Leisure travel",
            "additionalInput": "20"
          }
        ],
        "travelerAccess": "HIDDEN"
      }
    ],
    "customFieldV3Responses": [
      {
        "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
        "fieldName": "string",
        "armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
        "readOnly": true,
        "hidden": true,
        "selectedOptions": [
          {
            "name": "string",
            "description": "string",
            "additionalUserInput": "string",
            "additionalInfos": [
              "string"
            ],
            "additionalInfoConfigs": [
              {
                "type": "VARIABLE",
                "name": "PUBLISHED_FARE"
              }
            ]
          }
        ]
      }
    ]
  }'

Responses

OK

Response
No content

Bulk publish events

Request

API to bulk publish events and has a support for sending invite to selective users

Bodyapplication/jsonrequired
publishEventListArray of objects(PublishEventRequest)[ 1 .. 100 ] itemsrequired

List of events to be published.

publishEventList[].​idstringrequired

Unique identifier for the event.

Example: "56789012"
publishEventList[].​sendInvitebooleanrequired

Flag to indicate if an invite should be sent.

Example: true
publishEventList[].​userIdsArray of objects(UserId)[ 0 .. 1000 ] items

List of users receiving the invite. - If provided, invites will be sent only to the specified users. - If empty or not provided, invites will be sent to all users.

publishEventList[].​typestring(EventType)

Type of an event

Enum"GENERIC""PROGRAM""PROGRAM_SESSION""PROGRAM_TRIP"
curl -i -X POST \
  https://apis.spotnana.com/v2/events/bulk-publish \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "publishEventList": [
      {
        "id": "56789012",
        "sendInvite": true,
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ],
        "type": "GENERIC"
      }
    ]
  }'

Responses

Bulk publish response with event statuses

Bodyapplication/json
publishEventResponsesArray of objects(PublishEventResponse)required

List of events publish response.

publishEventResponses[].​idstringrequired

Unique identifier for the event.

Example: "56789012"
publishEventResponses[].​statusstring(OperationStatus)required

Generic operation/execution status.

Enum"SUCCESS""FAILED""PARTIAL_SUCCESS"
publishEventResponses[].​messagestring

Details about success or failure reason.

Example: "Published successfully"
Response
application/json
{ "publishEventResponses": [ {} ] }

Bulk edit/modify events.

Request

Edit the basic info and booking guidelines in bulk for events.

Bodyapplication/json
eventsToUpdateArray of objects(UpdateEventRequestItem)[ 1 .. 100 ] items

A list of events with the required updates

updateAsyncboolean

Whether to update the events asynchronously or not.

Default false
Example: true
curl -i -X POST \
  https://apis.spotnana.com/v2/events/bulk-edit \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "eventsToUpdate": [
      {
        "eventId": "56789012",
        "eventBasicInfo": {
          "name": "string",
          "type": "GENERIC",
          "description": "string",
          "documents": [
            {
              "url": "https://s3.amazonaws.com/bucket-name/folder-name/file-name",
              "documentId": "f49d00fe-1eda-4304-ba79-a980f565281d",
              "documentMetadata": {
                "documentType": "VISA",
                "entityType": "PNR",
                "entityId": "123124",
                "entityMetadata": {
                  "invoiceMetadata": {}
                },
                "name": "BoardingPass.pdf"
              }
            }
          ],
          "startDateTime": {
            "iso8601": "2017-07-21T17:32"
          },
          "endDateTime": {
            "iso8601": "2017-07-21T17:32"
          },
          "location": {
            "address": {
              "addressLines": [
                "Golden Gate Bridge"
              ],
              "administrativeArea": "CA",
              "administrativeAreaName": "California",
              "description": "San Francisco Home",
              "isDefault": true,
              "languageCode": "en",
              "locality": "San Francisco",
              "locationCode": "LAX",
              "organization": "Spotnana",
              "postalCode": "94130",
              "continentCode": "AF",
              "recipients": [
                "string"
              ],
              "regionCode": "US",
              "regionName": "America",
              "revision": 1,
              "sortingCode": "Jamaica",
              "sublocality": "string",
              "timezone": "America/Los_Angeles",
              "coordinates": {
                "latitude": 77.1025,
                "longitude": 28.7041
              }
            },
            "coordinates": {
              "latitude": 77.1025,
              "longitude": 28.7041
            }
          },
          "contacts": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          ],
          "referenceUsers": [
            {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          ],
          "travelerTypes": [
            "EMPLOYEE"
          ],
          "bookingStyle": "SELF_SERVE",
          "policyId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b",
          "allowTravelersPolicy": "ALLOWED",
          "emailPreferences": {
            "bucketTypes": [
              "BOOKING_CONFIRMATIONS"
            ],
            "isEnabled": false,
            "toEmails": [
              "example@email.com"
            ],
            "ccEmails": [
              "example@email.com"
            ],
            "bccEmails": [
              "example@email.com"
            ]
          },
          "allowTravelersToRsvp": "ALLOWED",
          "internalNotes": "Use travelers default as payment method.",
          "tripOverrides": {
            "legalEntity": {
              "behavior": "OVERRIDE_ALLOWED",
              "legalEntityRef": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                "name": "string"
              }
            },
            "costCenter": {
              "behavior": "OVERRIDE_ALLOWED",
              "costCenterRef": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                "name": "string"
              }
            },
            "department": {
              "behavior": "OVERRIDE_ALLOWED",
              "departmentRef": {
                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                "name": "string"
              }
            },
            "userAttributes": [
              {
                "behavior": "OVERRIDE_ALLOWED",
                "attribute": {}
              }
            ]
          }
        },
        "eventBookingGuidelines": {
          "bookingGuidelines": [
            {
              "numGuestsAllowed": 1,
              "airBookingGuideLine": {
                "allowedAirports": [
                  null
                ],
                "arrivalBookingWindow": {},
                "departureBookingWindow": {},
                "allowedFlightGuidelines": [
                  null
                ]
              }
            }
          ],
          "allowedBookingTypes": [
            "AIR"
          ],
          "allowedPaymentConfig": [
            {
              "travelType": "AIR",
              "paymentConfig": "TRAVELER_DEFAULT"
            }
          ],
          "paymentMappings": [
            {
              "id": "f49d00fe-1eda-4304-ba79-a980f565281d",
              "accessTypeAttributes": {
                "travelTypeFilter": {
                  "travelTypes": []
                }
              }
            }
          ],
          "eventType": "GENERIC"
        }
      }
    ],
    "updateAsync": true
  }'

Responses

OK

Bodyapplication/json
updateEventsResponseArray of objects(UpdateEventResponse)required

List of events update response.

updateEventsResponse[].​idstringrequired

Unique identifier for the event.

Example: "56789012"
updateEventsResponse[].​statusstring(OperationStatus)required

Generic operation/execution status.

Enum"SUCCESS""FAILED""PARTIAL_SUCCESS"
updateEventsResponse[].​messagestring

Details about success or failure reason.

Example: "Updated successfully"
Response
application/json
{ "updateEventsResponse": [ {} ] }