External Data Feeds references
A push request property specifying which External Data Feeds should be invoked and with what parameters in order to support personalization from feed content.
You must first create an external data feed in the dashboard, then you can refer to its ID as the name in the feed references object. The Coupons service is a type of external data feed. See Coupons for formatting and usage information.
Feed references object
An object used to indicate that an external data feed should be invoked, the name of the feed to invoke, and the way in which to invoke it. You can only include a feed if you include a templates object in the payload or set the personalization option to true.
- defaults object
Default parameter values for your feed. These values override any defaults you set for your feed in the Airship Dashboard.
- feeds array[object]REQUIRED
An array of feeds that you want to use to personalize your message.
Used in:
- Create content template
- Create or update content template by external ID
- List a specific schedule
- List content templates
- List schedules
- Look up a content template
- Look up a content template by external ID
- Schedule a notification
- Schedule a templated push
- Schedule message with bulk ID
- Send a push
- Send message with bulk ID
- Update content template
- Update schedule
- Validate a push
- Validate message with bulk ID
Examples
Example push external data feeds request
POST /api/push HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json
{
"device_types": ["ios"],
"audience": { "tag": "earlyBirds" },
"notification": {
"alert": "{{#feed \"featured_product\"}}Hello, {{user}}, could I interest you in {{product_name}} today?{{/feed}}"
},
"options": {
"personalization": true
},
"feed_references": {
"feeds": [
{
"name": "featured_product"
}
],
"defaults": {
"featured_product": {
"category": "featured"
}
}
}
}
HTTP/1.1 202 Accepted
Content-Type: application/vnd.urbanairship+json; version=3
Content-Length: 123
Data-Attribute: push_ids
{
"ok": true,
"operation_id": "5e7852b0-6909-4e60-a73f-4d6b92d94c80",
"push_ids": [
"bf28d158-fefe-475a-9c2a-ed4f69cc891e"
]
}
Example feed references object
{
"feed_references": {
"feeds": [
{
"name": "featured_product",
"params": {
"sub_category": "shoes"
},
"on_error": "continue"
}
],
"defaults": {
"featured_product": {
"category": "featured"
}
}
}
}