Push Notifications
Required feature: **push_notifications/view**
Section:
Group Push Notifications. Base URL:https://instance_name.meiro.io/api/.
Push Notification [/push_notifications/{push_notification_id}]
Retrieve a Push Notification [GET]
Required feature: push_notifications/view
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"push_notification": {
"id": "983d437d-eac6-423b-beb5-40a619be332f",
"name": "My push notification",
"title_template": "title",
"body_template": "body",
"modified": "2018-11-07T10:19:48Z",
"modified_by": 1,
"last_activation": "2018-11-07T10:19:48Z",
"last_activation_by": 1,
"deleted": false,
"schedules": [{
"segment_ids": [1],
"schedule_type": "repetitive",
"schedules": [{
"minute": "*",
"hour": "*",
"day": "*",
"month": "*",
"day_of_week": "*"
}]
}],
"frequency_cap": {
"ignore_channel_frequency_cap": false,
"max_count": 1,
"period": {
"type": "days",
"size": 1
}
},
"ttl_seconds": 2419200,
"application": {
"id": "41f2cc9a-f7df-4ef8-b2e1-1bd4e627639a",
"android": true,
"ios": false
},
"action": "app",
"url": null,
"image_url": null,
"custom_data": {
"hello": "there"
}
}
}Modify a Push Notification [PATCH]
Required feature: push_notifications/edit
-
Attributes
- name:
My push notification(string, optional) - title_template:
title(string, optional) - body_template:
body(string, optional) - deleted:
false(boolean, optional) - schedules (PushNotificationSchedule, optional)
- frequency_cap (ChannelEntityFrequencyCap, optional)
- ttl_seconds (number, optional)
- application (PushNotificationApplication, optional)
- action (PushNotificationAction, optional)
- url (string, optional)
- image_url (string, optional)
- custom_data (object, optional)
- name:
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"push_notification": {
"id": "983d437d-eac6-423b-beb5-40a619be332f",
"name": "My push notification",
"title_template": "title",
"body_template": "body",
"modified": "2018-11-07T10:19:48Z",
"modified_by": 1,
"last_activation": "2018-11-07T10:19:48Z",
"last_activation_by": 1,
"deleted": false,
"schedules": [{
"segment_ids": [1],
"schedule_type": "repetitive",
"schedules": [{
"minute": "*",
"hour": "*",
"day": "*",
"month": "*",
"day_of_week": "*"
}]
}],
"frequency_cap": {
"ignore_channel_frequency_cap": false,
"max_count": 1,
"period": {
"type": "days",
"size": 1
}
},
"ttl_seconds": 2419200,
"application": {
"id": "41f2cc9a-f7df-4ef8-b2e1-1bd4e627639a",
"android": true,
"ios": false
},
"action": "app",
"url": null,
"image_url": null,
"custom_data": {
"hello": "there"
}
}
}Delete a Push Notification [DELETE]
Required feature: push_notifications/edit
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"message": "OK"
}Push Notifications [/push_notifications]
List All Push Notifications [GET]
Required feature: push_notifications/view
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 200 (application/json)
{
"push_notifications": [
{
"id": "983d437d-eac6-423b-beb5-40a619be332f",
"name": "My push notification",
"title_template": "title",
"body_template": "body",
"modified": "2018-11-07T10:19:48Z",
"modified_by": 1,
"last_activation": "2018-11-07T10:19:48Z",
"last_activation_by": 1,
"deleted": false,
"schedules": [{
"segment_ids": [1],
"schedule_type": "repetitive",
"schedules": [{
"minute": "*",
"hour": "*",
"day": "*",
"month": "*",
"day_of_week": "*"
}],
"
}],
frequency_cap": {
"ignore_channel_frequency_cap": false,
"max_count": 1,
"period": {
"type": "days",
"size": 1
}
},
"ttl_seconds": 2419200,
"application": {
"id": "41f2cc9a-f7df-4ef8-b2e1-1bd4e627639a",
"android": true,
"ios": false
},
"action": "app",
"url": null,
"image_url": null,
"custom_data": {
"hello": "there"
}
}
]
}Create a Push Notification [POST]
Required feature: push_notifications/edit
-
Attributes
- name:
My push notification(string) - title_template:
title(string) - body_template:
body(string) - ttl_seconds:
2419200(number) - application (PushNotificationApplication)
- frequency_cap (ChannelEntityFrequencyCap, optional)
- action
app(PushNotificationAction) - url
http://here(string, optional) - image_url
https://here.png(string, optional) - custom_data (object, optional)
- name:
-
Request (application/json)
-
Headers
X-Access-Token: 1234567890abcdef
-
-
Response 201 (application/json)
{
"push_notification": {
"id": "983d437d-eac6-423b-beb5-40a619be332f",
"name": "My push notification",
"title_template": "title",
"body_template": "body",
"modified": "2018-11-07T10:19:48Z",
"modified_by": 1,
"last_activation": "2018-11-07T10:19:48Z",
"last_activation_by": 1,
"deleted": false,
"schedules": [{
"segment_ids": [1],
"schedule_type": "repetitive",
"schedules": [{
"minute": "*",
"hour": "*",
"day": "*",
"month": "*",
"day_of_week": "*"
}]
}],
frequency_cap": {
"ignore_channel_frequency_cap": false,
"max_count": 1,
"period": {
"type": "days",
"size": 1
}
},
"ttl_seconds": 2419200,
"application": {
"id": "41f2cc9a-f7df-4ef8-b2e1-1bd4e627639a",
"android": true,
"ios": false
},
"action": "app",
"url": null,
"image_url": null,
"custom_data": {
"hello": "there"
}
}
}