POST/users/{userId}/accounts/{accountType}/export/{format}

Download Account Statement

Downloads the account history for one user assigned to the authenticated broker and returns the file itself. A successful response is the PDF or CSV, not the usual JSON envelope.

The broker session is required. The user in the path must be assigned to that broker. USD is the public account type and is mapped to BUS_USD_Account before the statement is generated. Any other account type is rejected.

All body fields are optional. An empty body {} is valid and exports the account with newest transactions first. There are no query parameters. pageNumber and pageSize are not accepted.

Path variables

FieldTypeRequiredPossible valuesDescription
userIdstringRequired—

Masked user id, same value used by the other broker user endpoints.

accountTypestringRequiredUSD

Public account type. `USD` is mapped to `BUS_USD_Account`. Any other value is rejected.

formatstringRequiredpdf | csv

Statement file format.

Headers

FieldTypeRequiredPossible valuesDescription
session-tokenstringRequired—

SessionToken obtained from the Create GMA Session endpoint. All secured endpoints require this header.

Request body

FieldTypeRequiredPossible valuesDescription
FromDatestringOptionalISO 8601

Start of the date range (ISO 8601). Required when ToDate is sent.

ToDatestringOptionalISO 8601

End of the date range (ISO 8601). Must be on or after FromDate.

DescriptionstringOptional—

Text to match in the transaction description.

TransferTypestringOptionalFVNet | Fee | ACH | WIRE | INTERNATIONAL_WIRE | STABLECOIN_WITHDRAW | CROSS_BORDER_AED_DOMESTIC | CROSS_BORDER_AED_WIRE | CROSS_BORDER_BRL_DOMESTIC | CROSS_BORDER_ARS_DOMESTIC | CROSS_BORDER_PEN_DOMESTIC | CROSS_BORDER_CLP_DOMESTIC | CROSS_BORDER_COP_DOMESTIC | CROSS_BORDER_DKK_DOMESTIC | CROSS_BORDER_IDR_DOMESTIC | CROSS_BORDER_AUD_DOMESTIC | CROSS_BORDER_MYR_DOMESTIC | CROSS_BORDER_KRW_DOMESTIC | CROSS_BORDER_THB_DOMESTIC | CROSS_BORDER_VND_DOMESTIC | CROSS_BORDER_CAD_DOMESTIC | CROSS_BORDER_CAD_WIRE | CROSS_BORDER_SEPA | CROSS_BORDER_EUR_WIRE | CROSS_BORDER_FASTER_PAYMENTS | CROSS_BORDER_GBP_WIRE | CROSS_BORDER_HKD_DOMESTIC | CROSS_BORDER_HKD_WIRE | CROSS_BORDER_JPY_DOMESTIC | CROSS_BORDER_JPY_WIRE | CROSS_BORDER_CLABE | CROSS_BORDER_MXN_WIRE | CROSS_BORDER_SGD_DOMESTIC | CROSS_BORDER_SGD_WIRE | CROSS_BORDER_ZAR_DOMESTIC | CROSS_BORDER_ZAR_WIRE

One public transfer type.

OrderBystringOptionaldateDesc | dateAsc | amountAsc | amountDesc

Sort order. Defaults to dateDesc when omitted.

FromDate is required when ToDate is sent, and FromDate cannot be after ToDate. USD is mapped to BUS_USD_Account before the statement is generated.

Additional info

FieldTypeRequiredPossible valuesDescription
400 — Invalid dateobjectOptional—

FromDate or ToDate is not a valid ISO 8601 date.

400 — ToDate without FromDateobjectOptional—

ToDate was sent without FromDate.

400 — FromDate after ToDateobjectOptional—

FromDate is later than ToDate.

400 — Unknown TransferType or OrderByobjectOptional—

TransferType or OrderBy is not one of the accepted values.

400 — Unknown format or accountTypeobjectOptional—

format must be pdf or csv. accountType must be USD.

400 — Statement service rejected the inputobjectOptional—

The statement service rejected the input. ResponseErrors contains the service message, or Bad Request.

401 — UnauthorizedobjectOptional—

Missing or invalid session-token.

403 — ForbiddenobjectOptional—

User is not assigned to this broker, or the statement service denied access.

404 — User not foundobjectOptional—

User was not found.

500 — Unexpected failureobjectOptional—

Unexpected failure while generating the statement.

Example— 400 — Invalid date

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "body[FromDate]: FromDate must be a valid ISO8601 date"
  ],
  "RequestID": "<trace-id>"
}

Example— 400 — ToDate without FromDate

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "body[ToDate]: FromDate is required when ToDate is provided"
  ],
  "RequestID": "<trace-id>"
}

Example— 400 — FromDate after ToDate

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "body[ToDate]: FromDate cannot be greater than ToDate"
  ],
  "RequestID": "<trace-id>"
}

Example— 400 — Unknown TransferType or OrderBy

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "body[TransferType]: Invalid TransferType"
  ],
  "RequestID": "<trace-id>"
}

Example— 400 — Unknown format or accountType

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "params[format]: format must be one of: pdf, csv"
  ],
  "RequestID": "<trace-id>"
}

Example— 400 — Statement service rejected the input

{
  "ResponseCode": 400,
  "ResponseMessage": "BadRequest",
  "ResponseData": null,
  "ResponseErrors": [
    "Bad Request."
  ],
  "RequestID": "<trace-id>"
}

Example— 401 — Unauthorized

{
  "ResponseCode": 401,
  "ResponseMessage": "Unauthorized",
  "ResponseData": null,
  "ResponseErrors": [
    "Unauthorized."
  ],
  "RequestID": "<trace-id>"
}

Example— 403 — Forbidden

{
  "ResponseCode": 403,
  "ResponseMessage": "Forbidden",
  "ResponseData": null,
  "ResponseErrors": [
    "Forbidden."
  ],
  "RequestID": "<trace-id>"
}

Example— 404 — User not found

{
  "ResponseCode": 404,
  "ResponseMessage": "NotFound",
  "ResponseData": null,
  "ResponseErrors": [
    "User not found"
  ],
  "RequestID": "<trace-id>"
}

Example— 500 — Unexpected failure

{
  "ResponseCode": 500,
  "ResponseMessage": "ServerError",
  "ResponseData": null,
  "ResponseErrors": [
    "Something went wrong. Please try again later"
  ],
  "RequestID": "<trace-id>"
}

Response

FieldTypePossible valuesDescription
BodyfilePDF bytes | CSV text

The statement file. Save it. Do not parse a successful response as JSON.

Content-Typestringapplication/pdf | text/csv

application/pdf or text/csv, or the type returned by the statement service.

Content-Dispositionstringattachment; filename="statement-BUS_USD_Account.pdf"

attachment, with the filename from the statement service. Otherwise statement-BUS_USD_Account.pdf or statement-BUS_USD_Account.csv.

Content-Lengthinteger—

File size in bytes.

HTTP 200 returns the file. Error responses use the standard broker JSON envelope shown under Additional info.

Requires `session-token: {SessionToken}` from Create GMA Session. Use the same client IP as authentication.

Search guide books, endpoints, paths, or parameters

↑↓navigate↵openEscclose