Skip to main content

OpenAPI client for Cloudbeds Accounting API.

Project description

Cloudbeds Accounting

The Cloudbeds Accounting Service 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. Key concepts: - Transactions represent individual financial entries (charges, payments, taxes, fees) associated with a source such as a reservation, group profile, or house account. - Folios organize transactions into logical groups within a source. You can create custom folios and move or route transactions between them. - Source Balances provide a real-time financial summary (charges, payments, balance due, tax/fee breakdowns) for a reservation, group profile, house account, or accounts receivable ledger. - Accounts Receivable (AR) Ledgers track outstanding balances that have been transferred from reservations or group profiles for later collection. - Trial Balance is a daily financial reconciliation report that summarizes ledger activity across guest, deposit, and AR ledgers. - Custom Codes let you map Cloudbeds internal transaction codes to your own chart-of-accounts codes and general ledger codes. Authentication: All 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. Base URL: Use https://api.cloudbeds.com for production and https://api.cloudbeds-stage.com for staging. All endpoint paths are prefixed with /accounting/v1.0. Property context: Every request must include the X-Property-ID header to identify which property the request applies to. Monetary amounts: Unless 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. Pagination: Paginated 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.

The cloudbeds_accounting package is automatically generated by the OpenAPI Generator project:

  • API version: v0
  • Package version: 1.7.0
  • Generator version: 7.20.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

This python library package is generated without supporting files like setup.py or requirements files

To be able to use it, you will need these dependencies in your own package that uses this library:

  • urllib3 >= 2.1.0, < 3.0.0
  • python-dateutil >= 2.8.2
  • pydantic >= 2
  • typing-extensions >= 4.7.1

Getting Started

In your own code, to use this library to connect and interact with Cloudbeds Accounting, you can run the following:

