Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
8092 lines (6243 sloc) 371 KB
FORMAT: 1A
HOST: https://push.notifica.re/
# Notificare REST API
Unified remote push notifications, location services, actionable analytics, loyalty and marketing automation for iOS, Android and Web apps.
Create user profiles, categorize your users and devices, create & schedule any rich and interactive notification.
Tap into millions of App Store and Google Play users with in-app products, run reward and loyalty programs with digital cards in Wallet and use Geo-Targeting, Geo-Fencing or iBeacon technology to provide the ultimate messaging experience.
Sign up for free [here](https://dashboard.notifica.re/#/sign-up).
The API calls below are all authenticated. There are 4 types of authentication credentials:
- `email` / `password`: Used for signing in to your account and retrieving a session token
- `token`: Used for all calls that need account-wide access, such as stats, lists of applications, etc.
- `applicationKey` / `applicationSecret`: Only used for calls that originate from the device, e.g., registration, tags.
- `applicationKey` / `masterSecret`: Used for calls that are related to a specific application and originate from your backend system, e.g., push, user segments, user lists, device lists, regions.
All 4 types use normal Basic HTTP Authentication (username + password), in case of token, the password is ignored, so can be anything, e.g. "xxx"
For more information about this API, please [contact us](http://notifica.re/contact).
# Group Account
Handles authentication with the REST API.
Includes the `token` that will be required to create, edit and delete applications and get global stats about your account.
## Account [/account/login]
In order to handle authentication in our REST API you will need to at least implement the endpoints for login and logout of your account. By default only these 2 endpoints are required to handle your account. If you're using or will enable 2FA, account authentication will be extended with the endpoints provided in the 2FA section.
### Account Login [POST]
Retrieve session token based on account credentials. This request must be authenticated with the `email` and `password`.
+ Response 201 (application/json; charset=utf-8)
{
account: "5245bc5b3e66a3b01f0024d4",
token: "5245bc5b3e66a3b01f2224d4",
expires: "2013-11-25T15:19:10.000Z",
needsSecondFactor: false
}
+ Response 401 (application/json; charset=utf-8)
{
"error":"wrong credentials"
}
+ Response 404 (application/json; charset=utf-8)
{
"error":"account not found"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"account inactive"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"account blocked"
}
+ Response 429 (application/json; charset=utf-8)
{
"error":"too many login attempts"
}
### Account Logout [DELETE]
Delete account session. This request must be authenticated with the `token`.
+ Response 204 (application/json; charset=utf-8)
## Create TOTP [/account/login/totp]
Once you enable a 2FA authentication method, the endpoint for account login will return the property `needsSecondFactor` as true. Whenever that is the case, you need to implement also this endpoint in order to provide us with the 6 digit code required to start a session. Failing to do this will result in HTTP errors for all endpoints using the session token.
### Create TOTP [POST]
Provide the 6 digit code after retrieving session token with account credentials. This request must be authenticated with the `token`.
+ Parameters
+ code = `123456` (required, number, `123456`)...The code generated by Google Authenticator app.
+ Response 201 (application/json; charset=utf-8)
{
account: "5245bc5b3e66a3b01f0024d4",
token: "5245bc5b3e66a3b01f2224d4",
expires: "2013-11-25T15:19:10.000Z",
needsSecondFactor: false
}
## Check 2FA [/account/2fa]
As an extra layer of security you can choose to enable Two Factor Authentication for your account. This feature currently supports only TOTP (Time-based One-Time Password) with the Google Authenticator app which generates one time codes that will be required every time you try to start a new session. Support for channels like U2F (Universal 2nd Factor Authentication) and SMS (Short Message Service) are currently being developed.
### Check 2FA [GET]
Retrieve the account 2FA state. This should provide information about 2FA functionality for your account. This request must be authenticated with the `token`.
+ Response 200 (application/json; charset=utf-8)
{
use2FA: false,
totp: {
configured: false,
verified: false,
date: "2013-11-25T15:19:10.000Z"
},
u2f: {
configured: false
}
}
## Register TOTP [/account/2fa/totp]
As part of the 2FA setup, registering for TOTP is required in order to obtained the URL required to open Google Authenticator app and configure, enable or disable a TOTP.
### Register TOTP [POST]
Register your account for TOTP. This endpoint will provide you a key (for manual setup) and URL (to create a QRCode) that allows you to configure the Google Authenticator app. This request must be authenticated with the `token`.
+ Response 200 (application/json; charset=utf-8)
{
key: "xxx",
url: "otpauth://totp/xxx?secret=xxx&period=30&issuer=xxx"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"authenticator already setup"
}
### Unregister TOTP [DELETE]
Unregister your account for TOTP. This endpoint will delete the setup for the Google Authenticator app. This request must be authenticated with the `token`.
+ Response 204 (application/json; charset=utf-8)
+ Response 403 (application/json; charset=utf-8)
{
"error":"second factor enabled, needs at least one verified method"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"authenticator not setup"
}
## Enable TOTP [/account/2fa/enable]
### Enable TOTP [PUT]
At any time when your account has been configured for 2FA, you can use this endpoint to enable it. This request must be authenticated with the `token`.
+ Response 200 (application/json; charset=utf-8)
{
message: "second factor enabled"
}
+ Response 200 (application/json; charset=utf-8)
{
message: "second factor already enabled"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"no second factor configured"
}
+ Response 403 (application/json; charset=utf-8)
{
"error":"no verified second factor"
}
## Disable TOTP [/account/2fa/disable]
### Disable TOTP [PUT]
At any time when your account has been configured for 2FA and is enabled, you can disable it. This request must be authenticated with the `token`.
+ Response 200 (application/json; charset=utf-8)
{
message: "second factor disabled"
}
+ Response 200 (application/json; charset=utf-8)
{
message: "second factor already disabled"
}
# Group Application
Your account can create as many applications as you want.
Applications must provide a name, a category and the environment it should use. When you create an application three access keys will be automatically created for you.
These keys will be used in by both your apps and this API to access your applications. Make sure you never share these keys publicly online.
## Applications [/application{?limit,skip}]
### Applications [GET]
Get your active applications. This request must be authenticated with the `token`.
+ Parameters
+ limit = `50` (optional, number, `10`)...The number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 201 (application/json; charset=utf-8)
{
"applications":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"account": "5245bc5b3e66a3b01f0024d4",
"applicationKey": "xxxxxxxxxxxxx",
"applicationSecret": "xxxxxxxxxxxx",
"authProviders": [
{
"provider": "twitter"
}
],
"masterSecret": "xxxxxxxxxx",
"name": "Your App",
"gcmConfig": {
"key": "xxxxxxxxxxxxxxxxxxxxx"
},
"apnsConfig": {
"certificate": "raw certificate",
"info": {
"serial": "xxxxxx",
"subject": {
"UID": "re.notifica.test",
"CN": "Apple Development IOS Push Services: re.notifica.test",
"OU": "XXXXXXXXXX",
"C": "NL"
},
"issuer": {
"C": "US",
"O": "Apple Inc.",
"OU": "Apple Worldwide Developer Relations",
"CN": "Apple Worldwide Developer Relations Certification Authority"
},
"notBefore": "2013-11-25T15:19:10.000Z",
"notAfter": "2014-11-25T15:19:10.000Z"
}
},
"regionConfig": {
"proximityUUID": "f7826da6-4fa2-4e98-8024-bc5b71e0893e"
},
"actionCategories": [{
"name": "MyTemplate",
"type": "re.notifica.notification.Alert",
"actions": [{
"label": "follow",
"type": "re.notifica.action.Callback",
"target": "",
"camera": false,
"keyboard": false,
"destructive": false
}]
}],
"locationTtl": 7,
"production": false,
"active": true,
"blocked": false,
"date": "2012-11-28T15:31:54.904Z",
"category": "Other"
}
]
}
## Shared Applications [/application/shared{?limit,skip}]
### Shared Applications [GET]
Get all the active applications that are shared with your account. This request must be authenticated with the `token`.
+ Parameters
+ limit = `50` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 201 (application/json; charset=utf-8)
{
"applications":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"account": "5245bc5b3e66a3b01f0024d4",
"applicationKey": "xxxxxxxxxxxxx",
"applicationSecret": "xxxxxxxxxxxx",
"authProviders": [
{
"provider": "twitter"
}
],
"masterSecret": "xxxxxxxxxx",
"name": "Your App",
"gcmConfig": {
"key": "xxxxxxxxxxxxxxxxxxxxx"
},
"apnsConfig": {
"certificate": "raw certificate",
"info": {
"serial": "xxxxxx",
"subject": {
"UID": "re.notifica.test",
"CN": "Apple Development IOS Push Services: re.notifica.test",
"OU": "XXXXXXXXXX",
"C": "NL"
},
"issuer": {
"C": "US",
"O": "Apple Inc.",
"OU": "Apple Worldwide Developer Relations",
"CN": "Apple Worldwide Developer Relations Certification Authority"
},
"notBefore": "2013-11-25T15:19:10.000Z",
"notAfter": "2014-11-25T15:19:10.000Z"
}
},
"regionConfig": {
"proximityUUID": "f7826da6-4fa2-4e98-8024-bc5b71e0893e"
},
"actionCategories": [{
"name": "MyTemplate",
"type": "re.notifica.notification.Alert",
"actions": [{
"label": "follow",
"type": "re.notifica.action.Callback",
"target": "",
"camera": false,
"keyboard": false,
"destructive": false
}]
}],
"locationTtl": 7,
"production": false,
"active": true,
"blocked": false,
"date": "2012-11-28T15:31:54.904Z",
"category": "Other"
}
]
}
## Create Application [/application]
### Create Application [POST]
Create a new application. This request must be authenticated with the `token`.
+ Parameters
+ name (required, string, `My Amazing App`)...Your application's name.
+ production (required, `boolean`)...If your application is set to production or not.
+ category (required, string, `Business`)...Your application's category.
+ actionCategories (optional, array, `[{"name:"My Template", type:"re.notifica.notification.Alert", actions: [{label:"Reply", type:"re.notifica.action.Callback", target:"", camera:false, keyboard:false, destructive:false}"}]`)...An array of objects that can be used as templates for messages.
+ Request (application/json)
{
"name":"My Amazing App",
"production": true,
"category": "Business"
}
+ Response 201 (application/json; charset=utf-8)
{
"application":{
"_id":"5245bc5b3e66a3b01f0024d4"
}
}
## Application [/application/{application}]
### Get Application [GET]
Get an application object. This request must be authenticated with the `token`.
+ Parameters
+ application (required, string, `5245bc5b3e66a3b01f0024d4`)...The account id of an active application.
+ Response 200 (application/json; charset=utf-8)
{
"application":{
"_id":"5245bc5b3e66a3b01f0024d4",
"account": "xxxxxxxxxxx",
"applicationKey": "xxxxxxxxxxxxx",
"applicationSecret": "xxxxxxxxxxxx",
"authProviders": [
{
"provider": "twitter"
}
],
"masterSecret": "xxxxxxxxxx",
"name": "Your App",
"gcmConfig": {
"key": "xxxxxxxxxxxxxxxxxxxxx"
},
"apnsConfig": {
"certificate": "raw certificate",
"info": {
"serial": "xxxxxx",
"subject": {
"UID": "re.notifica.test",
"CN": "Apple Development IOS Push Services: re.notifica.test",
"OU": "XXXXXXXXXX",
"C": "NL"
},
"issuer": {
"C": "US",
"O": "Apple Inc.",
"OU": "Apple Worldwide Developer Relations",
"CN": "Apple Worldwide Developer Relations Certification Authority"
},
"notBefore": "2013-11-25T15:19:10.000Z",
"notAfter": "2014-11-25T15:19:10.000Z"
}
},
"regionConfig": {
"proximityUUID": "f7826da6-4fa2-4e98-8024-bc5b71e0893e"
},
"actionCategories": [{
"name": "MyTemplate",
"type": "re.notifica.notification.Alert",
"actions": [{
"label": "follow",
"type": "re.notifica.action.Callback",
"target": "",
"camera": false,
"keyboard": false,
"destructive": false
}]
}],
"locationTtl": 7,
"production": false,
"active": true,
"blocked": false,
"date": "2012-11-28T15:31:54.904Z",
"category": "Other"
}
}
### Update Application [PUT]
Modify an application. This request must be authenticated with the `token`.
+ Parameters
+ application (required, string, `5245bc5b3e66a3b01f0024d4`)...The account id of an active application.
+ Request (application/json)
{
"name":"My Amazing App",
"production": true,
"category": "Business"
}
+ Response 200 (application/json; charset=utf-8)
{
"message":"application changes saved"
}
### Delete Application [DELETE]
Destroy an application. This operation can not be undone. This request must be authenticated with the `token`.
+ Parameters
+ application (required, string, `5245bc5b3e66a3b01f0024d4`)...The account id of an active application.
+ Response 200 (application/json; charset=utf-8)
{
"message":"application deactivated"
}
# Group Asset
Storage is an add-on of Notificare. When active this add-on will let you manage files and create groups of assets to be used in your applications.
Therefore this add-on is divided in two different endpoints: assets and asset groups. Assets being the files you can upload to Notificare and asset groups being the groups of files that can be used in an application.
## Assets [/asset{?limit,skip}]
### Get Assets [GET]
Get all the assets for an application.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"assets":[{
"_id": "5708dff98f252b8f23fe05100",
"application": "5354f0bb3fa544f52ff4cff0",
"key": "3d99d18148e6f3dbcf4ff891c9a0ff63b0311feccc7b9d0c8c79fee9b4dde19/e457c97c76bc41ff524af3697cc5236cc06fd982a83f983046fff68ea56b1b6",
"fileName": "/notifications/3d99d18148e6f3dbcf4ff891c9a0ff63b0311feccc7b9d0c8c79fee9b4dde19/e457c97c76bc41ff524af3697cc5236cc06fd982a83f983046fff68ea56b1b6",
"contentLength": 59609,
"contentType": "image/png",
"contentDisposition": "form-data; name=\"file\"; filename=\"Screenshot_2016-04-07-13-17-31.png\"",
"originalFileName": "Screenshot_2016-04-07-13-17-31.png",
"lastModified": "2016-04-09T10:25:28.129Z",
"__v": 0,
"customSortOrder": 0
},
{
"_id": "5708dff98f252b8f23fe05100",
"application": "5354f0bb3fa544f52ff4cff0",
"key": "3d99d18148e6f3dbcf4ff891c9a0ff63b0311feccc7b9d0c8c79fee9b4dde19/e457c97c76bc41ff524af3697cc5236cc06fd982a83f983046fff68ea56b1b6",
"fileName": "/notifications/3d99d18148e6f3dbcf4ff891c9a0ff63b0311feccc7b9d0c8c79fee9b4dde19/e457c97c76bc41ff524af3697cc5236cc06fd982a83f983046fff68ea56b1b6",
"contentLength": 59609,
"contentType": "image/png",
"contentDisposition": "form-data; name=\"file\"; filename=\"Screenshot_2016-04-07-13-17-31.png\"",
"originalFileName": "Screenshot_2016-04-07-13-17-31.png",
"lastModified": "2016-04-09T10:25:28.129Z",
"__v": 0,
"customSortOrder": 0
},
],
"count": 2
}
### Create Asset [POST]
Create an asset in a specific application. Uploads a file to Notificare. The resulting filename is the path of that file inside the notificare storage. This can be used as a reference to the file in further processing or deleting.
The contents of the file should be in the body of the request and with the correct mime-type. So, e.g. an image should be of type `image/png`, `image/jpg` or `image/gif`, a pdf should be `application/pdf` and a video should be `video/mp4`.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Request (image/jpeg)
------BoundaryaQGxWlhjMW7v9kU1
Content-Disposition: form-data; name="file"; filename="landscapes-202a.jpg"
Content-Type: image/jpeg
+ Response 201 (application/json; charset=utf-8)
{
"_id": "570bff9ff09c7c399e721897",
"key": "3d99d18148e6f3dbcf4ff891c9a02ffb0311feccc7b9d0c8c79fee9dddde19/51b73467c0665add7abfd4bc47ebfdff843f77f58dcb12cdeb3d0c094f0e9835"
}
## Asset [/asset/{id}]
### Update Asset [PUT]
Modify a specific asset.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01fff24d4`)...The asset's id.
+ Request (image/jpeg)
------BoundaryaQGxWlhjMW7v9kU1
Content-Disposition: form-data; name="file"; filename="landscapes-202a.jpg"
Content-Type: image/jpeg
+ Response 200 (application/json; charset=utf-8)
{
"message":"asset updated"
}
### Delete Asset [DELETE]
Delete an asset. This operation can not be undone.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01fff24d4`)...The asset's id.
+ Response 204 (application/json; charset=utf-8)
## Asset Groups [/asset/group{?limit,skip}]
### Get Asset Groups [GET]
Get all the asset groups for an application.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"assetGroups":[{
"_id": "56f3444fc34c01653ffccdf0",
"application": "5354f0bb3fa54ff52ff4c7c0",
"name": "testing",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a02646ff311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b8ff1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fcff01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
},
{
"_id": "56f3444fc34c01653c7ccdf0",
"application": "5354f0bb3fa544452ff4c7c0",
"name": "testing",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
},
],
"count": 2
}
## Asset Groups By Name [/asset/group{?limit,skip}]
### Get Asset Groups By Name [GET]
Get all the asset groups for an application. Because asset groups can share the same name you might need to get all asset groups with the same name. Use this endpoint to retrieve assets with the same name.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"assetGroups":[{
"_id": "56f3444fc34c01653ffccdf0",
"application": "5354f0bb3fa54ff52ff4c7c0",
"name": "testing",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a02646ff311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b8ff1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fcff01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
},
{
"_id": "56f3444fc34c01653c7ccdf0",
"application": "5354f0bb3fa544452ff4c7c0",
"name": "testing",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
},
],
"count": 2
}
### Create Asset Group [POST]
Create an asset group in a specific application. This allows you to group assets in a group can then later be retrieved in your applications using the SDKs.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ name (required, string, `My Banner Set`)...The asset group's name
+ segment (optional, string, `5354f0bb3fa54ff52ff4c7c0`)...The segment for this asset group
+ notBefore (optional, date, `2012-11-28T15:31:54`)...Asset groups will not be visible before this date.
+ notAfter (optional, date, `2014-11-28T15:31:54`)...Asset groups will not be visible after this date.
+ assets (required, array, `[{ "title": "My Banner Set"... }]`)...An array of objects.
+ Request (application/json)
{
"name": "My Banner Set",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
},
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
}
+ Response 201 (application/json; charset=utf-8)
{
"assetGroup": {
"_id": "56f3444fc34c01653c7ccdf1"
}
}
## Asset Group [/asset/group/{id}]
### Get Asset Group [GET]
Get a specific asset group.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The asset group's id.
+ Response 200 (application/json; charset=utf-8)
{
"assetGroup":{
"_id": "56f3444fc34c01653ffccdf0",
"application": "5354f0bb3fa54ff52ff4c7c0",
"name": "testing",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a02646ff311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b8ff1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fcff01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
}
}
### Update Asset Group [PUT]
Modify a specific asset group.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The asset group's id.
+ name (required, string, `My Banner Set`)...The asset group's name
+ segment (optional, string, `5354f0bb3fa54ff52ff4c7c0`)...The segment for this asset group
+ notBefore (optional, date, `2012-11-28T15:31:54`)...Asset groups will not be visible before this date.
+ notAfter (optional, date, `2014-11-28T15:31:54`)...Asset groups will not be visible after this date.
+ assets (required, array, `[{ "title": "My Banner Set"... }]`)...An array of objects.
+ Request (application/json)
{
"name": "My Banner Set",
"segment": "5354f0bb3fa54ff52ff4c7c0",
"notBefore": null,
"notAfter": null,
"assets":[
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
},
{
"title": "Screen Shot 2016-03-24 at 00.04.49.png",
"key": "3d99d18148e6f3dbcf4ff891c9a026463b0311feccc7b9d0c8c79fee9b4dde19/c76c6363a7e014fae1586fa9b83b1c61faa7b79036fd2670db2840de979cab03",
"description": "",
"_id": "56f3444fc34c01653c7ccdf1",
"button":{
"label": "",
"action": ""
}
}
]
}
+ Response 200 (application/json; charset=utf-8)
{
"message": "asset group updated"
}
### Delete Asset Group [DELETE]
Delete an asset group. This operation cannot be undone.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01fff24d4`)...The asset group's id.
+ Response 200 (application/json; charset=utf-8)
{
"message": "asset group removed"
}
# Group Automation
Automation is an add-on of Notificare. It will give you access to mechanisms that can automate how you send notifications.
## Datasources [/datasource]
### Get Datasources [GET]
Get all the datasources for an application.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Response 200 (application/json; charset=utf-8)
{
"datasources":[{
"_id":"55c0c7f4fed3e3bb70e2e86b",
"type":"feed",
"application":"5489b42ff23e5815132b492a",
"lastRun":"2015-11-13T15:19:10.698Z",
"name":"Blog",
"config":{
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
},
"feedMap":"tag_newsletter",
"lastParsed":"2015-11-12T08:28:53.000Z",
"categoryMap":[],
"mapTarget":"tag",
"mapType":"feed",
"nextRun":"2015-11-13T15:34:10.698Z",
"active":true
},
{
"_id":"55c0c7f4fed3e3bb70e2e86b",
"type":"feed",
"application":"5489b42ff23e5815132b492a",
"lastRun":"2015-11-13T15:19:10.698Z",
"name":"Blog",
"config":{
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
},
"feedMap":"tag_newsletter",
"lastParsed":"2015-11-12T08:28:53.000Z",
"categoryMap":[],
"mapTarget":"tag",
"mapType":"feed",
"nextRun":"2015-11-13T15:34:10.698Z",
"active":true
},
],
"count": 2
}
### Create Datasource [POST]
Create a datasource.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ name (required, string, `My Feed`)...The source's name
+ type (required, string, `feed`)...The type of datasource. Accepts one of these: 'feed', 'upload'.
+ config (required, object, `{"url":"http://notifica.re/blog/feed.xml","messageType":"re.notifica.notification.Alert"}`)...An object containing the URL's source and the notification type.
+ feedMap (required, string, `tag_newsletter`)...A string representing a tag or a segment Id.
+ mapType (required, string, `feed`)...The type of mapping for the source. Accepts one of these: 'feed', 'category'.
+ mapTarget (required, string, `tag`)...The mapping target for the source. Accepts one of these: 'tag', 'segment'.
+ categoryMap (optional, object, `{"category":"Newsletter","target":"tag_newsletter"}`)...An object containing the category and the target's tag or segment Id. Only used and required if you choose category in mapType.
+ Request (application/json)
{
"name": "My Feed",
"type": "feed",
"config": {
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
},
"feedMap": "tag_newsletter",
"mapType": "tag"
}
+ Response 200 (application/json; charset=utf-8)
{
"datasource": {
"_id": "56f3444fc34c01653c7ccdf1"
}
}
## Datasource [/datasource/{id}]
### Get Datasource [GET]
Get a specific datasource.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `55c0c7f4fed3e3ff70e2e86b`)...The source's id.
+ Response 200 (application/json; charset=utf-8)
{
"datasource":{
"_id":"55c0c7f4fed3e3bb70e2e86b",
"type":"feed",
"application":"5489b42ff23e5815132b492a",
"lastRun":"2015-11-13T15:19:10.698Z",
"name":"Blog",
"config":{
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
},
"feedMap":"tag_newsletter",
"lastParsed":"2015-11-12T08:28:53.000Z",
"categoryMap":[],
"mapTarget":"tag",
"mapType":"feed",
"nextRun":"2015-11-13T15:34:10.698Z",
"active":true
}
}
### Update Datasource [PUT]
Modify a datasource.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The source's id.
+ name (required, string, `My Feed`)...The source's name
+ type (required, string, `feed`)...The type of datasource. Accepts one of these: 'feed', 'upload'.
+ config (required, object, `{"url":"http://notifica.re/blog/feed.xml","messageType":"re.notifica.notification.Alert"}`)...An object containing the URL's source and the notification type.
+ feedMap (required, string, `tag_newsletter`)...A string representing a tag or a segment Id.
+ mapType (required, string, `feed`)...The type of mapping for the source. Accepts one of these: 'feed', 'category'.
+ mapTarget (required, string, `tag`)...The mapping target for the source. Accepts one of these: 'tag', 'segment'.
+ categoryMap (optional, object, `{"category":"Newsletter","target":"tag_newsletter"}`)...An object containing the category and the target's tag or segment Id. Only used and required if you choose category in mapType.
+ Request (application/json)
{
"name": "My Feed",
"type": "feed",
"config": {
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
},
"feedMap": "tag_newsletter",
"mapType": "tag"
}
+ Response 200 (application/json; charset=utf-8)
{
"message":"datasource updated"
}
### Delete Datasource [DELETE]
Delete a datasource. This operation cannot be undone.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The source's id.
+ Response 200 (application/json; charset=utf-8)
{
"message":"datasource deleted"
}
## Test Datasource [/datasource/test]
### Test New Datasource [POST]
Test a datasource feed before actually creating it.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ config (required, object, `{"url":"http://notifica.re/blog/feed.xml","messageType":"re.notifica.notification.Alert"}`)...An object containing the URL's source and the notification type.
+ Request (application/json)
{
"config": {
"url":"http://notifica.re/blog/feed.xml",
"messageType":"re.notifica.notification.Alert"
}
}
+ Response 200 (application/json; charset=utf-8)
{
"feed": {
"meta": {
"title": "Notificare",
"description": "Our Blog",
"date": "2016-06-24T09:00:00.000Z"
},
"items": [{
"title": "MobileStrategy and Notificare announce...",
"description": "<p><br />\n<strong>Press release</strong>...",
"date": "2016-06-24T09:00:00.000Z",
"link": "http://notifica.re/blog/2016/06/24/MobileStrategy-Notificare-Partnership/"
}, {
"title": "Notificare receives ISO 27001 certification",
"description": "<p><br />\nFrom day 1, we set out to provide...",
"date": "2016-02-26T13:02:00.000Z",
"link": "http://notifica.re/blog/2016/02/26/Notificare-ISO-Certification/"
}]
}
}
## Test Existing Datasource [/datasource/{id}/test]
### Test Existing Datasource [PUT]
Test a datasource feed that is already created.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The source's id.
+ Response 200 (application/json; charset=utf-8)
{
"feed": {
"meta": {
"title": "Notificare",
"description": "Our Blog",
"date": "2016-06-24T09:00:00.000Z"
},
"items": [{
"title": "MobileStrategy and Notificare announce...",
"description": "<p><br />\n<strong>Press release</strong>...",
"date": "2016-06-24T09:00:00.000Z",
"link": "http://notifica.re/blog/2016/06/24/MobileStrategy-Notificare-Partnership/"
}, {
"title": "Notificare receives ISO 27001 certification",
"description": "<p><br />\nFrom day 1, we set out to provide...",
"date": "2016-02-26T13:02:00.000Z",
"link": "http://notifica.re/blog/2016/02/26/Notificare-ISO-Certification/"
}]
}
}
# Group Beacon
Methods to manage your beacons. Be sure to add the `regionConfig.proximityUUID` in your Application and create a Region first.
Also beacons require that you create a triggered message previously.
## Beacons [/beacon/forregion/{region}]
### Get Beacons [GET]
Get all beacons for a certain region.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ region (required, string, `5245bc5b3e66a3b01f0024d4`)...The id of an active region.
+ Response 200 (application/json; charset=utf-8)
{
"beacons":[{
"_id":"5245bc5b3e66a3b01f0024d4",
"notification":"6245bc5b3e66a3b01f0024d5",
"name": "My Beacon",
"major": "654321",
"minor": "123456",
"proximity": "immediate"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"notification":"6245bc5b3e66a3b01f0024d5",
"name": "My Beacon",
"major": "654321",
"minor": "123456",
"proximity": "immediate"
}]
}
## Create Beacon [/beacon]
### Create Beacon [POST]
Create a new beacon for a region. To complete this request you must create a triggered Notification first.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ name (required, string, `My Beacon`)...Your beacon's name
+ major (required, number, `654321`)...Your beacon's major identifier (must match a previously created identifier of a region)
+ minor (required, number, `123456`)...Your beacon's minor identifier (must be unique per major)
+ proximity (optional, string, `immediate`)...Your notification proximity. Accepts one of these: 'immediate', 'near' and 'far'. (deprecated)
+ notification (optional, string, `5245bc5b3e66a3b01f0024d4`)...An Id of a previously created notification. (deprecated)
+ proximityNotifications (optional, object, `{"immediate":"","near":"","far":""}`)...An object containing three previously created message Ids for each proximity level.
+ batteryLevel (optional, number, `10`)...An object representing the battery level of this beacon.
+ purpose (optional, string, `general`)...An object representing the purpose of the beacon. Accepts one of these: 'general', 'pay', 'info', 'staff', 'admin'.
+ latitude (optional, number, `5.435`)...An integer representing the beacon's latitude.
+ longitude (optional, number, `3.435`)...An integer representing the beacon's longitude.
+ data (optional, object, `{"mykey":"myvalue"}`)...A free form object that can be assigned to a beacon.
+ triggers (optional, `boolean`)...Set to true if this beacon can be used in triggers. Max. number of beacons that can use triggers is limited to 10.
+ Request (application/json)
{
"notification":"5245bc5b3e66a3b01f0024d4",
"name": "My Beacon",
"major": "654321",
"minor": "123456",
"proximity": "immediate"
}
+ Response 201 (application/json; charset=utf-8)
{
"beacon":{
"_id":"5245bc5b3e66a3b01f0024d4"
}
}
## Beacon [/beacon/{id}]
### Get Beacon [GET]
Get a beacon object.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The beacon id of an active beacon.
+ Response 200 (application/json; charset=utf-8)
{
"beacons":{
"_id":"5245bc5b3e66a3b01f0024d4",
"notification":"6245bc5b3e66a3b01f0024d5",
"name": "My Beacon",
"major": "654321",
"minor": "123456",
"proximity": "immediate"
}
}
### Update Beacon [PUT]
Modify a beacon.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The beacon id of an active beacon.
+ name (required, string, `My Beacon`)...Your beacon's name
+ major (required, number, `654321`)...Your beacon's major identifier (must match a previously created identifier of a region)
+ minor (required, number, `123456`)...Your beacon's minor identifier (must be unique per major)
+ proximity (optional, string, `immediate`)...Your notification proximity. Accepts one of these: 'immediate', 'near' and 'far'. (deprecated)
+ notification (optional, string, `5245bc5b3e66a3b01f0024d4`)...An Id of a previously created notification. (deprecated)
+ proximityNotifications (optional, object, `{"immediate":"","near":"","far":""}`)...An object containing three previously created message Ids for each proximity level.
+ batteryLevel (optional, number, `10`)...An object representing the battery level of this beacon.
+ purpose (optional, string, `general`)...An object representing the purpose of the beacon. Accepts one of these: 'general', 'pay', 'info', 'staff', 'admin'.
+ latitude (optional, number, `5.435`)...An integer representing the beacon's latitude.
+ longitude (optional, number, `3.435`)...An integer representing the beacon's longitude.
+ data (optional, object, `{"mykey":"myvalue"}`)...A free form object that can be assigned to a beacon.
+ triggers (optional, `boolean`)...Set to true if this beacon can be used in triggers. Max. number of beacons that can use triggers is limited to 10.
+ Request (application/json)
{
"notification":"12345",
"name": "My Beacon",
"major": "654321",
"minor": "123456",
"proximity": "immediate"
}
+ Response 200 (application/json; charset=utf-8)
{
"message":"beacon updated"
}
### Delete Beacon [DELETE]
Delete a beacon. This operation cannot be undone.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `5245bc5b3e66a3b01f0024d4`)...The beacon id of an active beacon.
+ Response 200 (application/json; charset=utf-8)
{
"message":"beacon deleted"
}
# Group Device
Methods to manage devices.
Use these methods to retrieve information about devices for an application, for a specific user, for a specific tag or in a specific location.
Management of devices is exclusively made by our SDK libraries therefore you only get access to read operations.
## Devices [/device{?limit,skip}]
### Get Devices [GET]
Get all the devices for a specific application. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,"last_active":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Device [/device/{deviceID}]
### Get Device [GET]
Get a specific device based on the deviceID.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ deviceID (required, string, `00a9b9bf-xxx9278-64d6a3f22476`)...The deviceID is the unique identifier provided by APNS or GCM.
+ Response 200 (application/json; charset=utf-8)
{
"device":{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
}
## Register User [/device/{deviceID}/user]
### Register User To Device [PUT]
Register a userID and userName to a device. If you have the Users & Authentication add-on, you can delegate user registration to you back-end API. This will prevent you apps from registering users with only the app keys and instead you can take care of this at the server side. Use this method to add a userID and userName to a device.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ deviceID (required, string, `00a9b9bf-xxx9278-64d6a3f22476`)...The deviceID is the unique identifier provided by APNS or GCM.
+ Request (application/json; charset=utf-8)
{
"userID": "12345678",
"userName": "John Doe"
}
+ Response 200 (application/json; charset=utf-8)
{
"message": "device updated"
}
## Unregister User [/device/{deviceID}/user]
### Unregister User From Device [DELETE]
Unregister a userID and userName from a device. If you have the Users & Authentication add-on, you can delegate user registration to you back-end API. This will prevent you apps from registering users with only the app keys and instead you can take care of this at the server side. Use this method to remove a userID and userName from a device.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ deviceID (required, string, `00a9b9bf-xxx9278-64d6a3f22476`)...The deviceID is the unique identifier provided by APNS or GCM.
+ Response 200 (application/json; charset=utf-8)
{
"message": "device updated"
}
## Devices For User [/device/foruser/{user}{?limit,skip}]
### Get Devices For User [GET]
Get all the devices for a specific user. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ user (required, string, `testuser@example.com`)...The user ID is the one the client device registered with, e.g., the user's email address.
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Devices For Tag [/device/fortag/{tag}{?limit,skip}]
### Get Devices For Tag [GET]
Get all the devices for a specific tag. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ tag (required, string, `toys`)...The tag the device is associated with
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Devices For Location [/device/bylocation/{latitude}/{longitude}/{distance}{?limit,skip}]
### Get Devices For Location [GET]
Get all the devices in a specific location. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ latitude (required, number, `4.2345`)...The desired latitude
+ longitude (required, number, `5.6789`)...The desired longitude
+ distance (required, number, `1.5`)...The distance in kilometers of your search area relative to the latitude and longitude
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Devices For Bounds [/device/bylocation/{lat1}/{long1}/{lat2}/{long2}{?limit,skip}]
### Get Devices For Bounds [GET]
Get all the devices withing a specific bounds. Bounds form a rectangle from the points at its south-west and north-east corners. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ lat1 (required, number, `4.2345`)...The desired south-east latitude
+ long1 (required, number, `5.6789`)...The desired south-east longitude
+ lat2 (required, number, `4.2345`)...The desired north-west latitude
+ long2 (required, number, `5.6789`)...The desired north-west longitude
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Devices For Region [/device/forregion/{region}{?limit,skip}]
### Get Devices For Region [GET]
Get all the devices in a specific region. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ region (required, string, `5245bc5b3e66a3b01f0024d4`)...The id of the region
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
## Devices For Polygon [/device/bygeometry{?limit,skip}]
### Get Devices For Polygon [POST]
Get all the devices in a specific geometric shape. If skip and limit are not used, there is a default size of 100 devices. Please note that there is a max. size of 1000 devices per page.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ geometry (required, object, `[[4.2345, 5.6789],[4.2345, 5.6789],[4.2345, 5.6789]]`)...A simple polygon geoJSON object used to query the devices' location
+ Request (application/json; charset=utf-8)
{
"geometry": {
"coordinates":[[4.2345,5.6789],[4.2345,5.6789],[4.2345,5.6789],[4.2345,5.6789]],
"type":"Polygon"
}
}
+ Response 200 (application/json; charset=utf-8)
{
"devices":[
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[4.2345,5.6789],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
},
{
"_id":"5245bc5b3e66a3b01f0024d4",
"appVersion":"1.0",
"application":"52458981394c07916000492c",
"deviceID":"00a9b9bf-c099-45aa-9278-64d6a3f22476",
"osString":"Mac OS X 10.9.2",
"osVersion":"10.9.2",
"platform":"Mac OS X",
"sdkVersion":"0.0.1",
"transport":"Websocket",
"userID":"info@notifica.re",
"timeZoneOffset":-5,
"lastActive":"2014-03-11T16:20:55.084Z",
"active":true,
"tags":[
"toys"
],
"location":{
"coordinates":[],
"type":"Point"
},
"language":"en",
"deviceString":"MacIntel"
}
],
"count": 2
}
# Group Event
Get all the Events stored for a specific application.
## Event Types:
| type | description |
|:---------:|----------------------------------|
| re.notifica.event.application.Install | Stored whenever a new device installs the app. |
| re.notifica.event.application.Uninstall | Stored whenever an app was removed from the device, as reported by APNS or GCM feedback. |
| re.notifica.event.application.Open | Stored whenever the application becomes active. |
| re.notifica.event.application.Close | Stored whenever the application goes to background. |
| re.notifica.event.notification.Influenced | Stored whenever a notification when app is not active. |
| re.notifica.event.notification.Sent | Stored whenever a notification is sent. |
| re.notifica.event.notification.Receive | Stored whenever a notification arrives. |
| re.notifica.event.notification.Open | Stored whenever a notification is open. |
| re.notifica.event.region.Session | Stored whenever a user enters and leaves a region. |
| re.notifica.event.beacon.Session | Stored whenever a user is on the proximity of a beacon. |
| re.notifica.event.pass.Add | Stored whenever a pass is added to a device's wallet. |
| re.notifica.event.pass.Remove | Stored whenever a pass is removed from a device's wallet. |
| re.notifica.event.pass.Redeem | Stored whenever a pass is redeemed. |
| re.notifica.event.asset.Load | Stored whenever an asset group is loaded. |
| re.notifica.event.scannable.Scan | Stored whenever a scannable is scanned. |
| re.notifica.event.product.Buy | Stored whenever a purchase is done. |
| re.notifica.event.product.Buy.{store} | Stored whenever a purchase is done, where store is AppStore or GooglePlay. |
| re.notifica.event.product.Buy.{store}.{identifier} | Stored whenever a purchase is done, where store is AppStore or GooglePlay. |
## Events For Type [/event/fortype/{type}{?limit,skip,since,before,region,fence,pass,serial,group,scannable,notification,userID,deviceID}]
### Get Events For Type [GET]
Get all the events for a type for a specific application.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.event.application.Install`)...The type of event.
+ limit = `100` (optional, number, `10`)...The maximum number of results to retrieve.
+ skip = `0` (optional, number, `0`)...The number of results to skip
+ since = (optional, date, `2014-10-03`)...When provided will only retrieve events after this date
+ before = (optional, date, `2014-10-04`)...When provided will only retrieve events before this date (only available when a since date is provided)
+ userID = (optional, string, `user@example.com`)...When provided will only retrieve events for the userID. Requires since and before to be set as well.
+ deviceID = (optional, string, `bbff2ce9b547d2df4731bac277xxx`)...When provided will only retrieve events for the deviceID. Requires since and before to be set as well.
+ region = (optional, string, `542f1868d341d51284b`)...The region's id of an event of type re.notifica.event.region.Session or re.notifica.event.beacon.Session
+ fence = (optional, string, `542f1868d341d51284b`)...The beacon's fence region id of an event of type re.notifica.event.beacon.Session
+ pass = (optional, string, `542f1868d341d51284b`)...The pass id of an event of type re.notifica.event.pass.Add, re.notifica.event.pass.Remove or re.notifica.event.pass.Redeem
+ serial = (optional, string, `111111-aaaa-bbbb-2222-333344445555`)...The pass serial of an event of type re.notifica.event.pass.Add, re.notifica.event.pass.Remove or re.notifica.event.pass.Redeem
+ group = (optional, string, `542f1868d341d51284b`)...The asset group's id of an event of type re.notifica.event.asset.Load
+ scannable = (optional, string, `542f1868d341d51284b`)...The scannable's id of an event of type re.notifica.event.scannable.Scan
+ notification = (optional, string, `542f1868d341d51284b`)...The notification's id of an event of type re.notifica.event.notification.Sent, re.notifica.event.notification.Receive, re.notifica.event.notification.Open or re.notifica.event.notification.Influenced
+ Response 200 (application/json; charset=utf-8)
{
"events":[
{
"_id":"542f1868d341d51284b",
"application":"5354f3545a544452ff4c7c0",
"userID":null,
"sessionID":"5SX4tAmO345juHL",
"time":"2014-10-03T21:43:04.231Z",
"type":"re.notifica.event.application.Install"
},
{
"_id":"542f153401d51284b",
"application":"5354f3545a544452ff4c7c0",
"userID":null,
"sessionID":"5SX4tAsd534MjuHL",
"time":"2014-10-03T21:43:04.231Z",
"type":"re.notifica.event.application.Install"
},
]
}
## Event [/event/{id}]
### Get Event [GET]
Get a specific event object.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ id (required, string, `542f1868d341d51284b`)...The event's Id.
+ Response 200 (application/json; charset=utf-8)
{
"event":{
"_id":"542f153401d51284b",
"application":"5354f3545a544452ff4c7c0",
"userID":null,
"sessionID":"5SX4tAsd534MjuHL",
"time":"2014-10-03T21:43:04.231Z",
"type":"re.notifica.event.application.Install"
}
}
## Custom Event [/event/custom/{type}/{userID}]
### Create Custom Event [POST]
Generate Custom Event for a specific User. Data sent in the payload can be accessed as placeholder data in automated notifications. In the example below, a placeholder `{{test}}` in an automated notification would be replaced by `a test value`.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `MyCustomEvent`)...The type of custom event. This event type is automatically prepended with `re.notifica.event.custom.` namespace to prevent collisions.
+ userID (required, string, `test@example.com`)...The user this event is triggered for. All automations and notification will apply to all of the devices of this user.
+ data (optional, object)...The data key,value pairs to be associated with this event. Data can be accessed as placeholder data in automated notifications.
+ Request (application/json; charset=utf-8)
{
"data": {
"test": "a test value"
}
}
+ Response 202 (application/json; charset=utf-8)
{
"message": "event is being processed"
}
# Group Export
Methods for exporting users and devices.
## Export Jobs [/export]
### Get Export Jobs [GET]
Get all export jobs for an application.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Response 200 (application/json; charset=utf-8)
{
"exportJobs":[
{
"_id":"54fec699beb5cb2f6f9839ed",
"application":"5354f08474adc4183214c143",
"data":null,
"result":"created export file export-user-1425983129369.csv (919 bytes)",
"date":"2015-03-10T10:25:29.340Z",
"status":"success",
"type":"re.notifica.export.User"
}
]
}
## Export Devices [/export/re.notifica.export.Device]
### Export Devices [POST]
Export all devices for an application. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ all (optional, boolean, `true`)...Specify if export job should include all devices, including inactive ones
+ includeTags (optional, boolean, `true`)...Specify if export job should include all device tags
+ tagsSeparator (optional, string, `-`)...Specify if export jobs should use a different separator for the tags. By default we will use |
+ Request (application/json; charset=utf-8)
{
"data": {
"all": true,
"includeTags": true,
"tagsSeparator": "-"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Users [/export/re.notifica.export.User]
### Export Users [POST]
Export all users for an application. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ all (optional, boolean, `true`)...Specify if export job should include all users, including inactive ones
+ showSegments (optional, object, `true`)...Specify if export job should include all segments. This property can also be an array of segment IDs, if you are looking to include only certain segments. Please note that export jobs will fail if you have users with more than 2000 segments
+ showCombinedSegments (optional, boolean, `true`)...When showSegments is true or it includes a list of segments, you can specify if export jobs should show all segments in one column or in separate columns.
+ useSegmentNames (optional, boolean, `true`)...When showSegments is true or it includes a list of segments, you can specify if export jobs should contain the name of the segments instead of their IDs
+ showPreferences (optional, boolean, `true`)...When showSegments is true or it includes a list of segments, you can specify if export jobs should also contain user selectable segments
+ Request (application/json; charset=utf-8)
{
"data": {
"all": true,
"showSegments": [
"5245bc5b3e66a3b01f0024d4",
"5245bc5b3e66a3b01f0024d5"
],
"showCombinedSegments": true
"useSegmentNames": true
"showPreferences": false
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export User Data [/export/re.notifica.export.UserData]
### Export User Data [POST]
Export all the data of a specific user. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ userID (optional, string, `john@doe.com`)...Specify which user you want to export data from
+ Request (application/json; charset=utf-8)
{
"data": {
"userID": "john@doe.com"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Regions [/export/re.notifica.export.Region]
### Export Regions [POST]
Export all regions for an application. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Beacons [/export/re.notifica.export.Beacon]
### Export Beacons [POST]
Export all beacons for an application. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Notifications [/export/re.notifica.export.Notification]
### Export Notifications [POST]
Export notifications for an application. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ all (optional, boolean, `true`)...Specify if export job should include all notifications, including archived ones
+ since (optional, string, `YYYY-MM-DD`)...Specify if export job should only include notifications created after a certain date
+ before (optional, string, `YYYY-MM-DD`)...Specify if export job should only include notifications created before a certain date
+ useSegmentNames (optional, boolean, `true`)...Specify if export jobs should contain the name of the segments instead of their IDs
+ Request (application/json; charset=utf-8)
{
"data": {
"all": true,
"since": "2018-01-01",
"before": "2018-12-01"
"useSegmentNames": true
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Replies [/export/re.notifica.export.Reply]
### Export Replies [POST]
Export replies for a specific notification. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ notification (required, string, `5245bc5b3e66a3b01f0024d4`)...The id of the notification you wish to export replies from
+ Request (application/json; charset=utf-8)
{
"data": {
"notification": "5245bc5b3e66a3b01f0024d4"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Events [/export/re.notifica.export.Event]
### Export Events [POST]
Export all the events for a certain type. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.event.notification.Open`)...The type of the event you wish to export records from
+ since (optional, string, `YYYY-MM-DD`)...Specify if export job should only include events created after a certain date
+ before (optional, string, `YYYY-MM-DD`)...Specify if export job should only include events created before a certain date
+ notification (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is any `re.notifica.event.notification.*`, optionally you can specify the ID of a notification to include only events for that notification
+ region (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is `re.notifica.event.region.Session`, optionally you can specify the ID of a region to include only events for that region
+ fence (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is `re.notifica.event.beacon.Session`, optionally you can specify the ID of a region (where the beacons are located) to include only events for those beacons
+ serial (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is any `re.notifica.event.pass.*`, optionally you can specify the serial of a pass to include only events for that pass
+ group (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is any `re.notifica.event.asset.*`, optionally you can specify the ID of an asset group to include only events for that asset group
+ scannable (optional, string, `5245bc5b3e66a3b01f0024d4`)...If type is any `re.notifica.event.scannable.*`, optionally you can specify the ID of a scannable to include only events for that scannable
+ Request (application/json; charset=utf-8)
{
"data": {
"type": "re.notifica.event.notification.Open",
"notification": "5245bc5b3e66a3b01f0024d4",
"since": "2018-01-01",
"before": "2018-12-01"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Campaigns [/export/re.notifica.export.Campaign]
### Export Campaigns [POST]
Export replies for a specific notification. This job might take some time to finish, check the export result endpoint to obtain information about the status of this export job.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ campaign (required, string, `5245bc5b3e66a3b01f0024d4`)...The id of the campaign you wish to export results from
+ Request (application/json; charset=utf-8)
{
"data": {
"campaign": "5245bc5b3e66a3b01f0024d4"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"exportJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Export Job [/export/{export}]
### Get Export Job [GET]
Get a specific export job object.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ export (required, string, `542f1868d341d51284b`)...The export job Id.
+ Response 200 (application/json; charset=utf-8)
{
"exportJob":{
"_id":"54fec699beb5cb2f6f9839ed",
"application":"5354f08474adc4183214c143",
"data": {
"all": true,
"includeTags": true,
"tagsSeparator": "|",
"useSegmentNames": true,
"showCombinedSegments": true,
"showPreferences": true,
"showSegments": ["5354f08474adc4183214c143"],
"since": "2017-01-12",
"before": "2017-01-13",
"type": "re.notifica.event.application.Open",
"region": "5354f08474adc4183214c143",
"fence": "5354f08474adc4183214c143",
"serial": "5354f08474adc4183214c143",
"notification": "5354f08474adc4183214c143",
"campaign": "5354f08474adc4183214c143",
"userID": "5354f08474adc4183214c143"
},
"result":"created export file export-user-1425983129369.csv (919 bytes)",
"date":"2015-03-10T10:25:29.340Z",
"status":"success",
"type":"re.notifica.export.User"
}
}
### Delete Export Job [DELETE]
Delete an export job. This operation cannot be undone.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ export (required, string, `5245bc5b3e66a3b01f0024d4`)...The id of an export job.
+ Response 200 (application/json; charset=utf-8)
{
"message":"export job deleted"
}
## Exports For Type [/export/fortype/{type}]
### Get Exports For Type [GET]
Get all export jobs of a specific type.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.export.User`)...The export type
+ Response 200 (application/json; charset=utf-8)
{
"exportJobs":[
{
"_id":"54fec699beb5cb2f6f9839ed",
"application":"5354f08474adc4183214c143",
"data": {
"all": true,
"includeTags": true,
"tagsSeparator": "|",
"useSegmentNames": true,
"showCombinedSegments": true,
"showPreferences": true,
"showSegments": ["5354f08474adc4183214c143"],
"since": "2017-01-12",
"before": "2017-01-13",
"type": "re.notifica.event.application.Open",
"region": "5354f08474adc4183214c143",
"fence": "5354f08474adc4183214c143",
"serial": "5354f08474adc4183214c143",
"notification": "5354f08474adc4183214c143",
"campaign": "5354f08474adc4183214c143",
"userID": "5354f08474adc4183214c143"
},
"result":"created export file export-user-1425983129369.csv (919 bytes)",
"date":"2015-03-10T10:25:29.340Z",
"status":"success",
"type":"re.notifica.export.User"
}
]
}
## Export Result [/export/result/{export}]
### Get Export Result [GET]
Get a specific export job result. This endpoint will only be available for export jobs with a status equal to success.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ export (required, string, `54fec699beb5cb2f6f9839ed`)...The id of a export job
## Export Download Link [/export/download/{export}]
### Create Export Download Link [POST]
Create a temporary download link of the export job results. This endpoint will only be available for export jobs with a status equal to success. Please also note that this link will only be available for 5 minutes. All export files will be located at https://push.notifica.re/export/download/{token}.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ export (required, string, `54fec699beb5cb2f6f9839ed`)...The id of a export job
+ Response 200 (application/json; charset=utf-8)
{
"token":"54fec699beb5cb2f6f9839ed/54fec699beb5cb2f6f9839ed",
"expires":"2015-03-10T10:25:29.340Z"
}
# Group Geo
Methods for retrieving information about timezone, country, forward and reverse geocoding.
## Timezone Information [/geo/timezone]
### Get Timezone Information [GET]
Get information about a timezone and country for a given latitude or longitude.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ latitude (required, number, `52`)...The latitude
+ longitude (required, number, `2`)...The longitude
+ Response 200 (application/json; charset=utf-8)
{
"timezone":{
"_id":"54fec699beb5cb2f6f9839ed",
"referenceKey":"276",
"abbreviation": "CET",
"countryCode":"NL",
"start":"2015-03-10T10:25:29.340Z",
"name":"Europe/Amsterdam",
"countryName":"Netherlands",
"dst": false,
"timeZoneOffset": 1
}
}
## Forward Geocoding [/geo/search]
### Get Forward Geocoding [GET]
Get information about latitude and longitude of a given address, place, city or country.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ search (required, string, `Meerum`)...The address to search for
+ Response 200 (application/json; charset=utf-8)
{
"locations": [
{
"license":"Data (c) OpenStreetMap...",
"displayName":"16, Marconistraat, Rotterdam, Netherlands",
"boundingBox": [52, 52, 2, 2],
"address":"Marconistraat 16",
"latitude": 52,
"longitude": 2
},
{
"license":"Data (c) OpenStreetMap...",
"displayName":"16, Marconistraat, Rotterdam, Netherlands",
"boundingBox": [52, 52, 2, 2],
"address":"Marconistraat 16",
"latitude": 52,
"longitude": 2
}
]
}
## Reverse Geocoding [/geo/reverse]
### Get Reverse Geocoding [GET]
Get information about an address for a given latitude and longitude.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ latitude (required, number, `52`)...The latitude
+ longitude (required, number, `2`)...The longitude
+ Response 200 (application/json; charset=utf-8)
{
"locations": {
"license":"Data (c) OpenStreetMap...",
"displayName":"16, Marconistraat, Rotterdam, Netherlands",
"boundingBox": [52, 52, 2, 2],
"address":"Marconistraat 16"
}
}
# Group Import
Methods for importing collections of items. Files are assumed to be uploaded to Notificare Storage before they can be used in a new import. Use this [endpoint](http://docs.notificare.apiary.io/#reference/upload) to upload a file.
## Import Jobs [/import]
### Get Import Jobs [GET]
Get all the import objects.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Response 200 (application/json; charset=utf-8)
}
"importJobs":[{
"_id":"545cc517ff584870b89fb98",
"account":"50d771ff87e53afff2600001c",
"application":"5354f0bbdddd4452ff4c7c0",
"path":"/imports/3d99d18148e6f3dbcf4ffccc...",
"data":{
"user_segment":"53a0a047fff17d3215a94f6",
"clear":false
},
"result":"imported 0 records, skipped 3 records",
"date":"2014-11-07T13:11:51.316Z",
"status":"success",
"type":"re.notifica.import.UserSegment"
}]
}
## Import Jobs For Type [/import/{type}]
### Get Import Jobs For Type [GET]
Get all the import objects by type.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.import.UserSegment`)...The import type of a previously created job.
+ Response 200 (application/json; charset=utf-8)
}
"importJobs":[{
"_id":"545cc517ff584870b89fb98",
"account":"50d771ff87e53afff2600001c",
"application":"5354f0bbdddd4452ff4c7c0",
"path":"/imports/3d99d18148e6f3dbcf4ffccc...",
"data":{
"user_segment":"53a0a047fff17d3215a94f6",
"clear":false
},
"result":"imported 0 records, skipped 3 records",
"date":"2014-11-07T13:11:51.316Z",
"status":"success",
"type":"re.notifica.import.UserSegment"
}]
}
## Import [/import/{import}]
### Get Import [GET]
Get an import object.
This request is authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ import (required, string, `5245bc5b3e66a3b01f0024d4`)...The import id of a previously created job.
+ Response 200 (application/json; charset=utf-8)
{
"importJob":{
"_id":"545cc517ff584870b89fb98",
"account":"50d771ff87e53afff2600001c",
"application":"5354f0bbdddd4452ff4c7c0",
"path":"/imports/3d99d18148e6f3dbcf4ffccc...",
"data":{
"user_segment":"53a0a047fff17d3215a94f6",
"clear":false
},
"result":"imported 0 records, skipped 3 records",
"date":"2014-11-07T13:11:51.316Z",
"status":"success",
"type":"re.notifica.import.UserSegment"
}
}
## Import Devices [/import/re.notifica.import.Device]
### Import Devices [POST]
Used to import a list of devices. Every row in the referenced CSV should include at least a `deviceID`, `osVersion`, `appVersion` and `platform`.
The device properties can also be defaulted to whatever you put in the `data` field in the request.
There is one option in this import type, which is `overwrite`, defaults to `false`.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ deviceID (should be a valid APNS, FCM or Safari Website Push token)
+ osVersion
+ appVersion
+ sdkVersion
+ platform (iOS, Android)
+ osString (defaults to platform + osVersion)
+ deviceString (defaults to 'unknown')
+ tags, by default separated by `|`, if you use something else, don't forget to specify it in `tagsSeparator`
+ lastActive (ISO Date, defaults to current date/time)
+ longitude
+ latitude
+ locationLastUpdated (ISO Date, defaults to lastActive)
+ timeZoneOffset
+ userID (If the userID doesn't exist yet, a new user will be created. If omitted, an anonymous user will be generated.)
+ userName (only used when userID is present. Defaults to 'anonymous')
+ Parameters
+ type (required, string, `re.notifica.import.Device`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"overwrite": false,
"osVersion": null,
"platform": null,
"appVersion": null,
"includeTags: true,
"tagsSeparator": "-"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Users [/import/re.notifica.import.User]
### Import Users [POST]
Used to import a list of users. Every row in the referenced CSV should include at least a `userID`. userName is optional and defaults to `anonymous`. This import type has no extra settings.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ userID
+ userName
+ Parameters
+ type (required, string, `re.notifica.import.User`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data": null
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Users Into Segment [/import/re.notifica.import.UserSegment]
### Import Users Into Segment [POST]
Used to import a list of users into a segment. Every row in the referenced CSV should contain a `userID`.
The user segment to import into should be set as the `userSegment` property of `data`.
There is one option in this import type, which is `clear`. If set, it clears the segment before importing users, otherwise it just adds users. It defaults to `false`.
Additionally you can also send or schedule a push notification whenever the import is finished. For that make sure you have previously created at least one template and then provide its Id in `notificationTemplate` and `push` as true as properties in the `data` object.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ userID
+ Parameters
+ type (required, string, `re.notifica.import.Device`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"push": false,
"userSegment": "dfeba0ade92ad65ec8619d4464333",
"clear": false,
"notificationTemplate": "dfeba0ade92ad65ec8619d4464333",
"notificationSchedule: {
"time": "YYYY-MM-DD HH:mm"",
"timezone": "Europe/Amsterdam",
"local": false
}
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Regions [/import/re.notifica.import.Region]
### Import Regions [POST]
Used to import a list of regions. Regions can have a circular geometry, i.e., latitude/longitude plus a distance, or an advanced Polygon geometry. If only an advanced geometry is given, the import job will calculate an enclosing circle automatically. If no timezone or country are given, these will also be calculated automatically.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ referenceKey
+ name
+ description
+ address
+ tags, separated by `|`
+ category, (`fence`, `poi`, `county`, `city`, `country`). Defaults to `fence`.
+ latitude for circular geometry
+ longitude for circular geometry
+ distance for circular geometry
+ coordinates (pairs of `longitude:latitude`, separated by `|`) for advanced geometry
+ major to be used for beacons in the region
+ timezone, defaults to `UTC`
+ timeZoneOffset, defaults to `0`
+ country
+ Parameters
+ type (required, string, `re.notifica.import.Region`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data": null
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Beacons [/import/re.notifica.import.Beacon]
### Import Beacons [POST]
Used to import a list of beacons. If no region with a given major exists, and the `createRegion` property of `data` is set, a new region is created automatically with the same location as the beacon and default values for `category`, `timezone` and `distance`, or `fence`, `UTC` and `100` respectively.
If no region was found or none could be created, the import row is skipped.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ major
+ minor
+ name
+ purpose, (`general`, `pay`, `info`, `staff`, `admin`, `other`). Defaults to `general`.
+ latitude, defaults to region latitude
+ longitude, defaults to region longitude
+ timezone, defaults to `UTC`
+ notification, message to be set for the beacon
+ Parameters
+ type (required, string, `re.notifica.import.Beacon`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"createRegion": true,
"timezone": "Europe/Amsterdam",
"distance": "100"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Passes [/import/re.notifica.import.Pass]
### Import Passes [POST]
Used to bulk import passes and optionally send them in a push notification. To send a notification, set data property `push` to `true` and set a `message`, `title`, `subtitle` in the data or in the CSV.
Set data property `passbook` to the passbook template Id to use.
Data property `passData` can be used to set default values that will be set if not present in the CSV. Recognized properties in `passData` are
`description`, `barcode.message`, `barcode.altText`, `location.latitude`, `location.longitude`, `location.altitude`, `location.regionMajor`, `location.regionId`, `location.relevantText`, `beacon.proximityUUID`, `beacon.major`, `beacon.minor`, `beacon.relevantText`.
The property `passFields` inside `passData` can be used to include default values for fields from the Passbook Template.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ userID (to send push notification to)
+ pass_barcode (if barcode is unique, can be used for redeem)
+ pass_barcode_message (not unique, cannot be together with pass_barcode)
+ pass_barcode_alt_text
+ pass_barcode_show_alt_text
+ pass_relevant_date
+ pass_expiration_date
+ pass_location_latitude
+ pass_location_longitude
+ pass_location_altitude
+ pass_location_relevant_text
+ pass_location_region_major
+ pass_location_region_id
+ pass_xxx (where xxx is any field defined in the Passbook Template)
+ Parameters
+ type (required, string, `re.notifica.import.Pass`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"passbook": "5245bc5b3e66a3b01fa66355",
"push": true,
"description": null,
"message": "This is your boarding pass",
"passData": {
"relevantDate": "2018-01-01T12:00:00",
"passFields": {
"from": "AMS",
"to": "OPO"
}
}
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Private Messages [/import/re.notifica.import.Notification]
### Import Private Messages [POST]
Used to import a list of private messages to users or devices. Every row in the referenced CSV should contain at least a `userID` or a `deviceID`.
Optionally, a Notification Template can be used to create the notifications. For that make sure you have previously created at least one template and then provide its Id in `notificationTemplate`.
If no template is provided, each row should contain a `message`. Values present in the CSV will overwrite corresponding fields from the template, if provided.
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ userID / deviceID (if both are provided, userID is used)
+ title
+ subtitle
+ message
+ attachmentUri (lock screen image, publicly accessible image URL)
+ attachmentMimeType (`image/png`, `image/jpeg`)
+ ttl
+ sound
+ extra (JSON string)
+ notification_xxx (referring to a placeholder in the template)
`title`, `subtitle`, and `message` can contain placeholders in the form of `{{notification_xxxx}}` or any of the default placeholders, e.g. `{{userID}}` or `{{userName}}`.
+ Parameters
+ type (required, string, `re.notifica.import.Notification`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"notificationTemplate": null,
"message": "This is my private message"
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
## Import Grouped Messages [/import/re.notifica.import.GroupedNotification]
### Import Grouped Messages [POST]
Used to import a list of users or devices to send a notification to. Every row in the referenced CSV should contain at least a `userID` or a `deviceID`.
A Notification Template must be used to create the notifications. For that make sure you have previously created at least one template and then provide its Id in `notificationTemplate`.
Values of columns prefixed with `notification_` in the CSV can be used as placeholders in the template
This request is authenticated with the `applicationKey` and `masterSecret`.
Recognized columns in your .csv file are:
+ userID / deviceID (if both are provided, userID is used)
+ notification_xxx (referring to a placeholder `{{notification_xxx}}` in the template)
+ Parameters
+ type (required, string, `re.notifica.import.GroupedNotification`)...The import type
+ Request (application/json; charset=utf-8)
{
"path":"/imports/647431c4dc3798f2a5ae147411a787e8d52447e365d7972ec4d8535/dfeba0ade92ad65ec8619d4464333facc95f5c2feb55df98a92a78",
"data":{
"notificationTemplate": "dfeba0ade92ad65ec8619d4464333",
"notificationSchedule: {
"time": "YYYY-MM-DD HH:mm"",
"timezone": "Europe/Amsterdam",
"local": false
}
}
}
+ Response 201 (application/json; charset=utf-8)
{
"importJob": {
"id": "5245bc5b3e66a3b01f0024d4"
}
}
# Group Notification
Methods to create, send and schedule notifications to a specific target audience, user or device.
Combines User, Segments, Tags and the location of the devices to provide you a powerful device selection query for your campaigns.
The 3 most important things to have in consideration when creating a new message is that `message` is always mandatory, the property `type` defines which type of content should be presented to the user and the combination of `message`, `extra`, `sound`, `badge` should be no bigger than 200 bytes.
You can send several types of content in your message. The array `content` should contain one or more objects according to the `type` of message.
You can also add an array `actions` to your notifications by simply providing one or more objects.
## Notification Types:
| type | description |
|:---------:|-------------|
| re.notifica.notification.Alert | The simplest form of notifications, it will display the message in a dialog/alert window. It does not require a content object. You can although add Action objects to it, actions will be added to the window as buttons. |
| re.notifica.notification.WebView | This type allows you to show any piece of HTML in a native WebView. It requires a Content object of type `re.notifica.content.HTML`. You can additionally add Action objects to this type of Notification. |
| re.notifica.notification.URL | Use this type to open any URL in a native WebView. It requires a Content object of type `re.notifica.content.URL`. You can additionally add Action objects to this type of Notification. |
| re.notifica.notification.Image | Add one or more images to your notifications. It requires one or more Content objects of types `re.notifica.content.JPEG`, `re.notifica.content.PNG` or `re.notifica.content.GIF`. You can additionally add Action objects to this type of Notification. |
| re.notifica.notification.Map | This type of notifications will use the device's native maps to display one or more locations. It requires one or more Content objects of type `re.notifica.content.Marker`. You can additionally add Action objects to this type of Notification. |
| re.notifica.notification.Rate | This type is used exclusively to send a dialog window with three Action objects included. The user can then choose to rate the app in App Store/Google Play, to be remembered later to rate or to not rate at all. This type of Notification does not require any Content object. Also you cannot add any more Action objects to this type of Notification. |
| re.notifica.notification.Passbook | Use this type to easily send .pkpass files in your push notifications. Distribute your Passbook Passes directly to your app users. This type does not allow any Action objects. |
| re.notifica.notification.Video | This type of notifications is used to send video content to your users. It requires one of these three types of content: `re.notifica.content.YouTube`, `re.notifica.content.Vimeo` or `re.notifica.content.HTML5Video`. You can additionally add Action objects to this type of Notification. This type is only available for SDKs 1.8.0 and up. |
| re.notifica.notification.URLScheme | Use this type of notifications to deep link messages to areas of your app. You will need to make sure your app responds to these URL Schemes by providing them in you app's Info.plist (iOS) or AndroidManifest.xml (Android). This type is only available for SDKs 1.8.0 and up. |
| re.notifica.notification.None | Use this type if you do not wish to show any UI in Notificare but still make sure we log the open notification event and be able to see these in the dashboard. When using this type you can still handle the notifications yourself so it is possible to still include content, actions or extra parameters. This type is only available for SDKs 1.8.0 and up. |
## Content Objects:
| type | data |
|:---------:|-------------|
| re.notifica.content.Text | string (eg.: "Hello World!") |
| re.notifica.content.HTML | string (eg.: "\<h1>Hello World!\</h1>") |
| re.notifica.content.URL | string (eg.: "http://notifica.re") |
| re.notifica.content.Image | string (eg.: "https://s3-eu-west-1.amazonaws.com/notificare-storage/notifications/9fd.../6ccd..") |
| re.notifica.content.Marker | object (eg.: {"title":"Some Place", "description":"Some description about that place", "latitude": 4.098765, "longitude": 5.08875}) |
| re.notifica.content.PKPass | string (eg.: "http://notifica.re/path/to/my/pass.pkpass") |
| re.notifica.content.YouTube | string (eg.: "3t_EN-HZVLw") |
| re.notifica.content.Vimeo | string (eg.: "75196023") |
| re.notifica.content.HTML5Video | string (eg.: "https://push.notifica.re/asset/file/3d99d18.../1b029...") |
## Action Objects:
| type | label | target | keyboard | camera | rules |
|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
| re.notifica.action.Callback | string (eg.: "open cam") | string (eg.: "http://api.notifica.re/register?action=xpto&var=xyz") | boolean | boolean | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.Telephone | string (eg.: "make a call") | string (eg.: "tel:0500666858") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.SMS | string (eg.: "send sms") | string (eg.: "0500666858") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.Mail | string | string (eg.: "me@company.com","you@company.com") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.Browser | string (eg.: "open notifica.re") | string (eg.:"http://notifica.re") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.App | string (e.g., "open facebook") | string (eg.: "fb://") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
| re.notifica.action.Custom | string (eg.: "open tab") | string (eg.: "openTabInMyCode") | n/a | n/a | array (eg.: [{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]) |
## Rules Objects:
| type | params |
|:---------:|-------------|
| re.notifica.rule segment.Add | array of segment Ids (eg.: ["532434df434657df4664","532434df434657df4664"]) |
| re.notifica.rule segment.Remove | array of segment Ids (eg.: ["532434df434657df4664","532434df434657df4664"]) |
| re.notifica.rule tag.Add | array of tags (eg.: ["tag_news","tag_press"]) |
| re.notifica.rule tag.Remove | array of tags (eg.: ["tag_news","tag_press"]) |
## Notification Broadcast [/notification/broadcast]
### Create Notification Broadcast [POST]
Send a message to **all** devices.
You can also schedule a broadcast, if `scheduled` is true you should immediately use /notification/schedule to create the schedule task.
This request must be authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.notification.Alert`)...Defines the type of content to show. Types of notifications are represented by namespaces. Notification types should be match the following namespace: re.notifica.notification.*. Please refer to Notification Types for all available types.
+ title (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ subtitle (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ message (required, string, `Hello World`)...Short and concise message. This is the first thing your user sees, make sure it is relevant and that somehow summarizes what you intend to say.
+ ttl (optional, number, `3600`)...Number of seconds the message will be attempted to be delivered by APNS or GCM.
+ content (optional, array, `[{"type":"re.notifica.content.HTML",data:"<h1>Hello</h1>"}]`)...An array of Content objects according to the type of Notification. Please refer to Content types for all available types.
+ attachments (optional, object, `[{"uri":"https://domain.com/image","mimeType":"image/jpg"}]`)...An object containing the URL to an image either uploaded into our platform or hosted in any public web server.
+ location (optional, object, `{"latitude":2.3455,"longitude":4.5667, distance: 10}`)...An object representing the geo-target. Where distance is represented in kilometers. When location is provided only devices in that location will receive the notification.
+ actionCategory (optional, string, `My Template`)...Use a previously created Rich Push template for your message. Use the name of the template for this property and the actions in that template as the actions for this notification. This will enable actionable notifications from the notification center in both iOS and Android.
+ actions (optional, array, `[{"type":"re.notifica.action.Callback", "label":"Yes", "target": null, "keyboard": false, "camera": false, rules": [{"type":"re.notifica.rule.segment.Add", params: ["532434df434657df4664"]}]}]`)...Adds one or more interactions to a notification. An array of Action objects. Please refer to Action objects for all types available.
+ rules (optional, array, `[{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]`)...Adds one or more rules to a notification. An array of rules objects. Please refer to Rules objects for all types available.
+ languages (optional, array, `['en-US','en-GB']`)...The list of localized content language identifiers used in localizedContent. When included, you must also provide a list of localizedContent objects in the same order.
+ localizedContent (optional, array, `[{"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}, {"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}]`)...Provides content for all the language identifiers provided in languages.
+ sound (optional, string, `default`)...Name of sound to play. `default` means use the default sound as set by the user, any other string will be looked up as sound file on the device (`mp3` on Android, `aiff` on iOS).
+ lights (optional, object, `{"color":"","on":"","off":""}`)...An object containing a color string ("white", "red", "#rrggbb", "#aarrggbb") and the on/off time in milliseconds. Colors are only applicable to Android and will be displayed by hardware as accurately as possible.
+ badge (optional, number, `2`)...This is an iOS only property. A badge will be displayed over your app icon whenever a notification arrives. Use a number from 1 to 9999.
+ scheduled (optional, boolean, `true`)...When true will prevent the message from being sent. Additionaly you will have to create a schedule task by calling the /notification/schedule.
+ push (optional, boolean, `true`)...This property is only available for SDKs 1.8.0 and up. When false it will only create a message in the app's inbox and not generate a remote notification. By default this property will be true. Please note that this property will be ignored if Inbox is not being used.
+ rate (optional, number, `100`)...The rate at which we will send notifications in seconds. If provided, we will not send more than x messages per second.
+ extra (optional, object, `{"mykey":"myvalue"}`)...A valid one-level JSON object. This is useful if you need to send extra data that you will need to process soon the notification arrives.
+ Request (application/json)
{
"title":"This is a title",
"subtitle":"This is a subtitle",
"message":"Hello world!",
"type":"re.notifica.notification.Alert",
"ttl":3600,
"sound":"default",
"scheduled": true,
"content": [
{
"type":"re.notifica.content.Text",
"data":"Because this long text will never fit inside a simple alert or toast, we send it along as content and it will be automatically displayed when the user opens the notification"
}
],
"actions":[
{
"type":"re.notifica.action.Callback",
"label":"Please come in",
"rules": [{"type":"re.notifica.rule.segment.Add", "params":["3445bc5b4563b01f0f5"]}]
},
{
"type":"re.notifica.action.Callback",
"label":"Go away",
"rules": []
}
]
}
+ Response 201 (application/json; charset=utf-8)
{
"_id":"5245bc5b3e66a3b01f0024d4",
"message":"notifications are queued"
}
## Notification By Tags [/notification/tags]
### Create Notification By Tags [POST]
Send a message to devices with any of the specified `tags`.
You can also schedule these message, if `scheduled` is true you should immediately use /notification/schedule to create a schedule task.
The request accepts an array of tags. This request must be authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.notification.Alert`)...Defines the type of content to show. Types of notifications are represented by namespaces. Notification types should be match the following namespace: re.notifica.notification.*. Please refer to Notification Types for all available types.
+ title (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ subtitle (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ message (required, string, `Hello World`)...Short and concise message. This is the first thing your user sees, make sure it is relevant and that somehow summarizes what you intend to say.
+ ttl (optional, number, `3600`)...Number of seconds the message will be attempted to be delivered by APNS or GCM.
+ content (optional, array, `[{"type":"re.notifica.content.HTML",data:"<h1>Hello</h1>"}]`)...An array of Content objects according to the type of Notification. Please refer to Content types for all available types.
+ attachments (optional, object, `[{"uri":"https://domain.com/image","mimeType":"image/jpg"}]`)...An object containing the URL to an image either uploaded into our platform or hosted in any public web server.
+ location (optional, object, `{"latitude":2.3455,"longitude":4.5667, distance: 10}`)...An object representing the geo-target. Where distance is represented in kilometers. When location is provided only devices in that location will receive the notification.
+ actionCategory (optional, string, `My Template`)...Use a previously created Rich Push template for your message. Use the name of the template for this property and the actions in that template as the actions for this notification. This will enable actionable notifications from the notification center in both iOS and Android.
+ actions (optional, array, `[{"type":"re.notifica.action.Callback", "label":"Yes", "target": null, "keyboard": false, "camera": false, rules": [{"type":"re.notifica.rule.segment.Add", params: ["532434df434657df4664"]}]}]`)...Adds one or more interactions to a notification. An array of Action objects. Please refer to Action objects for all types available.
+ rules (optional, array, `[{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]`)...Adds one or more rules to a notification. An array of rules objects. Please refer to Rules objects for all types available.
+ languages (optional, array, `['en-US','en-GB']`)...The list of localized content language identifiers used in localizedContent. When included, you must also provide a list of localizedContent objects in the same order.
+ localizedContent (optional, array, `[{"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}, {"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}]`)...Provides content for all the language identifiers provided in languages.
+ sound (optional, string, `default`)...Name of sound to play. `default` means use the default sound as set by the user, any other string will be looked up as sound file on the device (`mp3` on Android, `aiff` on iOS).
+ lights (optional, object, `{"color":"","on":"","off":""}`)...An object containing a color string ("white", "red", "#rrggbb", "#aarrggbb") and the on/off time in milliseconds. Colors are only applicable to Android and will be displayed by hardware as accurately as possible.
+ badge (optional, number, `2`)...This is a iOS only property. A badge will be displayed over your app icon whenever a notification arrives. Use a number from 1 to 9999.
+ scheduled (optional, boolean, `true`)...When true will prevent the message from being sent. Additionaly you will have to create a schedule task by calling the /notification/schedule.
+ push (optional, boolean, `true`)...This property is only available for SDKs 1.8.0 and up. When false it will only create a message in the app's inbox and not generate a remote notification. By default this property will be true. Please note that this property will be ignored if Inbox is not being used.
+ rate (optional, number, `100`)...The rate at which we will send notifications in seconds. If provided, we will not send more than x messages per second.
+ extra (optional, object, `{"mykey":"myvalue"}`)...A valid one-level JSON object. This is useful if you need to send extra data that you will need to proccess soon the notification arrives.
+ Request (application/json)
{
"tags":["test1","test2"],
"title":"This is a title",
"subtitle":"This is a subtitle",
"message":"Hello world!",
"type":"re.notifica.notification.Alert",
"ttl":3600,
"sound":"default",
"scheduled":false,
"content": [
{
"type":"re.notifica.content.Text",
"data":"Because this long text will never fit inside a simple alert or toast, we send it along as content and it will be automatically displayed when the user opens the notification"
}
],
"actions":[
{
"type":"re.notifica.action.Callback",
"label":"Please come in",
"rules": [{"type":"re.notifica.rule.segment.Add", "params":["3445bc5b4563b01f0f5"]}]
},
{
"type":"re.notifica.action.Callback",
"label":"Go away",
"rules": [],
}
]
}
+ Response 201 (application/json; charset=utf-8)
{
"_id":"5245bc5b3e66a3b01f0024d4",
"message":"notifications are queued"
}
## Notification By Segments [/notification/segments]
### Create Notification By Segments [POST]
Send a message to users in one or more of the specified `segments`.
You can also schedule these messages, if `scheduled` is true you should immediately use /notification/schedule to create a schedule task.
The request accepts an array of Segment Ids. This request must be authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ segments (required, array, `["526f7a71dab9d70711000003","526f7a71dab9d70711000004"]`)...The segments of users to send to.
+ tags (optional, array, `["test"]`)...Only send to devices that have one or more of these tags.
+ type (required, string, `re.notifica.notification.Alert`)...Defines the type of content to show. Types of notifications are represented by namespaces. Notification types should be match the following namespace: re.notifica.notification.*. Please refer to Notification Types for all available types.
+ title (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ subtitle (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ message (required, string, `Hello World`)...Short and concise message. This is the first thing your user sees, make sure it is relevant and that somehow summarizes what you intend to say.
+ ttl (optional, number, `3600`)...Number of seconds the message will be attempted to be delivered by APNS or GCM.
+ content (optional, array, `[{"type":"re.notifica.content.HTML",data:"<h1>Hello</h1>"}]`)...An array of Content objects according to the type of Notification. Please refer to Content types for all available types.
+ attachments (optional, object, `[{"uri":"https://domain.com/image","mimeType":"image/jpg"}]`)...An object containing the URL to an image either uploaded into our platform or hosted in any public web server.
+ location (optional, object, `{"latitude":2.3455,"longitude":4.5667, distance: 10}`)...An object representing the geo-target. Where distance is represented in kilometers. When location is provided only devices in that location will receive the notification.
+ actionCategory (optional, string, `My Template`)...Use a previously created Rich Push template for your message. Use the name of the template for this property and the actions in that template as the actions for this notification. This will enable actionable notifications from the notification center in both iOS and Android.
+ actions (optional, array, `[{"type":"re.notifica.action.Callback", "label":"Yes", "target": null, "keyboard": false, "camera": false, rules": [{"type":"re.notifica.rule.segment.Add", params: ["532434df434657df4664"]}]}]`)...Adds one or more interactions to a notification. An array of Action objects. Please refer to Action objects for all types available.
+ rules (optional, array, `[{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]`)...Adds one or more rules to a notification. An array of rules objects. Please refer to Rules objects for all types available.
+ languages (optional, array, `['en-US','en-GB']`)...The list of localized content language identifiers used in localizedContent. When included, you must also provide a list of localizedContent objects in the same order.
+ localizedContent (optional, array, `[{"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}, {"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}]`)...Provides content for all the language identifiers provided in languages.
+ sound (optional, string, `default`)...Name of sound to play. `default` means use the default sound as set by the user, any other string will be looked up as sound file on the device (`mp3` on Android, `aiff` on iOS).
+ lights (optional, object, `{"color":"","on":"","off":""}`)...An object containing a color string ("white", "red", "#rrggbb", "#aarrggbb") and the on/off time in milliseconds. Colors are only applicable to Android and will be displayed by hardware as accurately as possible.
+ badge (optional, number, `2`)...This is a iOS only property. A badge will be displayed over your app icon whenever a notification arrives. Use a number from 1 to 9999.
+ scheduled (optional, boolean, `true`)...When true will prevent the message from being sent. Additionaly you will have to create a schedule task by calling the /notification/schedule.
+ push (optional, boolean, `true`)...This property is only available for SDKs 1.8.0 and up. When false it will only create a message in the app's inbox and not generate a remote notification. By default this property will be true. Please note that this property will be ignored if Inbox is not being used.
+ rate (optional, number, `100`)...The rate at which we will send notifications in seconds. If provided, we will not send more than x messages per second.
+ extra (optional, object, `{"mykey":"myvalue"}`)...A valid one-level JSON object. This is useful if you need to send extra data that you will need to proccess soon the notification arrives.
+ Request (application/json)
{
"segments":["526f7a71dab9d70711000003","526f7a71dab9d70711000004"],
"title":"This is a title",
"subtitle":"This is a subtitle",
"message":"Hello world!",
"type":"re.notifica.notification.Alert",
"ttl":3600,
"sound":"default",
"scheduled":true,
"content": [
{
"type":"re.notifica.content.Text",
"data":"Because this long text will never fit inside a simple alert or toast, we send it along as content and it will be automatically displayed when the user opens the notification"
}
],
"actions":[
{
"type":"re.notifica.action.Callback",
"label":"Please come in",
"rules": [{"type":"re.notifica.rule.segment.Add", "params":["3445bc5b4563b01f0f5"]}]
},
{
"type":"re.notifica.action.Callback",
"label":"Go away",
"rules": [{"type":"re.notifica.rule.segment.Remove", "params":["3445bc5b4563b01f0f5"]}]
}
]
}
+ Response 201 (application/json; charset=utf-8)
{
"_id":"5245bc5b3e66a3b01f0024d4",
"message":"notifications are queued"
}
## Notification By Events [/notification/event]
### Create Notification By Events [POST]
Send a message to any device that executed an event.
You can also schedule a notification based on events, if `scheduled` is true you should immediately use /notification/schedule to create the schedule task.
This request must be authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ type (required, string, `re.notifica.notification.Alert`)...Defines the type of content to show. Types of notifications are represented by namespaces. Notification types should be match the following namespace: re.notifica.notification.*. Please refer to Notification Types for all available types.
+ title (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ subtitle (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ message (required, string, `Hello World`)...Short and concise message. This is the first thing your user sees, make sure it is relevant and that somehow summarizes what you intend to say.
+ ttl (optional, number, `3600`)...Number of seconds the message will be attempted to be delivered by APNS or GCM.
+ content (optional, array, `[{"type":"re.notifica.content.HTML",data:"<h1>Hello</h1>"}]`)...An array of Content objects according to the type of Notification. Please refer to Content types for all available types.
+ attachments (optional, object, `[{"uri":"https://domain.com/image","mimeType":"image/jpg"}]`)...An object containing the URL to an image either uploaded into our platform or hosted in any public web server.
+ location (optional, object, `{"latitude":2.3455,"longitude":4.5667, distance: 10}`)...An object representing the geo-target. Where distance is represented in kilometers. When location is provided only devices in that location will receive the notification.
+ actionCategory (optional, string, `My Template`)...Use a previously created Rich Push template for your message. Use the name of the template for this property and the actions in that template as the actions for this notification. This will enable actionable notifications from the notification center in both iOS and Android.
+ actions (optional, array, `[{"type":"re.notifica.action.Callback", "label":"Yes", "target": null, "keyboard": false, "camera": false, rules": [{"type":"re.notifica.rule.segment.Add", params: ["532434df434657df4664"]}]}]`)...Adds one or more interactions to a notification. An array of Action objects. Please refer to Action objects for all types available.
+ rules (optional, array, `[{"type":"re.notifica.rule.segment.Add",params:["532434df434657df4664"]}]`)...Adds one or more rules to a notification. An array of rules objects. Please refer to Rules objects for all types available.
+ languages (optional, array, `['en-US','en-GB']`)...The list of localized content language identifiers used in localizedContent. When included, you must also provide a list of localizedContent objects in the same order.
+ localizedContent (optional, array, `[{"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}, {"title":"My Title", "subtitle":"My Subtitle", "content":[], "actions":[], "attachments":[]}]`)...Provides content for all the language identifiers provided in languages.
+ sound (optional, string, `default`)...Name of sound to play. `default` means use the default sound as set by the user, any other string will be looked up as sound file on the device (`mp3` on Android, `aiff` on iOS).
+ lights (optional, object, `{"color":"","on":"","off":""}`)...An object containing a color string ("white", "red", "#rrggbb", "#aarrggbb") and the on/off time in milliseconds. Colors are only applicable to Android and will be displayed by hardware as accurately as possible.
+ badge (optional, number, `2`)...This is an iOS only property. A badge will be displayed over your app icon whenever a notification arrives. Use a number from 1 to 9999.
+ scheduled (optional, boolean, `true`)...When true will prevent the message from being sent. Additionaly you will have to create a schedule task by calling the /notification/schedule.
+ push (optional, boolean, `true`)...This property is only available for SDKs 1.8.0 and up. When false it will only create a message in the app's inbox and not generate a remote notification. By default this property will be true. Please note that this property will be ignored if Inbox is not being used.
+ rate (optional, number, `100`)...The rate at which we will send notifications in seconds. If provided, we will not send more than x messages per second.
+ extra (optional, object, `{"mykey":"myvalue"}`)...A valid one-level JSON object. This is useful if you need to send extra data that you will need to process soon the notification arrives.
+ Request (application/json)
{
"title":"This is a title",
"subtitle":"This is a subtitle",
"message":"Hello world!",
"type":"re.notifica.notification.Alert",
"eventCriteria": {
"type": "re.notifica.notification.Open",
"startDate": "01-01-2017 01:00",
"endDate": "01-02-2017 01:00",
"data": {
"notification": "3445bc5b4563b01f0f5",
"region": null,
"fence": null,
"serial": null
}
}
"ttl":3600,
"sound":"default",
"scheduled": true,
"content": [
{
"type":"re.notifica.content.Text",
"data":"Because this long text will never fit inside a simple alert or toast, we send it along as content and it will be automatically displayed when the user opens the notification"
}
],
"actions":[
{
"type":"re.notifica.action.Callback",
"label":"Please come in",
"rules": [{"type":"re.notifica.rule.segment.Add", "params":["3445bc5b4563b01f0f5"]}]
},
{
"type":"re.notifica.action.Callback",
"label":"Go away",
"rules": []
}
]
}
+ Response 201 (application/json; charset=utf-8)
{
"_id":"5245bc5b3e66a3b01f0024d4",
"message":"notifications are queued"
}
## Notification By Criteria [/notification/criteria]
### Create Notification By Criteria [POST]
Send a message to devices that match a certain criteria.
You can also schedule these messages, if `scheduled` is true you should immediately use /notification/schedule to create a schedule task.
The request accepts an array of Segment Ids. This request must be authenticated with the `applicationKey` and `masterSecret`.
+ Parameters
+ criteria (required, object, `{"segmentsCriteria":[{"quantifier":"any","segments":["5440d30cd636d7450f5c0032","53bbc7836b354d54e29752e3"]}]}`)...The criteria to use.
+ type (required, string, `re.notifica.notification.Alert`)...Defines the type of content to show. Types of notifications are represented by namespaces. Notification types should be match the following namespace: re.notifica.notification.*. Please refer to Notification Types for all available types.
+ title (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ subtitle (optional, string, `Hello World`)...Small text shown in the device's lock screen or notification center. This field should be used as an helper text to the message. Please note that this is only supported by iOS 10 or higher or Android 5 or higher devices.
+ message (required, string, `Hello World`)...Short and concise message. This is the first thing your user sees, make sure it is relevant and that somehow summarizes what you intend to say.
+ ttl (optional, number, `3600`)...Number of seconds the message will be attempted to be delivered by APNS or GCM.
+ content (optional, array, `[{"type":"re.notifica.content.HTML",data:"<h1>Hello</h1>"}]`)...An array of Content objects according to the type of Notification. Please refer to Content types for all available types.
+ attachments (optional, object, `[{"uri":"https://domain.com/image","mimeType":"image/jpg"}]`)...An object containing the URL to an image either uploaded into our platform or hosted in any public web server.