Exports

Exports Documentation

Export [POST]

Export [POST]

Request

Endpoint

POST api/v2/contacts/exports
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": "011ad45b-07f1-4afa-9e50-47bd78be5062",
    "type": "export_logs",
    "attributes": {
      "created_at": "2022-01-12T17:18:07Z",
      "export_at": "2022-01-12T17:18:07Z",
      "params": {
        "filter": "{\"status\":\"active\"}"
      },
      "type": "Contacts",
      "updated_at": "2022-01-12T17:18:07Z",
      "updated_in_db_at": "2022-01-12T17:18:07Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "2080a55f-7c54-4381-83b7-279841984660",
          "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

Export [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/d7905e44-37ff-4f78-9f99-21f26baf3c5f
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "d7905e44-37ff-4f78-9f99-21f26baf3c5f",
    "type": "export_logs",
    "attributes": {
      "created_at": "2022-01-12T17:18:07Z",
      "export_at": "2017-07-28T15:19:32Z",
      "params": {
        "filter": {
          "status": "active"
        }
      },
      "type": "Contacts Export",
      "updated_at": "2022-01-12T17:18:07Z",
      "updated_in_db_at": "2022-01-12T17:18:07Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "81186a24-9e68-4ea9-808b-5ea8d3a68966",
          "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