Export an account's investment transactions

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /financial-data/account/{accountId}/investment-transactions/export

Queues a background job that builds a CSV or PDF of one account's investment transactions (with the given filters) and returns its job id; poll GET /financial-data/export/:jobId for the download URL. On a case shared with opposing counsel, an account the caller may not see returns 404.

Path parameters

  • accountId string Required
application/json

Body Required

  • caseId string Required

    Case ID this financial data belongs to.

  • format string Required

    Export format.

    Values are csv or pdf.

  • filters object

    Optional filters.

    Hide filters attributes Show filters attributes object
    • startDate string

      Start date filter (YYYY-MM-DD, inclusive).

    • endDate string

      End date filter (YYYY-MM-DD, inclusive).

    • transactionType string

      Filter by transaction type (e.g. buy, sell, dividend, transfer).

    • tagIds array[string]

      Filter by tag IDs (reserved for future use).

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attribute Show data attribute object
      • jobId string Required

        Export job id. Poll GET /financial-data/export/:jobId for status and the download URL.

    • statusCode number Required
    • timestamp string(date-time) Required
POST /financial-data/account/{accountId}/investment-transactions/export
curl \
 --request POST 'http://api.example.com/financial-data/account/{accountId}/investment-transactions/export' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "caseId": "string",
  "format": "csv",
  "filters": {
    "startDate": "2024-01-01",
    "endDate": "2024-12-31",
    "transactionType": "sell",
    "tagIds": [
      "string"
    ]
  }
}'
Request examples
{
  "caseId": "string",
  "format": "csv",
  "filters": {
    "startDate": "2024-01-01",
    "endDate": "2024-12-31",
    "transactionType": "sell",
    "tagIds": [
      "string"
    ]
  }
}
Response examples (201)
{
  "data": {
    "jobId": "65a1b2c3d4e5f6a7b8c9d0f1"
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}