« Back to Documentation Overviewget_newsletter_statuses
Section: Messages
Version: 1.5.0
Get statuses of newsletter messages.
Conditions:
Conditions:
- campaigns / get_campaigns (optional) – Count only in given campaigns. Uses OR logic. If those params are not given count, is performed in all campaigns in the account. Check IDs in conditions for detailed explanation
- send_on (optional) – Use time operators to narrow down count results to specific sending date. Multiple operators are allowed and logic AND is used so date range can also be expressed. Works only for newsletters because other message types do not have fixed sending point in time. If message was sent with Time Travel then it may appear in search results for two different days as sending period equals 24 hours.
- created_on (optional) – Use time operators to narrow down count results to specific message creation date. Multiple operators are allowed and logic AND is used so date range can also be expressed.
Parameters
|
---|
string | API_KEY |
object | array | campaigns | string | CAMPAIGN_ID | string | CAMPAIGN_ID |
| object | get_campaigns | object | name | string | CONTAINS | my_campaign_% |
|
| object | send_on | | object | created_on | |
|
Return Value
|
---|
array | scheduled | string | MESSAGE_ID | string | MESSAGE_ID | string | MESSAGE_ID |
|
array | in_progress | |
array | delivered | string | MESSAGE_ID | string | MESSAGE_ID | string | MESSAGE_ID | string | MESSAGE_ID |
|
Example Request JSON
[
"API_KEY",
{
"campaigns": [
"CAMPAIGN_ID",
"CAMPAIGN_ID"
],
"get_campaigns": {
"name": {
"CONTAINS": "my_campaign_%"
}
},
"send_on": {
"OPERATOR": "value"
},
"created_on": {
"OPERATOR": "value"
}
}
]
Example Response JSON
{
"scheduled": [
"MESSAGE_ID",
"MESSAGE_ID",
"MESSAGE_ID"
],
"in_progress": [
"MESSAGE_ID"
],
"delivered": [
"MESSAGE_ID",
"MESSAGE_ID",
"MESSAGE_ID",
"MESSAGE_ID"
]
}
API-wide Errors
|
---|
API key verification failed
| API key verification failed |
API client IP not allowed
| API client IP not allowed |
Invalid params
| Attribute params must be reference to hash |