Modify Event

The Modify Event API modifies details of an event.

URL

The HTTP URL for Modify Event API is:

http://<<host>>:<<port>>/api/v1/events/<id>/modify

This service implements Gateway Filter for Authentication to authenticate access of the service by a user.

NOTE: <id>: Refers to an ID that is used to map an event with internal data record.

Method

POST

The payload's request header includes Content-Type as application/json;charset=UTF-8.

Input Parameters

The following fields are input parameters:

Input Parameter Level -Two Level- Three Required Type Description
name     Yes string

Event name

description     Yes string Description conveying the essence of the event
eventType     Optional string Selected event type
  eventPass       An array of eventPass objects. For more details, see
  eventPushes       An array of eventPushes objects including platform specific properties. For more details, see
    platformSpecificProps     An array of platformSpecificProps properties. For more details, see
  eventMails       An array of eventMails objects. For more details, see
  eventSms       An array of eventSms objects. For more details, see
  eventVoiceSms       An array of eventVoiceSms objects. For more details, see
richContent       string Rich text message
channelPriorities     Optional   An array of channel priority objects. The channels are listed in priority order, with the highest priority channel listed first.
  messageChannel   Yes string The message channel type such as push notification, email, or SMS.

Sample Request

{
	"name": "Jet Airways Diwali Fair",
	"description": "Jet Airways Boarding Offers",
	"eventType": "",
	"eventPushes": [{
		"messageName": "PushMessageName",
		"message": "Message Content",
		"richContent": "<h1>Rich Push Content</h1>",
		"appId": "25016-9447884208",
		"platformSpecificProps": {
			"iphone": {
				"badge": "1",
				"sound": "sound.wav",
				"contentAvailable": "",
				"actionLocKey": "",
				"locKey": "",
				"locArgs": {
					"locArg": ""
				},
				"launchImage": "",
				"title": "Message Title",
				"titleLocKey": "",
				"titleLocArgs": {
					"titleLocArg": ""
				},
				"customData": {
					"key": {
						"name": "key Name",
						"content": "Key Value"
					}
				}
			},
			"android": {
				"key": {
					"name": "key name",
					"value": "key value"
				}
			},
                         "web": {
				"key": {
					"name": "key name",
					"value": "key value"
				}
			},
			"blackberry": {
				"header": {
					"name": "key name",
					"value": "key value"
				}
			},
			"windows": {
				"notificationType": "TILE",
				"title": "Title",
				"badge": "1",
				"imagePath": "path of the image"
			}
		}
	}],
	"eventMails": [{
		"mailName": "Email Message Name",
		"mailSubject": "Mail subject",
		"mailContent": "<h1>Mail Content</h1>",
		"contentType": "text/html",
		"senderMailId": "xxx@xxx.com",
		"senderMailName": "Sender Name"
	}],
	"eventSms": [{
		"smsName": "SMS Message Name",
		"smsContent": "SMS Content"
	}],
	"eventVoiceSms": [{
		"smsName": "Voice SMS Name",
		"smsContent": "Voice SMS Content"
	}],
	"eventPass": {
		"passName": "BoardingPass",
		"passType": "BOARDING",
		"passIntegrationConfig": {
			"passIssueNotificationDetails": [{
				"channel": "EMAIL",
				"enabled": true,
				"messageContent": "Pass Email  < a href = '##Email Pass Link##' > click here < /a>",
				"subject": "Boarding Pass Automation",
				"senderName": "",
				"senderEmail": ""
			}]
		},
		"passContent": {
			"basicDetails": {
				"passTypeIdentifier": "pass.com.kms.passbook5",
				"passSerialNumber": "",
				"groupIdentifier": "",
				"appLaunchURL": "",
				"ituneIdentifiers": "",
				"webServiceUrl": "http://icons.com/icons/x.png",
				"timezone": "(GMT) Casablanca",
				"passType": "BOARDING",
				"organizationName": "Jet Airways",
				"description": "Jet Airways Boarding Pass",
				"passSerialNumberType": "AUTO_GEN",
				"eventTicketType": "",
				"customJsonData": {}
			},
			"appearance": {
				"bgColor": "#64798c",
				"labelColor": "#ccdae9",
				"valueColor": "#ffffff",
				"suppressStripShine": false,
				"images": [{
					"url": "http://icons.com/icons/x.png",
					"blob": false,
					"size": 7445,
					"extension": "png",
					"imageType": "FOOTER",
					"imageId": ""
				}, {
					"url": "http://icons.com/icons/x.png",
					"blob": false,
					"size": 7445,
					"extension": "png",
					"imageType": "LOGO",
					"imageId": ""
				}, {
					"url": "http://icons.com/icons/x.png",
					"blob": false,
					"size": 7445,
					"extension": "png",
					"imageType": "ICON",
					"imageId": ""
				}]
			},
			"frontLayout": {
				"logoText": "Logo",
				"headerFields": [{
					"label": "GATE",
					"data": "sample data",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "gate",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}],
				"primaryFields": [{
					"label": "SAN FRANCISCO",
					"data": "xxxxxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "depart",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}],
				"auxiliaryFields": [{
					"label": "DEPART",
					"data": "xxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "boardingTime",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}, {
					"label": "FLIGHT",
					"data": "xxxxxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "xxxxxxxxxxxxxxxxxx",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}, {
					"label": "DESIG",
					"data": "xxxxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "class",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}, {
					"label": "DATE",
					"data": "xxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "date",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}],
				"secondaryFields": [{
					"label": "PASSENGER",
					"data": "xxxxxxxxxxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "passenger",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}],
				"barcodeDetails": {
					"message": "xxxxxxxxxxxxxxx",
					"alternateText": "",
					"barcodeType": "PDF417",
					"embeddedMessageType": "HARDCODED_MESSAGE",
					"alternativeTextType": "DONOT_DISPLAY",
					"embeddedFormat": "UTF_8"
				},
				"transitType": "AIR"
			},
			"backLayout": {
				"fields": [{
					"label": "PASSPORT",
					"data": "xxxxxxxxxxxxxxx",
					"changeMessage": "",
					"displayRelatively": false,
					"ignoreTimezone": false,
					"key": "passport",
					"dataType": "TEXT",
					"numberFormat": "",
					"currency": "",
					"dateTimeFormat": "",
					"alignment": "",
					"autolink": []
				}],
				"enableAutoUpdates": false
			},
			"passRelevance": {
				"relevantDate": "",
				"ignoreTimezone": false,
				"relevantLocations": [],
				"relevantBeacons": [],
				"maxDistance": 10.0
			},
			"passRules": {
				"stopAfter": "",
				"expiryDate": "09/29/2018 06:00:00 AM",
				"voided": false,
				"dateRestriction": "PERMANENTLY_AVAILABLE"
			},
			"languageDetails": {
				"originalFields": [],
				"languageEntries": [],
				"passLanguage": "EN"
			}
		}
			
	}
   
}

Modify Event with Rich Push

{
    "name": "Rich Push Event Message",
    "description": "Event With Rich Push",
    "application": "AppforAll",
    "message": "Rich push message text ##name##",
    "richContent": "Sample rich content",
    "eventType": null,
    "isPush": "true",
    "isEmail": "false",
    "isSms": "false"
}

Modify Event with Channel Priorities

{
	"name": "Modified event with set channel priorities",
	"description": "Sample Event",
	"eventType": "",
	"eventMails": [{
		"mailName": "Email Message Name",
		"mailSubject": "Mail subject",
		"mailContent": "<h1>Mail Content</h1>",
		"contentType": "text/html",
		"senderMailId": "xxx@xxx.com",
		"senderMailName": "Sender Name"
	}],
	"eventSms": [{
		"smsName": "SMS Message Name",
		"smsContent": "SMS Content"
	}],
	"eventVoiceSms": [{
		"smsName": "Voice SMS Name",
		"smsContent": "Voice SMS Content"
	}],
	"channelPriorities": [{
		"messageChannel": "SMS"
	}, {
		"messageChannel": "Email"
	}]
}

Output Parameters

The following fields are output parameters:

Output Parameter Type Description
id long Unique ID assigned to an event
message string Response status message

Sample Response

{
"message" : "Details updated successfully",
"id" : "eventId"
}

Response Status

Code Description
Status 200 Details updated successfully
Status 400 Invalid Request Format/Duplicate Details Provided
Email Name is required
Email subject is required
Email content is required
SMS Name is required
SMS Content is required
Event message name is required. SMScontent is required
Pass name is empty
Invalid Request Payload. Error occurred at property eventPass->passIntegrationConfig->passIssueNotificationDetails->null at index 0->channel
Enable at least one pass issue notification channel
Email notification content is required
Email notification subject is required
Pass timezone is required
Organization name is required
Pass description is required
Background color is required
Label text color is required
Value Text Color is required
Image type is required
Pass date restriction is required
Field Label for field passport is empty. Field data for field passport is empty
Field name is empty
Embedded message type is required. Alternative text type is required
Event message name is required
Status 401 Unauthorized request
Status 500 Server Failure to process request