Mailing

Mailing Documentation

Mailing [POST]

Mailing [POST]

Request

Endpoint

POST api/v2/contacts/exports/mailing
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "export_logs",
    "attributes": {
      "params": {
        "filter": "{\"status\":\"active\"}"
      }
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

params

Type string

Description A contact filter object that will select the contacts to export

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
201 Created

Body

{
  "data": {
    "id": "4617805e-8798-4aa2-ab96-a78091662a0f",
    "type": "export_logs",
    "attributes": {
      "created_at": "2022-01-12T17:18:23Z",
      "export_at": "2022-01-12T17:18:23Z",
      "params": {
        "filter": "{\"status\":\"active\"}"
      },
      "type": "Contacts Mailing",
      "updated_at": "2022-01-12T17:18:23Z",
      "updated_in_db_at": "2022-01-12T17:18:23Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "2568d829-acb3-4c20-967a-aabaebc44e4f",
          "type": "users"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

export_at

Type string

Description When export was performed

params

Type string

Description A contact filter object that will select the contacts to export

type

Type string

Description The type of export being performed

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

user.data

Type Person

Description The user that created the export

Mailing [GET]

This endpoint when .csv or .xlsx is appended to the URI Path will produce a file with the contacts selected by the params attribute of the export_log

Request

Endpoint

GET api/v2/contacts/exports/mailing/974e08dc-5a05-421e-bed7-b0d3b590201a
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "974e08dc-5a05-421e-bed7-b0d3b590201a",
    "type": "export_logs",
    "attributes": {
      "created_at": "2022-01-12T17:18:23Z",
      "export_at": "2017-07-28T15:19:32Z",
      "params": {
        "filter": {
          "status": "active"
        }
      },
      "type": "Contacts Export",
      "updated_at": "2022-01-12T17:18:23Z",
      "updated_in_db_at": "2022-01-12T17:18:23Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "4834a5c1-7603-49f3-b554-d956b4f14c07",
          "type": "users"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

export_at

Type string

Description When export was performed

params

Type string

Description A contact filter object that will select the contacts to export

type

Type string

Description The type of export being performed

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

user.data

Type Person

Description The user that created the export

Last updated