---
updatedAt: 2026-04-24T16:37:51.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Calculate initial trial balance

Calculate the initial trial balance for a property based on all historical transaction records up to the end of yesterday (in property local time). Use this endpoint to preview the opening balances before committing the trial balance configuration. The response contains the computed deposit ledger, accounts receivable ledger, and guest ledger opening balances.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Accounting API",
    "version": "v0",
    "description": "The Accounting API provides programmatic access to financial data and operations for hospitality properties. Use this API to manage transactions, folios, deposits, accounts receivable ledgers, trial balances, and related accounting configuration.\n\n**Key concepts:**\n- **Transactions** represent individual financial entries (charges, payments,\n  taxes, fees) associated with a source such as a reservation, group profile,\n  or house account.\n\n- **Folios** organize transactions into logical groups within a source. You\n  can create custom folios and move or route transactions between them.\n\n- **Source Balances** provide a real-time financial summary (charges, payments,\n  balance due, tax/fee breakdowns) for a reservation, group profile, house\n  account, or accounts receivable ledger.\n\n- **Accounts Receivable (AR) Ledgers** track outstanding balances that have\n  been transferred from reservations or group profiles for later collection.\n\n- **Trial Balance** is a daily financial reconciliation report that summarizes\n  ledger activity across guest, deposit, and AR ledgers.\n\n- **Custom Codes** let you map Cloudbeds internal transaction codes to your\n  own chart-of-accounts codes and general ledger codes.\n\n\n**Authentication:**\nAll endpoints require a valid OAuth2 bearer token. Endpoints are protected by scopes: `read:payment` for read operations and `write:payment` for mutating operations. A few search endpoints use POST with a request body to support complex filter criteria; these require the `read:payment` scope.\n\n**Base URL:**\nUse `https://api.cloudbeds.com` for production and `https://api.cloudbeds-stage.com` for staging. All endpoint paths are prefixed with `/accounting/v1.0`.\n\n**Property context:**\nEvery request must include the `X-Property-ID` header to identify which property the request applies to.\n\n**Monetary amounts:**\nUnless otherwise noted, monetary amounts are expressed in the smallest currency unit (e.g., cents for USD). Use the `currencyScale` field to determine the number of decimal places.\n\n**Pagination:**\nPaginated endpoints return a `nextPageToken` value. Pass this token in subsequent requests to retrieve the next page of results. When `nextPageToken` is null or absent, you have reached the last page.\n"
  },
  "servers": [
    {
      "url": "https://api.cloudbeds.com"
    }
  ],
  "paths": {
    "/accounting/v1.0/trial-balance/configuration/calculate": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/propertyIdHeader"
          }
        ],
        "operationId": "calculateTrialBalance",
        "summary": "Calculate initial trial balance",
        "description": "Calculate the initial trial balance for a property based on all historical transaction records up to the end of yesterday (in property local time). Use this endpoint to preview the opening balances before committing the trial balance configuration. The response contains the computed deposit ledger, accounts receivable ledger, and guest ledger opening balances.\n",
        "tags": [
          "Trial balance"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "read:payment"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrialBalanceResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://hotels.cloudbeds.com/api/v1.2/oauth",
            "scopes": {
              "read:payment": "Read payment and transaction information",
              "write:payment": "Create, update, or delete payment and transaction data"
            }
          }
        }
      }
    },
    "parameters": {
      "propertyIdHeader": {
        "name": "X-Property-ID",
        "in": "header",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "description": "Unique identifier of the property. Required for all requests to scope data to a specific property.\n"
      }
    },
    "schemas": {
      "TrialBalanceResponse": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Date of the trial balance.",
            "format": "date"
          },
          "depositsLedgerOpeningBalance": {
            "type": "number",
            "description": "Deposit ledger opening balance in major currency units, scaled to the property currency."
          },
          "accountsReceivableLedgerOpeningBalance": {
            "type": "number",
            "description": "Accounts receivable ledger opening balance in major currency units, scaled to the property currency."
          },
          "guestLedgerOpeningBalance": {
            "type": "number",
            "description": "Guest ledger opening balance in major currency units, scaled to the property currency."
          }
        }
      }
    }
  }
}
```