Game App Events APIs
POSTCheck Live Application Events Exists
- Description
- Checks whether live application events exist.
- If live application events exist it should return true.
- If not, it should return false.
- Request Endpoint
- POST https://<Example api server address>/application/live/events
- Parameters
- None.
- cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"applicationIds\" : [\"d5d2a034-dcac-4484-bcc1-9bd5f5d73ab5\"] }" \ 'https://core.dev.Example.net/api/application/live/events'- POST body attributes (JSON)
Attribute Type Use Description applicationIdsString Optional List of application Ids. - POST body
Headers: Content-Type: application/json{ "applicationIds": [ "d5d2a034-dcac-4484-bcc1-9bd5f5d73ab5" ] }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": true, "detail": null, "error": false, "message": "Fetching live events of an applications successful" }
POSTCreate Application Event
- Description (Only for Admin)
- "promotionOrder" : 1, "promotedStartTime" : "2016-05-02T13:30:00.000Z", "promotedEndTime" : "2016-05-30T09:01:00.000Z"
The above inputs are optional and only required if "isPromoted" is true. If "isPromoted" is false the "promotionOrder" will be 9999. If "isPromoted" is false and "promotionOrder" is not passed, by default order 1000 will be considered. More than one event may have same order, in that case the order of these events may appear in any order among themselves.- "startTime" : "2016-05-02T13:30:00.000Z”, "endTime" : "2016-05-30T09:01:00.000Z", "physicalTimeZone" : "Asia/Kolkata", "physicalCountryCode" : "IN"
The above inputs will be considered as Admin input. Admin can enter any time and timezones (irrespective of the event timezone). The date will be converted to UTC. But for each { "countryCode" : "HK", "timeZone": "Asia/Hong_Kong" } The physical date time will be converted to respective timezone and store in DB, hence, these will point to the event release timezones.- "promotedStartTime" : "2016-05-02T13:30:00.000Z", "promotedEndTime" : "2016-05-30T09:01:00.000Z"
The above inputs will define the start and end time for the promotion of the event.- Request Endpoint
- POST https://<Example api server address>/application/{id}/event/create
- Parameters
Parameter Type Use Description id String Required UUID of the game app. - cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"bannerImagePath\" : \"http://path/...\", \"title\" : \"title12\", \"description\" : \"desc1-updated\", \"startTime\" : \"2016-05-02T13:30:00.000Z\", \"endTime\" : \"2016-05-30T09:01:00.000Z\", \"eventFeed\" : [\"feed1\", \"feed2\"], \"deepLink\" : \"deeplink1\", \"physicalTimeZone\" : \"Asia/Kolkata\", \"physicalCountryCode\" : \"IN\", \"eventRelease\" : [ { \"countryCode\" : \"HK\", \"timeZone\": \"Asia/Hong_Kong\" }, { \"countryCode\" : \"GB\", \"timeZone\": \"Europe/London\" }, { \"countryCode\" : \"LK\", \"timeZone\": \"Asia/Colombo\" } ], \"isPromoted\" : true, \"promotionOrder\" : 1, \"promotedStartTime\" : \"2016-05-02T13:30:00.000Z\", \"promotedEndTime\" : \"2016-05-30T09:01:00.000Z\" }" \ 'https://core.dev.Example.net/api/application/id/event/create '- POST body attributes (JSON)
Attribute Type Use Description titleString Required The application event title. startTimeString Required Format "2016-05-02T13:30:00.000Z". endTimeString Required Format "2016-05-02T13:30:00.000Z". physicalTimeZoneString Required The physical time zone. physicalCountryCodeString Required The physical country code. eventReleaseArray Optional An array of child attributes - "countryCode" and "timeZone". timeZoneString Required The time zone. isPromotedBoolean Required Sets if promoted or not promoted. promotedStartTimeString Conditional Required if "isPromoted" is true. promotedEndTimeString Conditional Required if "isPromoted" is true. - POST body
Headers: Content-Type: application/json{ "bannerImagePath": "https://path/...", "title": "title12", "description": "desc1-updated", "startTime": "2016-05-02T13:30:00.000Z", "endTime": "2016-05-30T09:01:00.000Z", "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "eventRelease": [ { "countryCode": "HK", "timeZone": "Asia/Hong_Kong" }, { "countryCode": "GB", "timeZone": "Europe/London" }, { "countryCode": "LK", "timeZone": "Asia/Colombo" } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": "2016-05-02T13:30:00.000Z", "promotedEndTime": "2016-05-30T09:01:00.000Z" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "a50ea349-37b9-4e9d-b8e3-5554e8684a18", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "https://path/...", "title": "title12", "description": "desc1-updated", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "startTime": 1462176000000, "endTime": 1464579060000, "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "eventRelease": [ { "countryCode": "HK", "timeZone": "Asia/Hong_Kong", "startTime": 1462147200000, "endTime": 1464550260000 }, { "countryCode": "GB", "timeZone": "Europe/London", "startTime": 1462172400000, "endTime": 1464575460000 }, { "countryCode": "LK", "timeZone": "Asia/Colombo", "startTime": 1462156200000, "endTime": 1464559260000 } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": 1462176000000, "promotedEndTime": 1464579060000 }, "detail": null, "error": false, "message": "Application Event is created successfully." }
DELETEDelete Application Event
- Description
- Delete Application Event by application event id.
- Request Endpoint
- DELETE https://<Example api server address>/application/{id}/event/delete
- Parameters
Parameter Type Use Description id String Required UUID of the game app. - cURL syntax
curl --include \ --request DELETE \ 'https://core.dev.Example.net/api/application/id/event/delete'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": true, "detail": null, "error": false, "message": "Application event is deleted successfully." }
POSTFetch Events
- Description
- Input "countryCode" is required.
- A user can pass either categoryId or applicationId, but both are optional.
- If categoryId is passed, all the events for all applications related to the category will be fetched (Condition).
- If applicationId is passed, only the event(s) related to the respective application will be fetched.
- If both categoryId and applicationId are passed, applicationId will only be considered.
- Condition : By default the promoted events will be loaded first in the list.
- Promoted events will be ordered by the order id present.
- Request Endpoint
- POST https://<Example api server address>/application/events
- Parameters
- None.
- cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"countryCode\": \"GB\", \"categoryId\" : \"e3dac175-e08c-4ee2-b2e7-777c2c73a4e8\", \"applicationId\" : \"6197ec00-c13c-4f84-8b4c-3225aa5d5b75\" }" \ 'https://core.dev.Example.net/api/application/events'- POST body attributes (JSON)
Attribute Type Use Description countryCodeString Required The country code. categoryIdString Conditional Either "categoryId" or "applicationId" is required. applicationIdString Conditional Either "categoryId" or "applicationId" is required. - POST body
Headers: Content-Type: application/json{ "countryCode": "GB", "categoryId": "e3dac175-e08c-4ee2-b2e7-777c2c73a4e8", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": [ { "id": "f6cf36fb-79ab-4f9e-abfc-aa70c0b36da0", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "path Asia/Kolkata", "title": null, "description": "desc1", "startTime": 1495699800000, "endTime": 1496374260000, "eventFeed": null, "deepLink": "deeplink1", "timeZone": "Asia/Kolkata" }, { "id": "a3992ada-410f-4838-9e0a-eb8206a1f888", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "path Asia/Kolkata", "title": null, "description": "desc1", "startTime": 1464163800000, "endTime": 1464838260000, "eventFeed": null, "deepLink": "deeplink1", "timeZone": "Asia/Kolkata" } ], "detail": null, "error": false, "message": "Application Events are fetched successfully." }
GETFetch Events for Game App
- Description Only for Admin
- There will be no ordering in this GET service. All the events will be fetched irrespective to live/dead events.
- Request Endpoint
- GET https://<Example api server address>/application/{id}/events
- Parameters
Parameter Type Use Description id String Required UUID of the game app. - cURL syntax
curl --include \ 'https://core.dev.Example.net/api/application/id/events'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": [ { "id": "d7fb3566-c2d3-4173-b888-e940169dfdac", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "https://path/...", "title": "title3", "description": "desc1-updated", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "startTime": 1462176000000, "endTime": 1464579060000, "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "eventRelease": [ { "countryCode": "HK", "timeZone": null, "startTime": 1462147200000, "endTime": 1464550260000 }, { "countryCode": "GB", "timeZone": null, "startTime": 1462172400000, "endTime": 1464575460000 }, { "countryCode": "LK", "timeZone": null, "startTime": 1462156200000, "endTime": 1464559260000 } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": 1462089600000, "promotedEndTime": 1462851060000 }, { "id": "6d6255b7-ab75-498d-b4e7-69719132c460", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "https://path/...", "title": "title5", "description": "desc1-updated", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "startTime": 1462176000000, "endTime": 1464579060000, "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "eventRelease": [ { "countryCode": "HK", "timeZone": null, "startTime": 1462147200000, "endTime": 1464550260000 }, { "countryCode": "GB", "timeZone": null, "startTime": 1462172400000, "endTime": 1464575460000 }, { "countryCode": "LK", "timeZone": null, "startTime": 1462156200000, "endTime": 1464559260000 } ], "isPromoted": true, "promotionOrder": 4, "promotedStartTime": 1462089600000, "promotedEndTime": 1462851060000 } ], "detail": null, "error": false, "message": "Application Events are fetched successfully." }
POSTUpdate Application Event
- Description
- Only for Admin.
- Request Endpoint
- POST https://<Example api server address>/application/{id}/event/update
- Parameters
Parameter Type Use Description id String Required UUID of the game app. - cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"eventId\": \"d7fb3566-c2d3-4173-b888-e940169dfdac\", \"bannerImagePath\" : \"http://path/...\", \"title\" : \"title12-1\", \"description\" : \"desc1-updated\", \"startTime\" : \"2016-05-02T13:30:00.000Z\", \"endTime\" : \"2016-05-30T09:01:00.000Z\", \"eventFeed\" : [\"feed1\", \"feed2\"], \"deepLink\" : \"deeplink1\", \"physicalTimeZone\" : \"Asia/Kolkata\", \"physicalCountryCode\" : \"IN\", \"eventRelease\" : [ { \"countryCode\" : \"HK\", \"timeZone\": \"Asia/Hong_Kong\" }, { \"countryCode\" : \"GB\", \"timeZone\": \"Europe/London\" }, { \"countryCode\" : \"LK\", \"timeZone\": \"Asia/Colombo\" } ], \"isPromoted\" : true, \"promotionOrder\" : 1, \"promotedStartTime\" : \"2016-05-02T13:30:00.000Z\", \"promotedEndTime\" : \"2016-05-30T09:01:00.000Z\" }" \ 'https://core.dev.Example.net/api/application/id/event/update'- POST body attributes (JSON)
Attribute Type Use Description eventIdString Required The application event id. titleString Required The application event title. startTimeString Required Format "2016-05-02T13:30:00.000Z". endTimeString Required Format "2016-05-02T13:30:00.000Z". physicalTimeZoneString Required The time zone. physicalCountryCodeString Required The country code. eventReleaseArray Required Array of countryCode and timeZone attributes. timeZoneString Required The time zone. isPromotedBoolean Required Sets if promoted or not promoted. promotedStartTimeString Conditional Required if "isPromoted" is true. promotedEndTimeString Conditional Required if "isPromoted" is true. - POST body
Headers: Content-Type: application/json{ "eventId": "d7fb3566-c2d3-4173-b888-e940169dfdac", "bannerImagePath": "https://path/...", "title": "title12-1", "description": "desc1-updated", "startTime": "2016-05-02T13:30:00.000Z", "endTime": "2016-05-30T09:01:00.000Z", "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "eventRelease": [ { "countryCode": "HK", "timeZone": "Asia/Hong_Kong" }, { "countryCode": "GB", "timeZone": "Europe/London" }, { "countryCode": "LK", "timeZone": "Asia/Colombo" } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": "2016-05-02T13:30:00.000Z", "promotedEndTime": "2016-05-30T09:01:00.000Z" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "a50ea349-37b9-4e9d-b8e3-5554e8684a18", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "https://path/...", "title": "title12-1", "description": "desc1-updated", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "startTime": 1462176000000, "endTime": 1464579060000, "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "eventRelease": [ { "countryCode": "HK", "timeZone": "Asia/Hong_Kong", "startTime": 1462147200000, "endTime": 1464550260000 }, { "countryCode": "GB", "timeZone": "Europe/London", "startTime": 1462172400000, "endTime": 1464575460000 }, { "countryCode": "LK", "timeZone": "Asia/Colombo", "startTime": 1462156200000, "endTime": 1464559260000 } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": 1462176000000, "promotedEndTime": 1464579060000 }, "detail": null, "error": false, "message": "Application Event is created successfully." }
PATCHUpdate Partial Application Event
- Description
- If the field is not passed, it will be considered as
null.- If the particular field is passed as
null, it, or its dependent fields will not be updated.- If
EventReleaseis passed asnull, existing event releases will not be modified, otherwise have to pass all required event release.- If
Promotedis sent asnull, it or its related fields will not be modified, otherwise have to pass all required event release.- Request Endpoint
- PATCH https://<Example api server address>/application/{id}/event/partial/update
- Parameters
Parameter Type Use Description id String Required UUID of the game app. - cURL syntax
curl --include \ --request PATCH \ --header "Content-Type: application/json" \ --data-binary "{ \"eventId\" : \"3295c2f8-b3cd-464f-9cea-23ddad36f369\", \"bannerImagePath\" : null, \"title\" : null, \"description\" : null, \"startTime\" : null, \"endTime\" : null, \"eventFeed\" : null, \"deepLink\" : null, \"physicalTimeZone\" : null, \"physicalCountryCode\" : null, \"eventRelease\" : null, \"isPromoted\" : null }" \ 'https://core.dev.Example.net/api/application/id/event/partial/update'- POST body attributes (JSON)
Attribute Type Use Description eventIdString Required The application event id. bannerImagePathString Optional If passed as null, the existing one will not be updated. titleString Required The application event title.
If passed as null, the existing one will not be updated.startTimeString Required Format "2016-05-02T13:30:00.000Z".
If passed as null, the existing one will not be updated.endTimeString Required Format "2016-05-02T13:30:00.000Z".
If passed as null, the existing one will not be updated.physicalTimeZoneString Required The time zone.
If passed as null, the existing one will not be updated.physicalCountryCodeString Required The country code.
If passed as null, the existing one will not be updated.eventReleaseArray Required Array of countryCode and timeZone attributes.
If passed as null, the existing one will not be updated.
Otherwise have to pass all required releases.isPromotedBoolean Required Sets if promoted or not promoted.
If passed as null, the existing one will not be updated.
Otherwise have to pass all required releases.promotedStartTimeString Conditional Required if "isPromoted" is true. promotedEndTimeString Conditional Required if "isPromoted" is true. - PATCH body
Headers: Content-Type: application/json{ "eventId": "3295c2f8-b3cd-464f-9cea-23ddad36f369", "bannerImagePath": null, "title": null, "description": null, "startTime": null, "endTime": null, "eventFeed": null, "deepLink": null, "physicalTimeZone": null, "physicalCountryCode": null, "eventRelease": null, "isPromoted": null }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "3295c2f8-b3cd-464f-9cea-23ddad36f369", "updatedBy": "", "applicationId": "6197ec00-c13c-4f84-8b4c-3225aa5d5b75", "bannerImagePath": "https://s3-us-west-2.amazonaws.com/btc.dev.apdx.www/img.png", "title": "title12", "description": "desc1-updated", "physicalTimeZone": "Asia/Kolkata", "physicalCountryCode": "IN", "startTime": 1462176000000, "endTime": 1464579060000, "eventFeed": [ "feed1", "feed2" ], "deepLink": "deeplink1", "eventRelease": [ { "countryCode": "HK", "timeZone": "Asia/Hong_Kong", "startTime": 1462147200000, "endTime": 1464550260000 }, { "countryCode": "GB", "timeZone": "Europe/London", "startTime": 1462172400000, "endTime": 1464575460000 }, { "countryCode": "LK", "timeZone": "Asia/Colombo", "startTime": 1462156200000, "endTime": 1464559260000 } ], "isPromoted": true, "promotionOrder": 1, "promotedStartTime": 1462176000000, "promotedEndTime": 1464579060000 }, "detail": null, "error": false, "message": "Application Event is updated successfully." }