v1.0.0
OpenAPI 3.1.0

Export customer data

US region

Client Libraries

Export customer data

Provide filters and attributes describing the customers you want to export. This endpoint returns export metadata; use the /exports/{export_id}/endpoint to download your export.

Body
application/json
  • filters
    required

    Use and, or, and not to combine segment and attribute conditions. The top-level object accepts one property; nest groups for complex filters.

    Use and, or, and not to combine segment and attribute conditions. The top-level object accepts one property; nest groups for complex filters.

    • and
      Type: array object[]

      Match all conditions to return results.

  • attributes
    Type: array string[]

    Recipient attributes you want to include as extra columns in your export.

Responses
  • application/json
  • 400

    The request is malformed.

  • application/json
Request Example for post/v1/exports/customers
{
  "filters": {
    "and": [
      {
        "segment": {
          "id": 3
        }
      },
      {
        "or": [
          {
            "attribute": {
              "field": "interest",
              "operator": "eq",
              "value": "roadrunners"
            }
          },
          {
            "attribute": {
              "field": "state",
              "operator": "eq",
              "value": "NM"
            }
          },
          {
            "not": {
              "attribute": {
                "field": "species",
                "operator": "eq",
                "value": "roadrunners"
              }
            }
          }
        ]
      }
    ]
  }
}
{
  "export": {
    "created_at": 1530296738,
    "deduplicate_id": "110:1530296738",
    "description": "Customers with segment filters—in \\Purchased Flowers\\",
    "downloads": 2,
    "failed": false,
    "id": 110,
    "status": "done",
    "total": 1234,
    "type": "customers",
    "updated_at": 1530296738,
    "user_email": "person@email.com",
    "user_id": 0
  }
}