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

Bulk delete draft events

Request

API to bulk delete draft events.

Bodyapplication/jsonrequired
deleteEventListArray of objects(DeleteEventRequest)[ 1 .. 100 ] itemsrequired

List of events to be deleted.

deleteEventList[].​idstringrequired

Unique identifier for the event.

Example: "56789012"
deleteEventList[].​typestring(EventType)

Type of an event

Enum"GENERIC""PROGRAM""PROGRAM_SESSION""PROGRAM_TRIP"
curl -i -X POST \
  https://apis.spotnana.com/v2/events/bulk-delete \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "deleteEventList": [
      {
        "id": "56789012",
        "type": "GENERIC"
      }
    ]
  }'

Responses

Bulk delete response with event statuses

Bodyapplication/json
deleteEventResponsesArray of objects(DeleteEventResponse)required

List of events delete response.

deleteEventResponses[].​idstringrequired

Unique identifier for the event.

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

Generic operation/execution status.

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

Details about success or failure reason.

Example: "Deleted successfully"
Response
application/json
{ "deleteEventResponses": [ {} ] }

Bulk cancel events

Request

API to bulk cancel events.

Bodyapplication/jsonrequired
cancelAsyncboolean

Flag to indicate if the cancellation should be processed asynchronously.

Default false
Example: false
cancelEventRequestsArray of objects(CancelEventRequest)[ 1 .. 100 ] itemsrequired

List of events to be cancelled.

cancelEventRequests[].​eventIdstringrequired

Unique identifier for the event.

Example: "56789012"
cancelEventRequests[].​typestring(EventType)required

Type of an event

Enum"GENERIC""PROGRAM""PROGRAM_SESSION""PROGRAM_TRIP"
curl -i -X POST \
  https://apis.spotnana.com/v2/events/bulk-cancel \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "cancelAsync": false,
    "cancelEventRequests": [
      {
        "eventId": "56789012",
        "type": "GENERIC"
      }
    ]
  }'

Responses

Bulk cancel response with event statuses

Bodyapplication/json
cancelEventResponsesArray of objects(CancelEventResponse)required

List of events cancellation response.

cancelEventResponses[].​eventIdstringrequired

Unique identifier for the event.

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

Generic operation/execution status.

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

Details about success or failure reason.

Example: "Cancelled successfully"
Response
application/json
{ "cancelEventResponses": [ {} ] }

Get current details of an async event job.

Request

Get current details of an async event job

Bodyapplication/jsonrequired
companyIdstringrequired

Company Id for which job was created.

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

Filter to fetch the job details.

curl -i -X POST \
  https://apis.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"
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" } }