Prerequisites

To sync with the API for registering campaign, make sure to issue an authorization token (API KEY). If you already have the key, request the additional permissions. Refer to HIVE Server API > Notification > Push v4 > Authentication to check how to request and issue the authorization token.

API for Registering Campaign

Basic Data and Request Variables

Method POST
URL /push/campaigns
Division Field Name Description Type Required
Header Content-Type application/json;charset=utf-8
Authorization bearer {{API KEY}}
Body id Essential field for editing campaign Integer
status Essential field for editing campaign Integer
company Company
   ●   gamevil: Com2uS Holdings
   ●   com2us: Com2uS
   ●   gcp: Com2uS Platform
String O
companyIndex Company code (the company number registered on AppCenter) Integer O
description Description of a campaign String O
notice Whether to send notice or not Boolean X
type Sending type
   ●   B: Bulk push
   ●   T: Targeting push
String O
targetingId Targeting ID
Essential field in case of targeting campaign
Integer
registrant name Registrant name String X
id Registrant id String O
reservation localizing Whether to consider local time
(Sending at once/Sending individual)
Boolean O
startDate The period of constant sending
(YYYY-MM-DD)
String O
endDate String O
time The time of sending push (HH:mm) String O
repeat Whether to send pushes constantly or not Boolean O
weekday The day of constant sending other than weekend Integer[] X
skip The date to skip sending pushes in the period of constant sending String[] X
distribution enable Whether to send distributed or not Boolean X
interval The interval of distributed sending Integer X
count The count of distributed sending Integer X
continents The information list by selected continent (Refer to the country code)
Check the CampaignContinent structure and example below
CampaignContinent[] O
countries The information of selected country (Refer to the country code) String[] O
game gameindex Game index Integer O
serverIds The list of server ID String[] X
apps[] appindex App index Integer O
appid AppId String O
defaultLanguage Default setting language (Refer to the language code) String O
notification {{LANGUAGE}} Message information
Check the message structure and example below
Message X
option badge Badge for push notification Integer X
overwrite Whether to overwrite pushes or not Boolean X
collapseKey Key value for overwriting pushes String X
engagement User Engagement String X
comment Comment String X
groupKey The group key value to expose notifications in group when a user receives notifications in iOS or Android OS environment. The notification setting chosen in the device OS is applied by default. For more details about the option, see the following documentation.

String X
android icon This is the icon image file name exposed when a push notification appears on the user’s device. The image file should be located in /src/main/res/drawable. See here for the supported image file formats. If you want to expose an image on the web instead of an image file, type the image URL in this field instead of an image file name. If this field is left empty, the app icon image will be exposed. String X
sound This is the name of the notification sound file to be played when a push notification appears on the user’s device. You can specify a sound source file included in the app bundle, and the sound source file should be located in /src/main/res/raw. If this field is left empty, the system’s default sound file is used. String X
ios sound This is the name of the notification sound file to be played when a push notification appears on the user’s device. The sound source file should be located in Library/Sounds of the app container, or it must exist in the main bundle of your app. If this field is left empty, the value is automatically set to “default,” and the system default sound file of the user’s Apple device will be used. String X

