Retrieving the list of partners for a specific event

JSON

Request

GET /api/v1/events/{event_id}/partners.json?auth_token=YOUR_API_TOKEN

Response

// 200 OK
[
  {
    // the first partner
  },
  {
    // the second partner
  },
  ...
]

Getting information about a given partner

JSON

You can issue the following GET request by using either the id or uid of the partner. You will receive a JSON object representing your partner.

Request

GET /api/v1/events/{event_id}/partners/{uid|id}.json?auth_token=YOUR_API_TOKEN

Response

// 200 OK
{
  "_id":"<IDENTIFIER>",
  "blacklisted_percentage":0.0,
  "blacklisted_recipients":0,
  "bounced_percentage":0.0,
  "bounced_recipients":0,
  "created_at":"2019-02-27T00:00:00.982Z",
  "disable_emails":false,
  "event_id":"<EVENT_ID>",
  "name":"My Partner",
  "nb_email_sent":11,
  "nb_recipients":4,
  "nb_recipients_email_sent":2,
  "partner_campaigns":[...],
  "recipients_quota":-1,
  "rejected_percentage":0.0,
  "rejected_recipients":0,
  "spammed_percentage":0.0,
  "spammed_recipients":0,
  "uid":"1ac134bcx43e4x4134xaffax35c5027d84c2",
  "unsubscribed_percentage":0.0,
  "unsubscribed_recipients":0,
  "updated_at":"2019-02-27T00:02:00.982Z",
}

Creating a partner

name is the only mandatory field and must be unique within the event.

JSON

Request

POST /api/v1/events/{event_id}/partners.json?auth_token=YOUR_API_TOKEN
Content-Type: application/json; charset=utf-8
{
  "partner": {
    "name": "Eventmaker",
    "uid": "IEFKHZDS",
    "recipients_quota": 150,
    "disable_emails": false
  }
}

Response

// 201 CREATED
{
  "_id":"<IDENTIFIER>",
  "blacklisted_percentage":0.0,
  "blacklisted_recipients":0,
  "bounced_percentage":0.0,
  "bounced_recipients":0,
  "created_at":"2017-02-27T09:57:17.982Z",
  "disable_emails":false,
  "event_id":"<EVENT_ID>",
  "name":"Eventmaker",
  "nb_email_sent":11,
  "nb_recipients":4,
  "nb_recipients_email_sent":2,
  "partner_campaigns":[...],
  "recipients_quota":-1,
  "rejected_percentage":0.0,
  "rejected_recipients":0,
  "spammed_percentage":0.0,
  "spammed_recipients":0,
  "uid":"1ae114bcx43e4x4134xaffax35c5027d84c2",
  "unsubscribed_percentage":0.0,
  "unsubscribed_recipients":0,
  "updated_at":"2017-02-27T09:57:17.982Z"
}

Updating a partner

JSON

Request

PUT /api/v1/events/{event_id}/partners/{id}.json?auth_token=YOUR_API_TOKEN
Content-Type: application/json; charset=utf-8
{
  "partner": {
    "name": "Eventmaker",
    "uid": "IEFKHZDS",
    "recipients_quota": 200,
    "disable_emails": true
  }
}

Response

// 204 No Content

Deleting a partner

JSON

Request

DELETE /api/v1/events/{event_id}/partners/{id}.json?auth_token=YOUR_API_TOKEN

Response

// 200 OK