Link Search Menu Expand Document

Updated Fri Mar 5th 2021, 12:17 UTC

List Campaigns

GET /:account/campaign_filters/:campaign_filter/campaigns

A Campaign Filter is a set of rules used to match a subset of Campaigns, and this endpoint is used to retrieve those matching Campaigns. They are normally ordered by scheduled_at, and support pagination

Examples

Get Campaign Collection

Request

GET /my_account/campaign_filters/all/campaigns
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X GET /my_account/campaign_filters/all/campaigns
    

Response

Status

200

Response Type

hydra:Collection

Example
{
  "@type": "hydra:Collection",
  "@context": "/contexts/hydra:Collection.jsonld",
  "id": "/my_account/campaign_filters/all/campaigns",
  "members": [
    {
      "@type": "Campaign",
      "@context": "/contexts/Campaign.jsonld",
      "id": "/campaigns/joOQd57",
      "title": "The Best Campaign",
      "messageBody": "The best campaign message.",
      "state": "sent",
      "createdAt": "2018-11-19T20:51:54.000Z",
      "scheduledAt": "2018-11-19T21:00:54.000Z",
      "sendingStartAt": "2018-11-19T21:00:54.000Z",
      "sendingEndAt": "2018-11-19T21:01:54.000Z",
      "estimatedStartAt": "2018-11-19T21:01:54.000Z",
      "estimatedFinishAt": "2018-11-19T21:01:54.000Z",
      "deliveryStatistics": {
        "total": 1,
        "skipped": 0,
        "sent": 1,
        "delivered": 1,
        "replied": 0,
        "unreplied": 1,
        "failed": 0
      },
      "delete": null,
      "edit": null,
      "cancel": null,
      "account": "/accounts/my_account",
      "user": {
        "@type": "User",
        "@context": "/contexts/User.jsonld",
        "id": "/users/wqyODPA",
        "name": "Chuck Norris",
        "firstName": "Chuck",
        "lastName": "Norris",
        "email": "chuck@textus.example",
        "avatar": null,
        "automatedActor": false,
        "hasPassword": false,
        "discarded": false,
        "settings": {
          "notifications": {
            "email": true
          },
          "customSettings": {}
        },
        "memberships": "/users/wqyODPA/memberships"
      },
      "totalRecipients": "/campaigns/joOQd57/campaign_recipients/total",
      "skippedRecipients": "/campaigns/joOQd57/campaign_recipients/skipped",
      "sentRecipients": "/campaigns/joOQd57/campaign_recipients/sent",
      "deliveredRecipients": "/campaigns/joOQd57/campaign_recipients/delivered",
      "repliedRecipients": "/campaigns/joOQd57/campaign_recipients/replied",
      "unrepliedRecipients": "/campaigns/joOQd57/campaign_recipients/unreplied",
      "failedRecipients": "/campaigns/joOQd57/campaign_recipients/failed"
    }
  ],
  "totalItems": 1,
  "view": {
    "@type": "hydra:PartialCollectionView",
    "@context": "/contexts/hydra:PartialCollectionView.jsonld",
    "id": "/my_account/campaign_filters/all/campaigns",
    "first": "/my_account/campaign_filters/all/campaigns",
    "next": null,
    "previous": null
  }
}

© 2021 TextUs