Example 3: Delete a Reservation
Steps to recreate
- Generate initial transactions on Cloudbeds
- Create a product
- Create accommodation and room rate
- Create a reservation for past 1 night
- Add Item Charge to Reservation
- Add Custom Item to Reservation
- Add Room revenue to reservation
- Capture a payment
- Checkout and delete a reservation
What Changes
Before: The getTransations endpoint would return 6 transactions for this reservation.
After: The getTransactions endpoint would return 12 transactions
- 6 transactions for the original reservation and 6 transactions for voiding the transactions.
Request and Response Examples
Transactions from 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: 1137886'
--data '{
"filters": {
"and": [
{
"operator": "equals",
"value": "27974548",
"field": "SOURCE_ID"
},
{
"operator": "equals",
"value": "RESERVATION",
"field": "SOURCE_KIND"
}
]
},
"pageSize": 100,
"orderBy": [
{
"field": "ID",
"direction": "asc"
}
]
}'
JSON Response
[
{
"id": "54741224788176",
"propertyId": "1137886",
"internalTransactionCode": "1000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 50.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788176",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210081",
"externalRelationKind": "ROOM",
"originId": "541279",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:14.362793Z",
"transactionDatetime": "2025-01-01T18:15:14.362793Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:14.362793Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:15:14.36281Z"
},
{
"id": "54741224788179",
"propertyId": "1137886",
"internalTransactionCode": "2000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 100.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788179",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "10487960",
"externalRelationKind": "ITEM",
"originId": "672852",
"routedFrom": null,
"quantity": 1,
"description": "product",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:15Z",
"transactionDatetime": "2025-01-01T18:15:15.826947Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:15.826947Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:15.826923Z"
},
{
"id": "54741224788180",
"propertyId": "1137886",
"internalTransactionCode": "4000",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 150.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788180",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "746191",
"externalRelationKind": "ITEM_POS",
"originId": "103266",
"routedFrom": null,
"quantity": 1,
"description": "custom-item",
"userId": "0",
"sourceDatetime": "2025-01-01T18:15:18.422586Z",
"transactionDatetime": "2025-01-01T18:15:18.422586Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:18.422586Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:18.422632Z"
},
{
"id": "54741224788183",
"propertyId": "1137886",
"internalTransactionCode": "1100",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 5.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788183",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "54788757217422",
"externalRelationKind": "ROOM_REVENUE",
"originId": "541279",
"routedFrom": null,
"quantity": 1,
"description": "Room Revenue - Manual",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:20.810993Z",
"transactionDatetime": "2025-01-01T18:15:20.810993Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:20.810993Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:20.811046Z"
},
{
"id": "54741224788185",
"propertyId": "1137886",
"internalTransactionCode": "9300A",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 82.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788185",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "32675502",
"externalRelationKind": "PAYMENT",
"originId": "cards",
"routedFrom": null,
"quantity": 1,
"description": "Credit Card - Refund Recorded",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:23Z",
"transactionDatetime": "2025-01-01T18:15:23.830851Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:23.830851Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:23.830808Z"
},
{
"id": "54741224788186",
"propertyId": "1137886",
"internalTransactionCode": "9300",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -20.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788186",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "32675504",
"externalRelationKind": "PAYMENT",
"originId": "cards_visa",
"routedFrom": null,
"quantity": 1,
"description": "Credit Card - Visa x1111 - Payment Processed by Cloudbeds Payments",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:30Z",
"transactionDatetime": "2025-01-01T18:15:30.843826Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:30.843826Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:30.843787Z"
},
{
"id": "54741224788190",
"propertyId": "1137886",
"internalTransactionCode": "9300V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": 20.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788186",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "32675504",
"externalRelationKind": "PAYMENT",
"originId": "cards_visa",
"routedFrom": null,
"quantity": 1,
"description": "Credit Card - Visa x1111 - Void Processed by Cloudbeds Payments",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:42.152941Z"
},
{
"id": "54741224788191",
"propertyId": "1137886",
"internalTransactionCode": "9300V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -82.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788185",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "32675502",
"externalRelationKind": "PAYMENT",
"originId": "cards",
"routedFrom": null,
"quantity": 1,
"description": "Credit Card - Void Recorded",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:42.153093Z"
},
{
"id": "54741224788192",
"propertyId": "1137886",
"internalTransactionCode": "2000V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -100.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788179",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "10487960",
"externalRelationKind": "ITEM",
"originId": "672852",
"routedFrom": null,
"quantity": 1,
"description": "product",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:42.153119Z"
},
{
"id": "54741224788193",
"propertyId": "1137886",
"internalTransactionCode": "1000V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -50.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788176",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "40210081",
"externalRelationKind": "ROOM",
"originId": "541279",
"routedFrom": null,
"quantity": 1,
"description": "Room rate - Queen",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2024-12-31",
"createdAt": "2025-01-01T18:15:42.153129Z"
},
{
"id": "54741224788194",
"propertyId": "1137886",
"internalTransactionCode": "1100V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -5.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788183",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "54788757217422",
"externalRelationKind": "ROOM_REVENUE",
"originId": "541279",
"routedFrom": null,
"quantity": 1,
"description": "Room Revenue - Manual",
"userId": "1233149",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:42.153135Z"
},
{
"id": "54741224788195",
"propertyId": "1137886",
"internalTransactionCode": "4000V",
"customTransactionCode": null,
"generalLedgerCustomCode": null,
"amount": -150.00,
"currency": "USD",
"customerId": "27006668",
"rootId": "54741224788180",
"parentId": null,
"sourceId": "27974548",
"subSourceId": "40210081",
"sourceKind": "RESERVATION",
"account": null,
"externalRelationId": "746191",
"externalRelationKind": "ITEM_POS",
"originId": "103266",
"routedFrom": null,
"quantity": 1,
"description": "custom-item",
"userId": "0",
"sourceDatetime": "2025-01-01T18:15:41Z",
"transactionDatetime": "2025-01-01T18:15:42.15289Z",
"transactionDatetimePropertyTime": "2025-01-01T18:15:42.15289Z",
"serviceDate": "2025-01-01",
"createdAt": "2025-01-01T18:15:42.153141Z"
}
]
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=1137886&reservationId=4244170543060&pageSize=20&includeDeleted=true'
--header 'Authorization: Bearer INSERT_TOKEN'
--header 'X-PROPERTY-ID: 1137886'
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 20 days ago