For more information on using API

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

Get account's email campaigns. You can get campaigns filtered by various parameters including date and limited to a number of campaigns (you will get camapigns that were last updated in the last 3 months by default)

Request Information

URI Parameters

Name

Description

Type

Additional information

mailing_list_id

Mailing list id. Use it only if you have mailing lists in your account. Can be found using the endpoint "Get account's mailing lists" or in the UI (go to Contacts->Mailing Lists->click on the mailing lists's name -> you'll find the id int the URL).

integer
content_category_id

Category id. Can be found using the endpoint "Get the account's categories."

integer
search_term

campaign's name/partial name

string
send_type

Campaign sent types

from_date

The start date the campaign was last updated

date
to_date

The end date the campaign was last updated

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. (Removing the "limit" will, by default, display only 20 records)

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>