Schema Mapping Accounting API & Cloudbeds API

This document provides a schema mapping between the Accounting API and Cloudbeds API. Cloudbeds API serves as the root system, and fields from the Accounting API will feed into and populate the Cloudbeds API. Fields that can be mapped directly are linked, while those that cannot are marked as “Not Migratable.”

Cloudbeds APIAccounting APIMapping Notes
transactionIDidDirect mapping.
propertyIDpropertyIdDirect mapping.
transactionCodeThere is no direct mapping and we can’t use additional info to map it
notesnotesDirect mapping.
categoryThere is no direct mapping. Information for custom item is missing
amountamountDirect Mapping
currencycurrencyDirect Mapping
guestIDDirect mapping with customer_id
parentTransactionIDparentIdDirect Mapping
reservationIDDirect mapping from Booking table
subReservationIDsubSourceIdDirect mapping from Booking Room table
transactionCategoryOn the public API the available values are adjustment, addon, custom_item, fee, payment, product, rate, room_revenue, refund, tax, void so we can map them based on the internal transaction code
houseAccountIDIt maps to sourceId when SOURCE KIND is HOUSE ACCOUNT
houseAccountNameWe don’t have this information available to map
roomTypeIDDirect mapping from Booking room table
roomTypeNameWe don’t have this information available to map
roomNameWe don’t have this information available to map
descriptiondescriptionMaps directly, but there might be differences that should be reported.
quantityquantityMaps Directly
userNamePull from user service
transactionDateTimetransactionDatetimePropertyTimeMaps to Transaction Datetime, but on Public API might refer to the service date
transactionDateTimeUTCtransactionDatetimeMaps to Transaction Datetime, but on Public API might refer to the service date
transactionModifiedDateTimeNo Mapping. Accounting is immutable so this field does not make sense
transactionModifiedDateTimeUTCNo Mapping. Accounting is immutable so this field does not make sense
guestCheckInDirect mapping from Booking table
guestCheckOutDirect mapping from Booking table
cardTypePulled from payment service
isDeletedAlways false
propertyNamePulled from org service
transactionTypeNo direct mapping but we will need to implement logic to understand if the transaction is debit or credit since it is what this transaction represents debit, credit
itemCategoryNameNo direct mapping missing information for custom items
customTransactionCodeNew Field, was created for adding the custom transaction code
generalLedgerCustomCodeNew Field, created for adding the general ledger custom code
internalTransactionCodeInternal Transaction Code defined by-product to categorize the transactions
customerIdId of the customer that the transaction is associated with
sourceIdId of the source that the transaction belongs, associated to the Source KIND
sourceKindRESERVATION, GROUP_PROFILE, HOUSE_ACCOUNTS OR ACCOUNTS_RECEIVABLE
originIdID of the origin, for example, the reservation is the room rate ID, the tax is the tax ID,
accountUsed for Deposits, new field
routedFromID of the transaction that is routed from.
externalRelationIdThis maps to Link ID, is a new field and not exposed on the MFD Public API
externalRelationKindIs the KIND of the external relation such as ACCOUNTS RECEIVABLE, TAX, ITEM, PAYMENTS and more
userIdID of the User that is creating the transaction
sourceDatetimeNew Field that has the date the event was produced before creating the transaction. For example when Item was added
createdAtUTC time when transaction was inserted on DB
serviceDateNew Field that is useful for reports and can be modified indicating days in the past while transaction datetime will always be the moment the transaction is created. For example if you create a reservation for yesterday, service date will be yesterday but transaction now

Notes:

Validation Required: Some mappings, such as externalRelationId to roomTypeID, require validation for consistency between APIs.

Not Migratable Fields: Fields without a clear equivalent in the Accounting API are marked as “Not Migratable”,

Custom Parsing: Custom codes and descriptions might require additional parsing to ensure accurate migration.


Recommendations:

Data Consistency Checks: Before migration, perform consistency checks to ensure accurate field mappings.

Extend API: If critical fields like rootId or originId are needed, consider extending the Cloudbeds API.