For more information on using API

GET https://webapi.mymarketing.co.il/api/campaigns/{id}/segment

Get campaign sending settings (groups and sending restrictions).

Request Information

URI Parameters

Name

Description

Type

Additional information

id

Campaign id

integer

Required

Body Parameters

None.

Response Information

Resource Description

ApiCampaignRestrictionsSegment

Name

Description

Type

Additional information

limit_amount

Limit the number of emails

integer
limit_per_hour

Limit the number of emails to send per hour

integer
last_days_not_received

Send only to users who have not received an email in the specified number of days

integer
groups_excluded_ids

Do not send the email to users that are in those groups. IDs Can be found using the endpoint "Get account's groups" or in the UI(go to Contacts->Groups->click on the group's name -> you'll find the id int the URL)

Collection of integer
not_opened_campaign_ids

Restrict he sending of the campaign to users who have not opened the following emails. Can be found using the endpoint "Get account's email campaigns..." or in the UI (go to Emails->Emails Lists->click on the campaign's preview -> you'll find the id int the URL)

Collection of integer
not_received_campaign_ids

Restrict to users that did not recieve the following emails. Can be found using the endpoint "Get account's email campaigns..." or in the UI (go to Emails->Emails Lists->click on the campaign's preview -> you'll find the id int the URL)

Collection of integer
group_ids

List of group IDs that will recieve the campaign. Can be found using the endpoint "Get account's groups" or in the UI (go to Contacts->Groups->click on the group's name -> you'll find the id int the URL)

Collection of integer

Required

mailing_list_id

Mailing list Id. Required if you have mailing lists on your account - if not, remove this parameter. 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

Response Formats

application/json, text/json

Sample:
{
  "limit_amount": 1,
  "limit_per_hour": 1,
  "last_days_not_received": 1,
  "groups_excluded_ids": [
    1,
    2
  ],
  "not_opened_campaign_ids": [
    1,
    2
  ],
  "not_received_campaign_ids": [
    1,
    2
  ],
  "group_ids": [
    1,
    2
  ],
  "mailing_list_id": 1
}

application/xml, text/xml

Sample:
<ApiCampaignRestrictionsSegment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.RESTfulApi.Models">
  <group_ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </group_ids>
  <mailing_list_id>1</mailing_list_id>
  <groups_excluded_ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </groups_excluded_ids>
  <last_days_not_received>1</last_days_not_received>
  <limit_amount>1</limit_amount>
  <limit_per_hour>1</limit_per_hour>
  <not_opened_campaign_ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </not_opened_campaign_ids>
  <not_received_campaign_ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </not_received_campaign_ids>
  <sub_account_id>1</sub_account_id>
</ApiCampaignRestrictionsSegment>