import cloudbeds_accounting
from cloudbeds_accounting.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.cloudbeds-stage.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_accounting.Configuration(
    host = "https://api.cloudbeds-stage.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]


# Enter a context with an instance of the API client
with cloudbeds_accounting.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cloudbeds_accounting.AccountsReceivableLedgerApi(api_client)
    x_property_id = 56 # int | Unique identifier of the property. Required for all requests to scope data to a specific property. 
    accounts_receivable_ledger_id = 56 # int | Unique identifier of the accounts receivable ledger.
    reservation_id = 56 # int | Reservation ID

    try:
        # Reverse a reservation-to-AR balance transfer
        api_response = api_instance.delete_accounts_receivable_ledger_reservation_balance_transfer(x_property_id, accounts_receivable_ledger_id, reservation_id)
        print("The response of AccountsReceivableLedgerApi->delete_accounts_receivable_ledger_reservation_balance_transfer:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountsReceivableLedgerApi->delete_accounts_receivable_ledger_reservation_balance_transfer: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.cloudbeds-stage.com

Class Method HTTP request Description
AccountsReceivableLedgerApi delete_accounts_receivable_ledger_reservation_balance_transfer DELETE /accounting/v1.0/accounts-receivable-ledgers/{accountsReceivableLedgerId}/reservation/{reservationId}/balance-transfer Reverse a reservation-to-AR balance transfer
AccountsReceivableLedgerApi get_accounts_receivable_ledger_by_id GET /accounting/v1.0/accounts-receivable-ledgers/{accountsReceivableLedgerId} Get an accounts receivable ledger by ID
AccountsReceivableLedgerApi get_accounts_receivable_ledger_reservation_balance_transfer GET /accounting/v1.0/accounts-receivable-ledgers/reservation/{reservationId}/balance-transfer Get AR balance transfer details for a reservation
AccountsReceivableLedgerApi get_accounts_receivable_ledger_totals GET /accounting/v1.0/accounts-receivable-ledgers/totals Get AR ledger totals
AccountsReceivableLedgerApi get_accounts_receivable_ledger_transactions GET /accounting/v1.0/accounts-receivable-ledgers/{accountsReceivableLedgerId}/transactions List transactions for an AR ledger
AccountsReceivableLedgerApi get_accounts_receivable_ledgers GET /accounting/v1.0/accounts-receivable-ledgers List accounts receivable ledgers
AccountsReceivableLedgerApi patch_accounts_receivable_ledger PATCH /accounting/v1.0/accounts-receivable-ledgers Update an accounts receivable ledger
AccountsReceivableLedgerApi post_accounts_receivable_ledger POST /accounting/v1.0/accounts-receivable-ledgers Create an accounts receivable ledger
AccountsReceivableLedgerApi post_accounts_receivable_ledger_group_balance_transfer POST /accounting/v1.0/accounts-receivable-ledgers/{accountsReceivableLedgerId}/group-profile/{groupProfileId}/balance-transfer Transfer a group profile balance to an AR ledger
AccountsReceivableLedgerApi post_accounts_receivable_ledger_reservation_balance_transfer POST /accounting/v1.0/accounts-receivable-ledgers/{accountsReceivableLedgerId}/reservation/{reservationId}/balance-transfer Transfer a reservation balance to an AR ledger
CustomGeneralLedgerCodesApi get_custom_general_ledger_codes GET /accounting/v1.0/custom-general-ledger-codes List custom general ledger codes
CustomGeneralLedgerCodesApi put_custom_general_ledger_codes PUT /accounting/v1.0/custom-general-ledger-codes Create or update custom general ledger codes
CustomTransactionCodesApi get_custom_transaction_codes GET /accounting/v1.0/custom-transaction-codes List custom transaction codes
CustomTransactionCodesApi initialize_custom_transaction_codes POST /accounting/v1.0/custom-transaction-codes/initialize Initialize custom transaction codes
CustomTransactionCodesApi put_custom_transaction_codes PUT /accounting/v1.0/custom-transaction-codes Update custom transaction code mappings
DepositsApi get_deposit_balance GET /accounting/v1.0/deposits/balance Get deposit balance
DepositsApi get_deposit_transactions GET /accounting/v1.0/deposits/transactions List deposit transactions
DepositsApi post_deposits_transfer POST /accounting/v1.0/deposits/transfer Transfer deposit transactions
FolioConfigurationApi assign_folio_configuration_to_source PUT /accounting/v1.0/folios/configurations/sources
FolioConfigurationApi delete_folio_configuration DELETE /accounting/v1.0/folios/configurations/{id} Delete a folio configuration
FolioConfigurationApi get_folio_configuration GET /accounting/v1.0/folios/configurations/{id}
FolioConfigurationApi get_folio_configuration_source GET /accounting/v1.0/folios/configurations/sources
FolioConfigurationApi get_folio_configurations GET /accounting/v1.0/folios/configurations
FolioConfigurationApi get_routing_rules GET /accounting/v1.0/folios/rules Get autorouting rules
FolioConfigurationApi save_folio_configuration PUT /accounting/v1.0/folios/configurations Create or update a folio configuration
FolioConfigurationApi set_folio_configuration_default POST /accounting/v1.0/folios/configurations/{id}/set-default Set the default folio configuration
FoliosApi create_folio POST /accounting/v1.0/folios Create a folio
FoliosApi delete_folio DELETE /accounting/v1.0/folios/{id} Delete a folio
FoliosApi get_folios GET /accounting/v1.0/folios List folios for a source
FoliosApi list_folio_transactions POST /accounting/v1.0/folios/transactions Search folio transactions
FoliosApi move_transactions POST /accounting/v1.0/folios/transactions/move Move transactions between folios
FoliosApi route_transactions POST /accounting/v1.0/folios/transactions/route Route transactions to a group profile
FoliosApi unroute_transactions POST /accounting/v1.0/folios/transactions/unroute Unroute transactions from a group profile
FoliosApi update_folio PUT /accounting/v1.0/folios/{id} Update a folio
InternalTransactionCodesApi get_internal_transaction_codes GET /accounting/v1.0/internal-transaction-codes List internal transaction codes
SettingsApi get_settings GET /accounting/v1.0/settings Get property accounting settings
SettingsApi patch_settings PATCH /accounting/v1.0/settings Update property accounting settings
SourceBalanceApi get_source_balance_by_source GET /accounting/v1.0/source-balances/{sourceKind}/{sourceId} Get source balance
SourceBalanceApi get_source_balance_snapshot_by_source GET /accounting/v1.0/source-balances/snapshots/{reservationId}
TransactionsApi list_pending_transactions POST /accounting/v1.0/pending-transactions Search pending transactions
TransactionsApi list_transactions POST /accounting/v1.0/transactions Search posted transactions
TrialBalanceApi calculate_trial_balance POST /accounting/v1.0/trial-balance/configuration/calculate Calculate initial trial balance
TrialBalanceApi get_trial_balance_configuration GET /accounting/v1.0/trial-balance/configuration Get trial balance configuration
TrialBalanceApi get_trial_balance_report GET /accounting/v1.0/trial-balance/report Get trial balance report
TrialBalanceApi is_trial_balance_configured GET /accounting/v1.0/trial-balance/configuration/status Check trial balance configuration status
TrialBalanceApi set_trial_balance POST /accounting/v1.0/trial-balance/configuration Configure trial balance

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: 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

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudbeds_accounting-1.7.0.tar.gz (124.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudbeds_accounting-1.7.0-py3-none-any.whl (569.0 kB view details)

Uploaded Python 3

File details

Details for the file cloudbeds_accounting-1.7.0.tar.gz.

File metadata

  • Download URL: cloudbeds_accounting-1.7.0.tar.gz
  • Upload date:
  • Size: 124.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cloudbeds_accounting-1.7.0.tar.gz
Algorithm Hash digest
SHA256 60e11aa5f4b8d07d4c75ae01b12419b6627abf695211815e623322d8047f5b12
MD5 49fb7b4f05056072be474e9df8629367
BLAKE2b-256 cb971170fae1f7a436d1ad3ec62cb4fcc302a58820822be41459252bfce25d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudbeds_accounting-1.7.0.tar.gz:

Publisher: publish.yaml on cloudbeds/cloudbeds-accounting-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudbeds_accounting-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudbeds_accounting-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adc55d36d68272612709bc1d914503ecaf21fea8ad93a3c99530b2b9594ad004
MD5 f521f064c9b385414e79d32587f2a2bc
BLAKE2b-256 fb30f243046ec38e47b61fdd2c9e5210466469311f3f19ee71897f5660ce91f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudbeds_accounting-1.7.0-py3-none-any.whl:

Publisher: publish.yaml on cloudbeds/cloudbeds-accounting-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page