getCampaigns method

It is a method to get the list of all available campaigns. The number of mailings received at a time is limited to 10,000. To get a complete mailings list when there is more than 10,000, use the from and to parameters.

Principle of use

Syntax and URL to call the method
getCampaigns (datetime from, datetime to)
https://api.selzy.com/en/api/getCampaigns?format=json&api_key=KEY&from=TIME&to=TIME
Arguments
api_key * API access key.
from Date and time of the campaign start from which campaigns are to be displayed, in the "YYYY-MM-DD hh:mm:ss" format, time zone UTC.
to Date and time of the campaign start until which campaigns are to be displayed, in the "YYYY-MM-DD hh:mm:ss" format, time zone UTC.
limit Number of records in the response to one request must be an integer in the range from 1 to 10 000.
offset The parameter indicates from which position the selection is to be started. The value must be 0 or more (the position of the first record starts from 0), 0 is set by default.
Return value
JSON-array, each array element is an object with the id, start_time, status, message_id, subject, sender_name, sender_email, stats_url, where:

id — id of the current campaign;

start_time — campaign start time, it is returned in the «YYYY-MM-DD hh:mm:ss» format in UTC;

status — current campaign status (see the possible campaign statuses);

message_id — id of the message sent on this campaign;

list_id — id of the list for which the campaign was created;

subject — campaign message subject;

sender_name — value of the «From» field in this campaign;

sender_email — value of the «From address» field in this campaign;

stats_url — URL of the report page for this campaign.

Example the return value:

{
    "result": [
        {
            "id": 6626556,
            "start_time": "2015-09-28 10:03:59",
            "status": "waits_schedule",
            "message_id": 3769465,
            "list_id": 32127465,
            "subject": ", special offers from tour operators and 
              last minute tours",
            "sender_name": "test",
            "sender_email": "[email protected]",
            "stats_url": "https://selzy.local/en/v5/bursts/view/6626556"
        },
        ...
    ]
}
Did we answer your question?
6
2

To get more help, contact our Support Team. They are available for all Selzy users 24/7.