For more information on using API

GET http://webapi.mymarketing.co.il/api/campaigns?MailingListId={MailingListId}&ContentCategoryId={ContentCategoryId}&SearchTerm={SearchTerm}&SendType={SendType}&FromDate={FromDate}&ToDate={ToDate}&Page={Page}&Limit={Limit}

Get campaigns. You can get campaigns filtered by date (from/to date, the defualt is three months back) and limited to a number of campaigns (you will get the last 20 campaigns in the last 6 months by default)

Request Information

URI Parameters

Name

Description

Type

Additional information

mailing_list_id

Mailing list id , Don't send if you don't have a mailing list

integer
content_category_id

Category id

integer
search_term

Free text search term

string
send_type

Send type from campaigns send type list

from_date

The first date the contacts you want were created

date
to_date

The last date the contacts you want were created.(Default values is 3 last months)

date
page

Get a specific page (number of pages is limited)

integer

Range: inclusive between 1 and 2147483647

limit

Limit the number of items you get in the results.

integer

Range: inclusive between 1 and 100

Body Parameters

None.

Response Information

Resource Description

ApiCampaignsListResult

Name

Description

Type

Additional information

items

List of campaigns

Collection of ApiCampaignListItem
total_items

List of campaigns

integer

Response Formats

application/json, text/json

Sample:
{
  "items": [
    {
      "id": 1,
      "name": "sample string 2",
      "subject": "sample string 3",
      "send_type": "Empty",
      "is_sent": true,
      "total_sent": 1,
      "last_updated": "2016-12-24T14:12:12",
      "preheader": "sample string 6",
      "predictive_delivery": true
    },
    {
      "id": 1,
      "name": "sample string 2",
      "subject": "sample string 3",
      "send_type": "Empty",
      "is_sent": true,
      "total_sent": 1,
      "last_updated": "2016-12-24T14:12:12",
      "preheader": "sample string 6",
      "predictive_delivery": true
    }
  ],
  "total_items": 1
}

application/xml, text/xml

Sample:
<ApiCampaignsListResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <items>
    <ApiCampaignListItem>
      <id>1</id>
      <is_sent>true</is_sent>
      <last_updated>2016-12-24T14:12:12</last_updated>
      <name>sample string 2</name>
      <predictive_delivery>true</predictive_delivery>
      <preheader>sample string 6</preheader>
      <send_type>Empty</send_type>
      <subject>sample string 3</subject>
      <total_sent>1</total_sent>
    </ApiCampaignListItem>
    <ApiCampaignListItem>
      <id>1</id>
      <is_sent>true</is_sent>
      <last_updated>2016-12-24T14:12:12</last_updated>
      <name>sample string 2</name>
      <predictive_delivery>true</predictive_delivery>
      <preheader>sample string 6</preheader>
      <send_type>Empty</send_type>
      <subject>sample string 3</subject>
      <total_sent>1</total_sent>
    </ApiCampaignListItem>
  </items>
  <total_items>1</total_items>
</ApiCampaignsListResult>