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": "1971f158-2c4b-4501-adcc-8fcf3d941b07",
    "type": "export_logs",
    "attributes": {
      "created_at": "2021-11-23T14:38:25Z",
      "export_at": "2021-11-23T14:38:25Z",
      "params": {
        "filter": "{\"status\":\"active\"}"
      },
      "type": "Contacts",
      "updated_at": "2021-11-23T14:38:25Z",
      "updated_in_db_at": "2021-11-23T14:38:25Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "d58be7f3-d7ab-421e-8cc9-277cc12c9702",
          "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/33106539-974f-43a8-951f-c9123c8da372
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "33106539-974f-43a8-951f-c9123c8da372",
    "type": "export_logs",
    "attributes": {
      "created_at": "2021-11-23T14:38:26Z",
      "export_at": "2017-07-28T15:19:32Z",
      "params": {
        "filter": {
          "status": "active"
        }
      },
      "type": "Contacts Export",
      "updated_at": "2021-11-23T14:38:26Z",
      "updated_in_db_at": "2021-11-23T14:38:26Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "865ae299-ecca-411f-b83d-fec386395cd3",
          "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