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

# Create an accounts receivable ledger

Create a new accounts receivable (AR) ledger for a property. An AR ledger provides a way to track outstanding balances outside of a reservation, such as invoices sent to a corporate client. You must provide a name, and can optionally link the ledger to a profile.


# 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/accounts-receivable-ledgers": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/propertyIdHeader"
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauth2": [
              "write:payment"
            ]
          }
        ],
        "tags": [
          "Accounts Receivable Ledger"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountsReceivableLedgerPostRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "postAccountsReceivableLedger",
        "summary": "Create an accounts receivable ledger",
        "description": "Create a new accounts receivable (AR) ledger for a property. An AR ledger provides a way to track outstanding balances outside of a reservation, such as invoices sent to a corporate client. You must provide a name, and can optionally link the ledger to a profile.\n",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountsReceivableLedgerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          }
        }
      }
    }
  },
  "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"
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiAccountingError"
            }
          }
        }
      }
    },
    "schemas": {
      "ApiAccountingError": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "errorCode": {
            "$ref": "#/components/schemas/ApiErrorCode"
          },
          "errorDetails": {
            "type": "string"
          }
        }
      },
      "AccountsReceivableLedgerStatus": {
        "type": "string",
        "description": "Status of an accounts receivable ledger. OPEN ledgers can receive balance transfers and payments. CLOSED ledgers are settled and no longer accept new transactions.\n",
        "enum": [
          "OPEN",
          "CLOSED"
        ]
      },
      "AccountsReceivableLedgerName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50
      },
      "AccountsReceivableLedgerDescription": {
        "type": "string",
        "minLength": 0,
        "maxLength": 200
      },
      "ApiErrorCode": {
        "type": "string",
        "description": "Error code indicating the type of failure. Use this value for programmatic error handling.\n- `UNKNOWN_ERROR` — An unclassified error occurred. Contact support if this persists.\n- `UNEXPECTED_ERROR` — An unexpected internal error occurred. Retry the request or contact support.\n- `ACCESS_DENIED` — You do not have permission to perform this operation on the specified property.\n- `INVALID_REQUEST` — The request body or parameters are invalid. Check the errorDetails field for specifics.\n- `NOT_UNIQUE_VALUE` — A value that must be unique (such as a name or code) already exists.\n- `INVALID_USER_INFORMATION` — The user information provided is invalid or could not be resolved.\n- `ENTITY_NOT_FOUND` — The requested entity was not found.\n- `ACCOUNTS_RECEIVABLE_LEDGER_FEATURE_DISABLED` — The accounts receivable ledger feature is not enabled for this property.\n- `BOOKING_NOT_FOUND` — The specified reservation or booking was not found.\n- `ACCOUNTS_RECEIVABLE_LEDGER_NOT_FOUND` — The specified accounts receivable ledger was not found.\n- `ACCOUNTS_RECEIVABLE_LEDGER_STATUS_ERROR` — The AR ledger is in a status that does not allow this operation (e.g., attempting to transfer to a closed ledger).\n- `BOOKING_STATUS_ERROR` — The reservation is in a status that does not allow this operation.\n- `GROUP_PROFILE_NOT_FOUND` — The specified group profile was not found.\n- `GROUP_PROFILE_STATUS_ERROR` — The group profile is in a status that does not allow this operation.\n- `GROUP_PROFILE_FOLIO_ERROR` — An error occurred with the group profile folio (e.g., the specified folio does not belong to the group profile).\n- `DEPOSIT_TRANSACTION_CAN_NOT_BE_TRANSFERRED` — The deposit transaction cannot be transferred.\n- `INVALID_ARGUMENT_ERROR` — A provided argument is invalid (e.g., an unrecognized filter or sort field). Check the errorDetails field for specifics.\n- `FOLIO_HAS_TRANSACTIONS` — The folio cannot be deleted because it has transactions assigned to it. Move or unroute the transactions first.\n- `SOURCE_HAS_ROUTED_TRANSACTIONS` — The source's folio configuration cannot be changed because it has routed transactions involving its folios (transactions originating from a reservation source, or routed onto a group source). Unroute the transactions first.\n",
        "enum": [
          "UNKNOWN_ERROR",
          "UNEXPECTED_ERROR",
          "ACCESS_DENIED",
          "INVALID_REQUEST",
          "NOT_UNIQUE_VALUE",
          "INVALID_USER_INFORMATION",
          "ENTITY_NOT_FOUND",
          "ACCOUNTS_RECEIVABLE_LEDGER_FEATURE_DISABLED",
          "BOOKING_NOT_FOUND",
          "ACCOUNTS_RECEIVABLE_LEDGER_NOT_FOUND",
          "ACCOUNTS_RECEIVABLE_LEDGER_STATUS_ERROR",
          "BOOKING_STATUS_ERROR",
          "GROUP_PROFILE_NOT_FOUND",
          "GROUP_PROFILE_STATUS_ERROR",
          "GROUP_PROFILE_FOLIO_ERROR",
          "DEPOSIT_TRANSACTION_CAN_NOT_BE_TRANSFERRED",
          "INVALID_ARGUMENT_ERROR",
          "FOLIO_HAS_TRANSACTIONS",
          "SOURCE_HAS_ROUTED_TRANSACTIONS"
        ]
      },
      "AccountsReceivableLedgerResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "description": {
            "type": "string",
            "minLength": 0,
            "maxLength": 200
          },
          "status": {
            "$ref": "#/components/schemas/AccountsReceivableLedgerStatus"
          },
          "propertyId": {
            "type": "string"
          },
          "profileId": {
            "type": "string",
            "format": "int64",
            "description": "Profile ID associated with this accounts receivable ledger"
          },
          "total": {
            "type": "number",
            "description": "Total amount of all charges transferred to this AR ledger, in the smallest currency unit."
          },
          "paid": {
            "type": "number",
            "description": "Total amount of payments applied to this AR ledger, in the smallest currency unit."
          },
          "balance": {
            "type": "number",
            "description": "Outstanding balance (total minus paid), in the smallest currency unit."
          },
          "createdAt": {
            "type": "string",
            "example": "2017-07-21T17:32:28Z",
            "description": "Created datetime (ISO 8601) in UTC"
          },
          "updatedAt": {
            "type": "string",
            "example": "2017-07-21T17:32:28Z",
            "description": "Updated datetime (ISO 8601) in UTC"
          }
        }
      },
      "AccountsReceivableLedgerPostRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/AccountsReceivableLedgerName"
          },
          "description": {
            "$ref": "#/components/schemas/AccountsReceivableLedgerDescription"
          },
          "profileId": {
            "type": "integer",
            "format": "int64",
            "description": "Linkage with Profile ID"
          }
        }
      }
    }
  }
}
```