Example 4: Update Accommodation Type
Steps to recreate
- Generate initial transactions on Cloudbeds
- Create origin accommodation and room rate
- Create new accommodation and room rate
- Create a reservation for past 1 night and next day in origin accomodation
- Change room type for second accommodation
What Changes
Before: getTransactions would return 4 transactions. 2 for room rates and 2 for fees.
After: getTransactions would return 8 transactions, the original 4, plus 2 for the new accommodation night and 2 for the fees.
Request and Response Examples
Transactions from Cloudbeds API GetTransactions when property is NOT transitioned to the Cloudbeds Accounting Service
Curl Request
curl --location 'https://api.cloudbeds-stage.com/accounting/v1.0/transactions'
--header 'content-type: application/json'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-Property-Id: 1137897'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "27974559",
"field": "SOURCE_ID"
},
{
"operator": "equals",
"value": "RESERVATION",
"field": "SOURCE_KIND"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "ID",
"direction": "asc"
}
]
}'
JSON Response
[
{
"id": "54741583618286",
"propertyId": "1137897",
"internalTransactionCode": "1000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 50.00,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618286",
"parentId": null,
"sourceId": "27974559",
"subSourceId": "40210092",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210092",
"externalRelationKind": "ROOM",
"originId": "541290",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:05.648106Z",
"transactionDatetime": "2025-01-01T18:28:05.648106Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:05.648106Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:05.648125Z"
},
{
"id": "54741583618287",
"propertyId": "1137897",
"internalTransactionCode": "8100",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 1.25,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618287",
"parentId": "54741583618286",
"sourceId": "27974559",
"subSourceId": "40210092",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210092",
"externalRelationKind": "ROOM",
"originId": "191019",
"routedFrom": null,
"quantity": 1,
"description": "fee",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:05.648106Z",
"transactionDatetime": "2025-01-01T18:28:05.648106Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:05.648106Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:05.648169Z"
},
{
"id": "54741583618297",
"propertyId": "1137897",
"internalTransactionCode": "1000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 50.00,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618297",
"parentId": null,
"sourceId": "27974559",
"subSourceId": "40210093",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210093",
"externalRelationKind": "ROOM",
"originId": "541291",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen2",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:09.255392Z",
"transactionDatetime": "2025-01-01T18:28:09.255392Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:09.255392Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:09.255407Z"
},
{
"id": "54741583618298",
"propertyId": "1137897",
"internalTransactionCode": "8100",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 1.25,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618298",
"parentId": "54741583618297",
"sourceId": "27974559",
"subSourceId": "40210093",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210093",
"externalRelationKind": "ROOM",
"originId": "191019",
"routedFrom": null,
"quantity": 1,
"description": "fee",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:09.255392Z",
"transactionDatetime": "2025-01-01T18:28:09.255392Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:09.255392Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:09.255439Z"
},
{
"id": "54741583618299",
"propertyId": "1137897",
"internalTransactionCode": "1000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 50.00,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618299",
"parentId": null,
"sourceId": "27974559",
"subSourceId": "40210093",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210093",
"externalRelationKind": "ROOM",
"originId": "541291",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen2",
"userId": "1233160",
"sourceDatetime": "2025-01-02T07:48:28.955749Z",
"transactionDatetime": "2025-01-02T07:48:28.955749Z",
"transactionDatetimePropertyTime": "2025-01-02T07:48:28.955749Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-02T07:48:28.955766Z"
},
{
"id": "54741583618300",
"propertyId": "1137897",
"internalTransactionCode": "8100",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 1.25,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618300",
"parentId": "54741583618299",
"sourceId": "27974559",
"subSourceId": "40210093",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210093",
"externalRelationKind": "ROOM",
"originId": "191019",
"routedFrom": null,
"quantity": 1,
"description": "fee",
"userId": "1233160",
"sourceDatetime": "2025-01-02T07:48:28.955749Z",
"transactionDatetime": "2025-01-02T07:48:28.955749Z",
"transactionDatetimePropertyTime": "2025-01-02T07:48:28.955749Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-02T07:48:28.955793Z"
},
{
"id": "54741583618301",
"propertyId": "1137897",
"internalTransactionCode": "1000V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -50.00,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618286",
"parentId": null,
"sourceId": "27974559",
"subSourceId": "40210092",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210092",
"externalRelationKind": "ROOM",
"originId": "541290",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:07Z",
"transactionDatetime": "2025-01-01T18:28:07.927674Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:07.927674Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:07.927707Z"
},
{
"id": "54741583618302",
"propertyId": "1137897",
"internalTransactionCode": "8100V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -1.25,
"currency": "USD",
"customerId": "27006679",
"rootId": "54741583618287",
"parentId": null,
"sourceId": "27974559",
"subSourceId": "40210092",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210092",
"externalRelationKind": "ROOM",
"originId": "191019",
"routedFrom": null,
"quantity": 1,
"description": "fee",
"userId": "1233160",
"sourceDatetime": "2025-01-01T18:28:07Z",
"transactionDatetime": "2025-01-01T18:28:07.927674Z",
"transactionDatetimePropertyTime": "2025-01-01T18:28:07.927674Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:28:07.92773Z"
}
]
Transactions from Cloudbeds API GetTransactions when property is NOT transitioned to the Cloudbeds Accounting Service
Curl Request
curl --location 'https://hotels.cloudbeds-stage.com/api/v1.1/getTransactions?propertyID=1137897&reservationId=3629181440474&pageSize=20&includeDeleted=true'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-PROPERTY-ID: 1137897'
JSON Response
[{
"propertyID": "1137892",
"reservationID": "4244170543060",
"subReservationID": "4244170543060",
"houseAccountID": null,
"houseAccountName": null,
"guestID": "27007171",
"propertyName": "ACC-TEST-37c15c3d-61c6-4655-a53e-40793c43ef7b",
"transactionDateTime": "2025-01-02 13:53:52",
"transactionDateTimeUTC": "2025-01-02 13:53:52",
"transactionModifiedDateTime": "2025-01-02 13:53:52",
"transactionModifiedDateTimeUTC": "2025-01-02 13:53:52",
"guestCheckIn": "2025-01-01",
"guestCheckOut": "2025-01-02",
"roomTypeID": "541285",
"roomTypeName": "Queen",
"roomName": "QUE1",
"guestName": "Test Vod vod",
"description": "tax (Void)",
"category": "Taxes",
"transactionCode": "Yen",
"notes": "",
"quantity": "1",
"amount": -0.35,
"currency": "USD",
"userName": "SYSTEM",
"transactionType": "debit",
"transactionCategory": "void",
"itemCategoryName": "void",
"transactionID": "55052009722028",
"parentTransactionID": "55052009722025",
"cardType": null,
"isDeleted": false
},
{
"propertyID": "1137892",
"reservationID": "4244170543060",
"subReservationID": "4244170543060",
"houseAccountID": null,
"houseAccountName": null,
"guestID": "27007171",
"propertyName": "ACC-TEST-37c15c3d-61c6-4655-a53e-40793c43ef7b",
"transactionDateTime": "2025-01-02 13:53:40",
"transactionDateTimeUTC": "2025-01-02 13:53:40",
"transactionModifiedDateTime": "2025-01-02 13:53:40",
"transactionModifiedDateTimeUTC": "2025-01-02 13:53:40",
"guestCheckIn": "2025-01-01",
"guestCheckOut": "2025-01-02",
"roomTypeID": "541285",
"roomTypeName": "Queen",
"roomName": "QUE1",
"guestName": "Test Vod vod",
"description": "fee (Void)",
"category": "Fees",
"transactionCode": "Yen",
"notes": "",
"quantity": "1",
"amount": -10,
"currency": "USD",
"userName": "SYSTEM",
"transactionType": "debit",
"transactionCategory": "void",
"itemCategoryName": "void",
"transactionID": "55052009722027",
"parentTransactionID": "55052009722024",
"cardType": null,
"isDeleted": false
},
{
"propertyID": "1137892",
"reservationID": "4244170543060",
"subReservationID": "4244170543060",
"houseAccountID": null,
"houseAccountName": null,
"guestID": "27007171",
"propertyName": "ACC-TEST-37c15c3d-61c6-4655-a53e-40793c43ef7b",
"transactionDateTime": "2025-01-02 13:53:31",
"transactionDateTimeUTC": "2025-01-02 13:53:31",
"transactionModifiedDateTime": "2025-01-02 13:53:31",
"transactionModifiedDateTimeUTC": "2025-01-02 13:53:31",
"guestCheckIn": "2025-01-01",
"guestCheckOut": "2025-01-02",
"roomTypeID": "541285",
"roomTypeName": "Queen",
"roomName": "QUE1",
"guestName": "Test Vod vod",
"description": "tax",
"category": "Taxes",
"transactionCode": "Yen",
"notes": "",
"quantity": "1",
"amount": 0.35,
"currency": "USD",
"userName": "SYSTEM",
"transactionType": "debit",
"transactionCategory": "tax",
"itemCategoryName": "tax",
"transactionID": "55052009722025",
"parentTransactionID": "55052009722024",
"cardType": null,
"isDeleted": false
},
{
"propertyID": "1137892",
"reservationID": "4244170543060",
"subReservationID": "4244170543060",
"houseAccountID": null,
"houseAccountName": null,
"guestID": "27007171",
"propertyName": "ACC-TEST-37c15c3d-61c6-4655-a53e-40793c43ef7b",
"transactionDateTime": "2025-01-02 13:53:31",
"transactionDateTimeUTC": "2025-01-02 13:53:31",
"transactionModifiedDateTime": "2025-01-02 13:53:31",
"transactionModifiedDateTimeUTC": "2025-01-02 13:53:31",
"guestCheckIn": "2025-01-01",
"guestCheckOut": "2025-01-02",
"roomTypeID": "541285",
"roomTypeName": "Queen",
"roomName": "QUE1",
"guestName": "Test Vod vod",
"description": "fee",
"category": "Fees",
"transactionCode": "Yen",
"notes": "",
"quantity": "1",
"amount": 10,
"currency": "USD",
"userName": "SYSTEM",
"transactionType": "debit",
"transactionCategory": "fee",
"itemCategoryName": "fee",
"transactionID": "55052009722024",
"parentTransactionID": "",
"cardType": null,
"isDeleted": false
},
{
"propertyID": "1137892",
"reservationID": "4244170543060",
"subReservationID": "4244170543060",
"houseAccountID": null,
"houseAccountName": null,
"guestID": "27007171",
"propertyName": "ACC-TEST-37c15c3d-61c6-4655-a53e-40793c43ef7b",
"transactionDateTime": "2025-01-01 23:59:00",
"transactionDateTimeUTC": "2025-01-01 23:59:00",
"transactionModifiedDateTime": "2025-01-02 13:52:36",
"transactionModifiedDateTimeUTC": "2025-01-02 13:52:36",
"guestCheckIn": "2025-01-01",
"guestCheckOut": "2025-01-02",
"roomTypeID": "541285",
"roomTypeName": "Queen",
"roomName": "QUE1",
"guestName": "Test Vod vod",
"description": "Room rate - Queen",
"category": "Room Revenue",
"transactionCode": "",
"notes": "",
"quantity": "1",
"amount": 50,
"currency": "USD",
"userName": "SYSTEM",
"transactionType": "debit",
"transactionCategory": "rate",
"itemCategoryName": "rate",
"transactionID": "55052009722022",
"parentTransactionID": "",
"cardType": null,
"isDeleted": false
}
]
Updated 8 days ago