Generate Account Statement (POST)

Generate comprehensive account statement with transaction history and balance information.

An account statement includes these details.

  • Transaction History—List of all financial transactions, such as invoices, credit memos, debit memos, payments, and refunds, within a specified date range.
  • Open Balances—Non-zero balances for invoices and other transactions.
  • Account Summary—Aggregated totals including beginning balance, total charges, total payments, and ending balance.
  • Multi-currency Support—Transactions across multiple currencies.

Resource 

1/revenue/billing/accounts/{accountId}/statement

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/revenue/billing/accounts/{accountId}/statement

Available Version 

66.0

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "shouldShowOpenBalancesOnly": false,
3  "startDate": "2025-09-01",
4  "transactionTypes": {
5    "transactionTypes": [
6      "Invoice"
7    ]
8  },
9  "sortBy": "DueDate",
10  "sortingOrder": "Ascending",
11  "associatedAccountIds": {
12    "associatedAccountIds": [
13      "001xx000003DGb5AAG",
14      "001xx000003DGb6AAG"
15    ]
16  },
17  "documentTemplateId": "0TRxx000000002YGAQ",
18  "correlationId": "monthly-statement-sept-2025",
19  "customFields": "{\"Invoice\": [\"TotalAmountWithTax\"], \"Account\": {\"base\": [\"Phone\", \"Fax\"], \"associated\": [\"Website\"]}}}"
20}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
associatedAccountIdsString[]List of associated account IDs from hierarchy to include in the statement. You can specify up to 50 accounts.Optional66.0
correlationIdStringCorrelation ID for tracking the request across systems.Optional66.0
customFieldsStringJSON string specifying custom fields to include in the statement. As a best practice, we recommend that you limit the number of custom fields up to 30 fields. Valid objects to specify the associated fields are Invoice, CreditMemo, Payment, DebitMemo, Refund, or Account. Here’s the expected format.Optional67.0
documentTemplateIdStringDocument template ID to use for PDF generation. If you don’t specify a value, the system auto-resolves by using the default template.Optional66.0
shouldShowOpenBalancesOnlyBooleanIndicates whether to show open balances only (true) or not (false). If set to true, the API shows only accounts with non-zero balances. If set to false, this API shows complete transaction history within the date range from the start date.Optional66.0
sortByStringCriteria for sorting transactions. The default and valid value is Date.Optional66.0
sortingOrderStringSort order for transactions. Valid values are Ascending or Descending. The default value is Descending.Optional66.0
startDateStringStart date for the transaction history. The required format is YYYY-MM-DD. The system processes records up to 90 days from this date.Required66.0
transactionTypesString[]List of transaction types to include in the statement. If you don’t specify a value or the value is empty, all transaction types are included. Valid values are All, CreditMemo, DebitMemo, Invoice, Payment, or Refund.Optional66.0

Example:

1{"Invoice": ["field1", "field2"], "Account": {"base": ["field1"], "associated": ["field2"]}}

Response Body for POST 

Account Statement Response