Hello,

As far as I read the documentation it should be possible, to send multiple notifications with one request. But if I try to send more than one notification, it isn't working anymore, I just get a 210 response with message "Cannot parse date".

Data with only one Notifications:

{ "application": "xxxx", "auth": "xxxx", "notifications": [ [ { "send_date": "now", "ignore_user_timezone": true, "timezone": "Europe/Vienna", "content": { "de": "Text in DE", "en": "Text in EN" }, "platforms": [ 1 ], "conditions": [ "MY_CONDITIONS" ] } ] ] }

Data with multiple Notifications:

{ "application": "xxxx", "auth": "xxxx", "notifications": [ [ { "send_date": "now", "ignore_user_timezone": true, "timezone": "Europe/Vienna", "content": { "de": "Text in DE", "en": "Text in EN" }, "platforms": [ 1 ], "conditions": [ "MY_CONDITIONS" ] }, { "send_date": "now", "ignore_user_timezone": true, "timezone": "Europe/Vienna", "content": { "de": "Text in DE", "en": "Text in EN" }, "platforms": [ 1 ], "conditions": [ "MY_CONDITITONS" ] } ] ] }

Can you please give me some advice. thx in advance

asked 06 Nov '15, 13:55
laola's gravatar image

laola
213

Hi,

Yes, it's actually possible to send multiple notifications in one request. Please see the example below:

{
    "request": {
        "application": "APP_CODE",
        "auth": "AUTH_TOKEN",
        "notifications": [
            {
                "content": "Wazzup!",
                "send_date": "now",
                "conditions": [
                    [
                        "YOUR_CONDITION"
                    ]
                ]
            },
            {
                "content": "Wazzup {Alias|CapitalizeAllFirst}!",
                "send_date": "now",
                "conditions": [
                    [
                        "YOUR_CONDITION"
                    ]
                ]
            }
        ]
    }
}
permanent link
answered 18 Nov '15, 14:01
Andrew_H's gravatar image

Andrew_H
3766

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111
×47
×33
×9

question asked: 06 Nov '15, 13:55

question was seen: 690 times

last updated: 18 Nov '15, 14:01