For more details about option, see the respective markets’ guidelines.
(The option field is not applicable for Facebook.)

  • CampaignContinent Structure
    Division Field Name Description Type Required
    CampaignContinent continent Continent type String O
    countries The code of countries in a continent String[] O
  • CampaignContinent Example
  • Message Structure
    Division Field Name Description Type Required
    Message android title Title String O
    message Message String O
    messageExpanded Expanded message String X
    imageUrl Image URL String X
    ticker Ticker String X
    summaryText Summarized message String X
    iOS title Title String O
    message Message String O
    mediaUrl Image URL String X
    facebook title Title (within 1~30 letters) String O
    body Body (within 10~180 letters) String O
    media Image URL String O
  • Message Example
  • Output Result

    Header Content-Type application/json;charset=utf-8
    UUID {{UUID}}
    Body Body is empty if success

    Response state code

    Key Value Description
    200 Success (Body is empty)
    400 Bad Request POST data is omitted
    JSON format error
    Required element is omitted or invalid
    Available to check additionally with reason message in Body
    401 Unauthorized Authorization header in request message is omitted or invalid
    Authorization token (API KEY) is not registered
    No access permission to the relevant API
    403 Forbidden Authorization scheme of Authorization header is not “Bearer” (Supported Bearer only)
    404 Not Found Request URL is wrong
    500 Internal Server Error Internal error on server
    502 Bad Gateway Push gateway server is overloaded
    Network connects in a wrong way
    503 Service Unavailable API server or authorization server is frozen

    Sample Code

    Campaign registration
  • Call
  • Request
  • Response
  • Campaign modification
  • Call
  • Request
  • Response
  •  

    Country Code

    Continent Country Code Country Code
    Africa Angola AO Madagascar MG
    Burkina Faso BF Mali ML
    Burundi BI Mauritania MR
    Benin BJ Mauritius MU
    Botswana BW Malawi MW
    Democratic Republic of the Congo CD Mozambique MZ
    Central African Republic CF Namibia NA
    Republic of the Congo CG Niger NE
    Ivory Coast CI Nigeria NG
    Cameroon CM Reunion RE
    Cape Verde CV Rwanda RW
    Djibouti DJ Seychelles SC
    Algeria DZ Sudan SD
    Egypt EG Saint Helena SH
    Western Sahara EH Sierra Leone SL
    Eritrea ER Senegal SN
    Ethiopia ET Somalia SO
    Gabon GA South Sudan SS
    Ghana GH Sao Tome and Principe ST
    Gambia GM Swaziland SZ
    Guinea GN Chad TD
    Equatorial Guinea GQ French Southern Territories TF
    Guinea-Bissau GW Togo TG
    British Indian Ocean Territory IO Tunisia TN
    Kenya KE Tanzania TZ
    Comoros KM Uganda UG
    Liberia LR Mayotte YT
    Lesotho LS South Africa ZA
    Libya LY Zambia ZM
    Morocco MA Zimbabwe ZW
    Americas Antigua and Barbuda AG Honduras HN
    Anguilla AI Haiti HT
    Argentina AR Jamaica JM
    Aruba AW Saint Kitts and Nevis KN
    Barbados BB Cayman Islands KY
    Saint Barthélemy BL Saint Lucia LC
    Bermuda BM Saint Martin MF
    Bolivia BO Martinique MQ
    Bonaire, Saint Eustatius and Saba BQ Montserrat MS
    Brazil BR Mexico MX
    Bahamas BS Nicaragua NI
    Belize BZ Panama PA
    Canada CA Peru PE
    Chile CL Saint Pierre and Miquelon PM
    Colombia CO Puerto Rico PR
    Costa Rica CR Paraguay PY
    Cuba CU Suriname SR
    Curaçao CW El Salvador SV
    Dominica DM Sint Maarten SX
    Dominican Republic DO Turks and Caicos Islands TC
    Ecuador EC Trinidad and Tobago TT
    Falkland Islands FK United States Minor Outlying Islands UM
    Grenada GD United States US
    French Guiana GF Uruguay UY
    Greenland GL Saint Vincent and the Grenadines VC
    Guadeloupe GP Venezuela VE
    South Georgia and the South Sandwich Islands GS British Virgin Islands VG
    Guatemala GT U.S. Virgin Islands VI
    Guyana GY
    Asia United Arab Emirates AE Lebanon LB
    Afghanistan AF Sri Lanka LK
    Armenia AM Myanmar MM
    Azerbaijan AZ Mongolia MN
    Bangladesh BD Macao MO
    Bahrain BH Maldives MV
    Brunei BN Malaysia MY
    Bhutan BT Nepal NP
    China CN Oman OM
    Georgia GE Philippines PH
    Hong Kong HK Pakistan PK
    Indonesia ID Palestinian Territory PS
    Israel IL Qatar QA
    India IN Saudi Arabia SA
    Iraq IQ Singapore SG
    Iran IR Syria SY
    Jordan JO Thailand TH
    Japan JP Tajikistan TJ
    Kyrgyzstan KG East Timor TL
    Cambodia KH Turkmenistan TM
    North Korea KP Turkey TR
    South Korea KR Taiwan TW
    Kuwait KW Uzbekistan UZ
    Kazakhstan KZ Vietnam VN
    Laos LA Yemen YE
    Europe Andorra AD Iceland IS
    Albania AL Italy IT
    Austria AT Jersey JE
    Aland Islands AX Liechtenstein LI
    Bosnia and Herzegovina BA Lithuania LT
    Belgium BE Luxembourg LU
    Bulgaria BG Latvia LV
    Belarus BY Monaco MC
    Switzerland CH Moldova MD
    Cyprus CY Montenegro ME
    Czech Republic CZ Macedonia MK
    Germany DE Malta MT
    Denmark DK Netherlands NL
    Estonia EE Norway NO
    Spain ES Poland PL
    Finland FI Portugal PT
    Faroe Islands FO Romania RO
    France FR Serbia RS
    United Kingdom GB Russia RU
    Guernsey GG Sweden SE
    Gibraltar GI Slovenia SI
    Greece GR Svalbard and Jan Mayen SJ
    Croatia HR Slovakia SK
    Hungary HU San Marino SM
    Ireland IE Ukraine UA
    Isle of Man IM Vatican VA
    Oceania American Samoa AS Niue NU
    Australia AU New Zealand NZ
    Cocos Islands CC French Polynesia PF
    Cook Islands CK Papua New Guinea PG
    Christmas Island CX Pitcairn PN
    Fiji FJ Palau PW
    Micronesia FM Solomon Islands SB
    Guam GU Tokelau TK
    Kiribati KI Tonga TO
    Marshall Islands MH Tuvalu TV
    Northern Mariana Islands MP Vanuatu VU
    New Caledonia NC Wallis and Futuna WF
    Norfolk Island NF Samoa WS
    Nauru NR
    Polar Antarctica AQ

     

    Language Code

    Language code Language
    ko Korean
    zh-hans Chinese (Simplified)
    zh-hant Chinese (Traditional)
    en English
    ja Japanese
    ar Arabic
    fr French
    de German
    es Spanish
    pt Portuguese
    th Thai
    it Italian
    ru Russian
    id Indonesian
    vi Vietnamese
    tr Turkish