Exports

Create Async Export

Queues a CSV export job and returns it in `pending` status. Poll `GET /exports/async/{exportId}` until `status` is `completed`, then fetch the file with `GET /exports/async/{exportId}/sign` (pre-signed URL) or `GET /exports/async/{exportId}/download` (stream). This is the only non-GET operation available to read-only Apps: it requires the `read` scope, not `write`.

POST
/exports/async

Authorization

appToken read
AuthorizationBearer <token>

App access token issued by POST /tokens (client credentials). Full-access Apps hold the read and write scopes, read-only Apps hold read only. Send it as Authorization: Bearer <token>.

In: header

Scope: read

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/exports/async" \  -H "Content-Type: application/json" \  -d '{    "external_user_id": "string",    "category": "trades",    "type": "trades"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "external_user_id": "string",  "category": "trades",  "type": "trades",  "status": "pending",  "query": {},  "total_records": 0,  "sneak_peak": [    [      null    ]  ],  "error_message": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}
{  "message": "string",  "code": "string",  "errors": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "details": [    {      "field": "string",      "issue": "string"    }  ]}