Documentation to support Cloudbeds API Transaction Termination

Introduction

The transactional data in Cloudbeds has undergone a transformation to a more robust solution that is completely immutable and provides the building blocks for features like Deposits and A/R Ledgers. With this transformation, we will be deprecating and replacing some endpoints, as well as removing the transactionID from some other endpoints. Below you will find a list of endpoints and webhooks that will be deprecated or updated.

Endpoints that are being deprecated:
getTransactions
getAdjustment
getAdjustments
getHouseAccountDetails
getPayments

Endpoints that will have the transactionID removed:
postPayment
postCharge
postItem
postCustomItem
appendCustomItem

Webhook that will be replaced with a new webhook from Accounting Service:
Transaction webhook

Using /accounting/v1.0/transactions to request transactional data

The /accounting/v1.0/transactions endpoint replaces the functionality of the deprecated endpoints. For those endpoints where the transactionID is being removed, there is other data that is already returned within them that can be used to find the transactional data in the /accounting/v1.0/transactions endpoint.

Below are a few examples of how you can pull transactional data from the accounting/v1.0/transactions endpoint.
Using Source_Kind to search for transactions by Reservation ID.

To identify that you want to search for reservations you set a field as “source_kind” with a value of “RESERVATION”. Then to identify a specific reservation you set a field as “source_id” with a value equal to the reservation number. So to pull all transactions for a reservation the request would look like this:

curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "27975057",
"field": "source_identifier"
},
{
"operator": "equals",
"value": "RESERVATION",
"field": "source_kind"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "id",
"direction": "asc"
}
]
}'

The schemas at the bottom of the Accounting service API provides the full list of values that can be used with “source_kind”.

Using a Date Range to search for transactions

To search for transactions within a specific range you will need to add 2 operators for the beginning and end of the range. For example you can set one operator to “greater_than_or_equal” and another for “less_than_or_equal”. So to pull all the transactions for a single date the request would look like this:

curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"operator": "greater_than_or_equal",
"value": "2025-01-01T00:00:00",
"field": "transaction_datetime"
},
{
"operator": "less_than_or_equal",
"value": "2025-01-02T00:00:00",
"field": "transaction_datetime"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "id",
"direction": "asc"
}
]
}'

And if you wanted to request all transactions for a single date for a single reservation, the request would look like this:

curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "27975057",
"field": "source_identifier"
},
{
"operator": "equals",
"value": "RESERVATION",
"field": "source_kind"
},
{
"operator": "greater_than_or_equal",
"value": "2025-01-01T00:00:00",
"field": "transaction_datetime"
},
{
"operator": "less_than_or_equal",
"value": "2025-01-02T00:00:00",
"field": "transaction_datetime"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "id",
"direction": "asc"
}
]
}'

Requesting a specific Transaction ID

To request a specific Transaction ID set the field as “id” and the value as the transaction ID.

Note: The “transactionID” from the /getTransactions API is not the same “id” for the transactions in the /accounting/v1.0/transactions request, these two endpoints use different IDs for the transaction.

curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "12345",
"field": "id"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "id",
"direction": "asc"
}
]
}'

Using External_Relation_Kind to search for payment transactions
To identify that you want to search for payments you set the field as “external_relation_kind” with a value of “PAYMENT”. Then to identify a specific payment you set the field as “external_relation_id” with a value equal to the payment id. So to pull the transaction for that payment the request would look like this:

Payment
curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "27975057",
"field": "external_relation_id"
},
{
"operator": "equals",
"value": "PAYMENT",
"field": "external_relation_kind"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "id",
"direction": "asc"
}
]
}'

The schema at the bottom of the Accounting service API provides the full list of values that can be used with “external_relation_kind”, such as Adjustment and Items as seen below.

Adjustment
curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"and": [
{
"operator": "equals",
"value": "91129620377732",
"field": "EXTERNAL_RELATION_ID"
},
{
"operator": "equals",
"value": "ADJUSTMENT",
"field": "EXTERNAL_RELATION_KIND"
}
]
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "CREATED_AT",
"direction": "asc"
}
]
}'

Items added to a reservation via postCustomItem
To note: when an item is posted via the postCustom item it will be predicated with a “p_”. This needs to be removed from the request when requesting transactional data via the /accounting/v1.0/transactions endpoint.

curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"and": [
{
"operator": "equals",
"value": "123456",
"field": "EXTERNAL_RELATION_ID"
},
{
"operator": "equals",
"value": "ITEM_POS",
"field": "EXTERNAL_RELATION_KIND"
}
]
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "CREATED_AT",
"direction": "asc"
}
]
}'

Items added to a reservation via another method
curl --location '<https://api.cloudbeds.com/accounting/v1.0/transactions'>
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137892'
--data '{
"filters": {
"and": [
{
"and": [
{
"operator": "equals",
"value": "987654",
"field": "EXTERNAL_RELATION_ID"
},
{
"operator": "equals",
"value": "ITEM",
"field": "EXTERNAL_RELATION_KIND"
}
]
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "CREATED_AT",
"direction": "asc"
}
]
}'