Skip to content

Event API (v2)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com
Spotnana mock server
https://developer-docs.redocly.app/docs/_mock/openapi/eventapi

Events

APIs to create and manage events.

Operations

Register for event

Request

Register a traveler for a PROGRAM_SESSION event. If userId is omitted, the logged-in user is registered. Creates a PROGRAM_TRIP child event under the session and publishes it, triggering async trip creation. Requires enableRegisterLink to be true on the session event. Returns the new PROGRAM_TRIP event ID.

Security
Bearer
Path
eventIdstringrequired

Event ID of the PROGRAM_SESSION event to register for.

Example: 6926658168
Bodyapplication/json
userIdstring

User ID of the traveler to register. When omitted, the logged-in user is registered (self-registration).

Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/events/6926658168/register \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Responses

OK

Bodyapplication/json
eventIdstringrequired

ID of the newly created PROGRAM_TRIP event.

Example: "56789012"
tripIdstring

ID of the trip, if already created. Present when the user was already registered.

Example: "12345678"
Response
application/json
{ "eventId": "56789012", "tripId": "12345678" }

Get current details of an async event job.

Request

Get current details of an async event job

Security
Bearer
Bodyapplication/jsonrequired
companyIdstringrequired

Company Id for which job was created.

Example: "c5977a9b-095a-40be-a1bb-b9d3c894e4a5"
filtersJobIdFilter (object) or ReferenceIdFilter (object)(AsyncJobFilter)
One of:

Filter to fetch the job details.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/events/jobs/status \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "companyId": "c5977a9b-095a-40be-a1bb-b9d3c894e4a5",
    "filters": {
      "filterType": "string",
      "jobId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b"
    }
  }'

Responses

Async job details.

Bodyapplication/json
jobIdstring(uuid)

Job Id for the async event job.

Example: "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b"
referenceIdstring

Reference Id associated with the job.

Example: "8859676988"
typestring(EventJobType)

Job type.

Enum"PUBLISH""MODIFY""CANCEL""SEND_INVITE"
statusstring(EventJobStatus)

Job status.

Enum"IN PROGRESS""COMPLETED"
totalItemsinteger

Total number of items which are being processed by the job.

Example: 42
successCountinteger

Success item count.

Example: 41
failureCountinteger

Failure item count.

Example: 1
jobItemsArray of objects(JobItem)

Failed item array.

createdAtobject(DateTimeOffset)

Created date time for an job.

completedAtobject(DateTimeOffset)

Updated date time for an job.

Response
application/json
{ "jobId": "f7b3b3b3-7b3b-4b3b-8b3b-3b3b3b3b3b3b", "referenceId": "8859676988", "type": "PUBLISH", "status": "COMPLETED", "totalItems": 42, "successCount": 41, "failureCount": 1, "jobItems": [ { … } ], "createdAt": { "iso8601": "2017-07-21T17:32Z" }, "completedAt": { "iso8601": "2017-07-21T17:32Z" } }