API Docs / Operations / Clients - CSV Export / Start CSV Export

Start CSV Export

POST /tenants/{tenant}/clients/export/csv

Starts an async export of clients to CSV format. Optionally specify a saved mapping or inline column mappings to control the output format. If no mapping is provided, all fields are exported with enum names as headers. Use the filter options to select which clients to include. Returns 201 Created with downloadUrl if the export completes within 10 seconds, or 202 Accepted with a Location header to poll for completion.

Parameters

NameTypeDescription
tenant* path string

The Tenant.Code

The Tenant.Code

Request Body*

{
  "mappingCode": "string",
  "columnMappings": [
    {
      "csvHeader": "...",
      "targetField": "..."
    }
  ],
  "includeHeaders": false,
  "filter": {
    "managerCodes": [
      "..."
    ],
    "partnerCodes": [
      "..."
    ],
    "associateCodes": [
      "..."
    ],
    "statuses": [
      "..."
    ],
    "types": [
      "..."
    ]
  }
}

Responses

201 Created
202 Accepted
400 Bad Request
401 Unauthorized – Invalid or missing API key
403 Forbidden
404 Not Found