Cowdidocs
API ReferenceStatements

Request Statement

Request (or idempotently re-request) a statement

POST
/v1/statements

Header Parameters

Idempotency-Key?string

Unique key that de-duplicates retries of this request: the first call executes and its response is stored, identical retries replay it, and reusing a key with a different request body is rejected with 409 Conflict.

Lengthlength <= 255

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/statements" \  -H "Content-Type: application/json" \  -d '{    "type": "TRANSACTION_HISTORY",    "parameters": {}  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "TRANSACTION_HISTORY",  "audience": "USER",  "status": "PENDING",  "parameters": {},  "data_as_of": "2019-08-24T14:15:22Z",  "documents": [    {      "format": "CSV",      "status": "PENDING",      "failure_reason": "string",      "failure_code": "TOO_MANY_ROWS"    }  ],  "requested_at": "2019-08-24T14:15:22Z",  "resource_id": "string"}
{  "code": "BAD_REQUEST",  "description": "Bad Request"}
{  "code": "UNAUTHORISED",  "description": "Unauthorised"}
{  "code": "WAITING_LIST",  "description": "User is in the waiting list"}
{  "code": "TOO_MANY_REQUESTS",  "description": "Too Many Requests"}
{  "code": "INTERNAL_SERVER_ERROR",  "description": "Internal Server Error"}