Retrieve all campaigns
http(s)://edm.lapaton.com/api/<api_key>/campaign
Retrieve all campaigns, max record to return is 100.
Response
{
"totalRecords": 30,
"campaigns": [
{
"id": 41,
"subject": "email subject 1",
"fromEmail": "demo@example.com",
"fromName": "Demo",
"status": 1,
"recipients": 100,
"sent": 100,
"opens": 33,
"clicks": 10
"createDt": "2011-03-30 10:07 AM"
},
{
"id": 42,
"subject": "email subject 2",
"fromEmail": "demo2@example.com",
"fromName": "Demo 2",
"status": 1,
"recipients": 100,
"sent": 100,
"opens": 33,
"clicks": 10
"createDt": "2011-03-30 10:07 AM"
}
...
]
}
A brief explanation
status: it has 6 status for each campaign
Value |
Name |
Description |
0 |
Ready |
Created and ready for sending, but NOT send yet. |
1 |
Sending |
Created and ready for sending, but NOT send yet. |
2 |
Suspended |
Something wrong, the campaign suspended. (You should not see this status in most situation) |
3 |
Completed |
Campaign was completed, all email sent. |
4 |
Paused |
Campaign was started, but pause at this moment |
5 |
Creating |
Campaign is creating, not ready for send. |
Retrieve campaigns by page
http(s)://edm.lapaton.com/api/<api_key>/campaign?start=0&limit=100
http(s)://edm.lapaton.com/api/<api_key>/campaign?start=100&limit=100
Return the first page and the second page, each page contains 100 records.
Response is the same as above. The max limit value is 100.
Retrieve campaign
http(s)://edm.lapaton.com/api/<api_key>/campaign/<campaign_id>
Response
{
"id": 42,
"subject": "email subject 2",
"additionalSubjects": ["subject 3", "subject 4"],
"fromEmail": "demo2@example.com",
"fromName": "Demo 2",
"replyTo": "demo2_reply@example.com",
"html": "<p>something...",
"text": "something",
"createDt": "2011-03-30 10:07 AM",
"completedDt": "2011-03-31 1:07 AM",
"remarks": "some remarks..",
"status": 1,
"recipients": 100,
"sent": 100,
"bounce": 0,
"unsubscribes": 0,
"spams": 0,
"forwards": 0,
"opens": 33,
"clicks": 10
}