v1

latestOpenAPI 3.0.02026-08-04265791.1 MB
Campaigns

Import audience

Import a simple list of client_ids or titles of your sites to use it as the audience of an existing campaign.

Fields

FieldFormatRequiredDescription
client_idstringxclient_id of the store to be added to the audience
titlestringxtitle of the store to be added to the audience

Important:
Either client_id or title is required. We recommend to import client_ids as they are unique. If multiple stores have the same title in your database they will all be added to the audience if you are importing a list of titles.

put/public/api/campaigns/{id}/stores

Path parameters

idstring required

The id of the campaign

Headers

Content-Dispositionstring

e.g. form-data; name="file"; filename="file.csv"

Response

OK

errorsobject

Example response

{
  "data": {
    "campaign_id": "61c1af9dc9ee430037e6b622",
    "title": "my campaign",
    "type": "mission",
    "storesQuery": {
      "query": {
        "where": {
          "_id": {
            "inq": [
              "5f1ff8f221cd73003b84234a",
              "5f4f6d4fb8d7fc003b62ef5c"
            ]
          }
        }
      },
      "total": 1,
      "mode": "selection",
      "selectiondIds": [
        "5f1ff8f221cd73003b84234a",
        "5f4f6d4fb8d7fc003b62ef5c"
      ]
    },
    "created_date": "2021-12-21T10:42:37.369Z",
    "updated_date": "2021-12-21T14:52:13.216Z"
  },
  "errors": {}
}