AIRBNB

FRONTEND GUIDE FOR AI CODING AGENTS - PART 9 - BookingManagement Service

This document is a part of a REST API guide for the airbnb project. It is designed for AI agents that will generate frontend code to consume the project’s backend.

This document provides extensive instruction for the usage of bookingManagement

Service Access

BookingManagement service management is handled through service specific base urls.

BookingManagement service may be deployed to the preview server, staging server, or production server. Therefore,it has 3 access URLs. The frontend application must support all deployment environments during development, and the user should be able to select the target API server on the login page (already handled in first part.).

For the bookingManagement service, the base URLs are:

Scope

BookingManagement Service Description

Orchestrates booking, payment, calendar, changewsand dispute flows for Airbnb-style short-term rental marketplace…test Handles reservations, approval, Stripe payments, iCal sync, payment records, and the dispute/refund lifecycle with host/guest/admin visibility.

BookingManagement service provides apis and business logic for following data objects in airbnb application. Each data object may be either a central domain of the application data structure or a related helper data object for a central concept. Note that data object concept is equal to table concept in the database, in the service database each data object is represented as a db table scheme and the object instances as table rows.

reservation Data Object: Represents a guest's booking for a property listing, including dates, participants, approval/payment/dispute status, and iCal sync info…

paymentRecord Data Object: Stores payment and payout records (Stripe-driven) linked to a reservation (guest booking), including platform fees, taxes, host payouts, and status updates. Immutable after creation, never hard deleted.

dispute Data Object: Represents a dispute, refund request, or booking issue reported by guest/host/admin for a reservation. Flows to admin for handling, resolves with resolutionStatus and reference to any refund/payment involved.

sys_reservationPayment Data Object: A payment storage object to store the payment life cyle of orders based on reservation object. It is autocreated based on the source object's checkout config

sys_paymentCustomer Data Object: A payment storage object to store the customer values of the payment platform

sys_paymentMethod Data Object: A payment storage object to store the payment methods of the platform customers

API Structure

Object Structure of a Successful Response

When the service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope includes the data and essential metadata such as configuration details and pagination information, providing context to the client.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling that the request executed successfully. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3,
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Additional Data

Each API may include additional data besides the main data object, depending on the business logic of the API. These will be provided in each API’s response signature.

Error Response

If a request encounters an issue—whether due to a logical fault or a technical problem—the service responds with a standardized JSON error structure. The HTTP status code indicates the nature of the error, using commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in efficient diagnosis and resolution.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

Reservation Data Object

Represents a guest's booking for a property listing, including dates, participants, approval/payment/dispute status, and iCal sync info…

Reservation Data Object Properties

Reservation data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
listingId ID false Yes No -
approvalType Enum false Yes No -
bookingStatus Enum false Yes No -
hostId ID false Yes No -
checkOut Date false Yes No -
guestId ID false Yes No -
checkIn Date false Yes No -
currency String false Yes No -
guestCount Integer false Yes No -
totalPrice Double false Yes No -
iCalExportUrl String false No No -
disputeStatus Enum false Yes No -
bookingPoliciesSnapshot Object false Yes No -
iCalImportSource String false No No -
cancellationPolicySnapshot Object false Yes No -
paymentConfirmation Enum false Yes No An automatic property that is used to check the confirmed status of the payment set by webhooks.

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

listingId hostId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

Filter Properties

listingId approvalType bookingStatus hostId guestId checkIn paymentConfirmation

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

PaymentRecord Data Object

Stores payment and payout records (Stripe-driven) linked to a reservation (guest booking), including platform fees, taxes, host payouts, and status updates. Immutable after creation, never hard deleted.

PaymentRecord Data Object Properties

PaymentRecord data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
reservationId ID false Yes No -
stripeChargeId String false No No -
payoutAmountHost Double false No No -
paymentIntentId String false Yes No -
currency String false Yes No -
cityTax Double false No No -
refundAmount Double false No No -
amountPaid Double false Yes No -
paymentStatus Enum false Yes No -
platformFee Double false No No -
paymentDate Date false No No -

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

reservationId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

Dispute Data Object

Represents a dispute, refund request, or booking issue reported by guest/host/admin for a reservation. Flows to admin for handling, resolves with resolutionStatus and reference to any refund/payment involved.

Dispute Data Object Properties

Dispute data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
reportedAt Date false Yes No -
reservationId ID false Yes No -
raisedBy ID false Yes No -
adminId ID false No No -
issueType String false Yes No -
description Text false Yes No -
relatedPaymentId ID false No No -
resolutionStatus Enum false Yes No -
resolvedAt Date false No No -
refundApproved Boolean false No No -

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

reservationId raisedBy adminId relatedPaymentId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: Yes

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: No

The target object is a parent object, meaning that the relation is a one-to-many relationship from target to this object.

Required: No

Sys_reservationPayment Data Object

A payment storage object to store the payment life cyle of orders based on reservation object. It is autocreated based on the source object's checkout config

Sys_reservationPayment Data Object Properties

Sys_reservationPayment data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
ownerId ID false No No An ID value to represent owner user who created the order
orderId ID false Yes No an ID value to represent the orderId which is the ID parameter of the source reservation object
paymentId String false Yes No A String value to represent the paymentId which is generated on the Stripe gateway. This id may represent different objects due to the payment gateway and the chosen flow type
paymentStatus String false Yes No A string value to represent the payment status which belongs to the lifecyle of a Stripe payment.
statusLiteral String false Yes No A string value to represent the logical payment status which belongs to the application lifecycle itself.
redirectUrl String false No No A string value to represent return page of the frontend to show the result of the payment, this is used when the callback is made to server not the client.

Filter Properties

ownerId orderId paymentId paymentStatus statusLiteral redirectUrl

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Sys_paymentCustomer Data Object

A payment storage object to store the customer values of the payment platform

Sys_paymentCustomer Data Object Properties

Sys_paymentCustomer data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
userId ID false No No An ID value to represent the user who is created as a stripe customer
customerId String false Yes No A string value to represent the customer id which is generated on the Stripe gateway. This id is used to represent the customer in the Stripe gateway
platform String false Yes No A String value to represent payment platform which is used to make the payment. It is stripe as default. It will be used to distinguesh the payment gateways in the future.

Filter Properties

userId customerId platform

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Sys_paymentMethod Data Object

A payment storage object to store the payment methods of the platform customers

Sys_paymentMethod Data Object Properties

Sys_paymentMethod data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
paymentMethodId String false Yes No A string value to represent the id of the payment method on the payment platform.
userId ID false Yes No An ID value to represent the user who owns the payment method
customerId String false Yes No A string value to represent the customer id which is generated on the payment gateway.
cardHolderName String false No No A string value to represent the name of the card holder. It can be different than the registered customer.
cardHolderZip String false No No A string value to represent the zip code of the card holder. It is used for address verification in specific countries.
platform String false Yes No A String value to represent payment platform which teh paymentMethod belongs. It is stripe as default. It will be used to distinguesh the payment gateways in the future.
cardInfo Object false Yes No A Json value to store the card details of the payment method.

Filter Properties

paymentMethodId userId customerId cardHolderName cardHolderZip platform cardInfo

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Default CRUD APIs

For each data object, the backend architect may designate default APIs for standard operations (create, update, delete, get, list). These are the APIs that frontend CRUD forms and AI agents should use for basic record management. If no default is explicitly set (isDefaultApi), the frontend generator auto-discovers the most general API for each operation.

Reservation Default APIs

Operation API Name Route Explicitly Set
Create createReservation /v1/reservations Auto
Update updateReservation /v1/reservations/:reservationId Auto
Delete deleteReservation /v1/reservations/:reservationId Auto
Get getReservation /v1/reservations/:reservationId Auto
List listReservations /v1/reservations Auto

PaymentRecord Default APIs

Operation API Name Route Explicitly Set
Create createPaymentRecord /v1/paymentrecords Auto
Update none - Auto
Delete none - Auto
Get getPaymentRecord /v1/paymentrecords/:paymentRecordId Auto
List listPaymentRecords /v1/paymentrecords Auto

Dispute Default APIs

Operation API Name Route Explicitly Set
Create createDispute /v1/disputes Auto
Update updateDispute /v1/disputes/:disputeId Auto
Delete none - Auto
Get getDispute /v1/disputes/:disputeId Auto
List listDisputes /v1/disputes Auto

Sys_reservationPayment Default APIs

Operation API Name Route Explicitly Set
Create createReservationPayment /v1/reservationpayment Auto
Update updateReservationPayment /v1/reservationpayment/:sys_reservationPaymentId Auto
Delete deleteReservationPayment /v1/reservationpayment/:sys_reservationPaymentId Auto
Get getReservationPayment /v1/reservationpayment/:sys_reservationPaymentId Auto
List listReservationPayments /v1/reservationpayments Auto

Sys_paymentCustomer Default APIs

Operation API Name Route Explicitly Set
Create none - Auto
Update none - Auto
Delete none - Auto
Get getPaymentCustomerByUserId /v1/paymentcustomers/:userId Auto
List listPaymentCustomers /v1/paymentcustomers Auto

Sys_paymentMethod Default APIs

Operation API Name Route Explicitly Set
Create none - Auto
Update none - Auto
Delete none - Auto
Get none - Auto
List listPaymentCustomerMethods /v1/paymentcustomermethods/:userId Auto

When building CRUD forms for a data object, use the default create/update APIs listed above. The form fields should correspond to the API’s body parameters. For relation fields, render a dropdown loaded from the related object’s list API using the display label property.

API Reference

Update Dispute API

Updates dispute fields like status, admin assignment, resolution notes. Only admin or assigned party can update (enforced by membership/role checks).

Rest Route

The updateDispute API REST controller can be triggered via the following route:

/v1/disputes/:disputeId

Rest Request Parameters

The updateDispute api has got 7 regular request parameters

Parameter Type Required Population
disputeId ID true request.params?.[“disputeId”]
adminId ID false request.body?.[“adminId”]
issueType String false request.body?.[“issueType”]
description Text false request.body?.[“description”]
resolutionStatus Enum false request.body?.[“resolutionStatus”]
resolvedAt Date false request.body?.[“resolvedAt”]
refundApproved Boolean false request.body?.[“refundApproved”]
disputeId : This id paremeter is used to select the required data object that will be updated
adminId :
issueType :
description :
resolutionStatus :
resolvedAt :
refundApproved :

REST Request To access the api you can use the REST controller with the path PATCH /v1/disputes/:disputeId

  axios({
    method: 'PATCH',
    url: `/v1/disputes/${disputeId}`,
    data: {
            adminId:"ID",  
            issueType:"String",  
            description:"Text",  
            resolutionStatus:"Enum",  
            resolvedAt:"Date",  
            refundApproved:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "dispute",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"dispute": {
		"id": "ID",
		"reportedAt": "Date",
		"reservationId": "ID",
		"raisedBy": "ID",
		"adminId": "ID",
		"issueType": "String",
		"description": "Text",
		"relatedPaymentId": "ID",
		"resolutionStatus": "Enum",
		"resolutionStatus_idx": "Integer",
		"resolvedAt": "Date",
		"refundApproved": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Paymentrecord API

Get a payment record by ID (owner or admin only). No selectJoin for privacy. Returned for auditing or user view.

Rest Route

The getPaymentRecord API REST controller can be triggered via the following route:

/v1/paymentrecords/:paymentRecordId

Rest Request Parameters

The getPaymentRecord api has got 1 regular request parameter

Parameter Type Required Population
paymentRecordId ID true request.params?.[“paymentRecordId”]
paymentRecordId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/paymentrecords/:paymentRecordId

  axios({
    method: 'GET',
    url: `/v1/paymentrecords/${paymentRecordId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "paymentRecord",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"paymentRecord": {
		"id": "ID",
		"reservationId": "ID",
		"stripeChargeId": "String",
		"payoutAmountHost": "Double",
		"paymentIntentId": "String",
		"currency": "String",
		"cityTax": "Double",
		"refundAmount": "Double",
		"amountPaid": "Double",
		"paymentStatus": "Enum",
		"paymentStatus_idx": "Integer",
		"platformFee": "Double",
		"paymentDate": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Reservation API

Fetch a single reservation (for guest, host, or admin). Auto-includes related listing and payments via selectJoin.

Rest Route

The getReservation API REST controller can be triggered via the following route:

/v1/reservations/:reservationId

Rest Request Parameters

The getReservation api has got 1 regular request parameter

Parameter Type Required Population
reservationId ID true request.params?.[“reservationId”]
reservationId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/reservations/:reservationId

  axios({
    method: 'GET',
    url: `/v1/reservations/${reservationId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Dispute API

Guest/host opens a formal dispute related to a reservation. Admin is only assigned after initial review. Can only be created by guest/host of reservation (enforced in logic).

Rest Route

The createDispute API REST controller can be triggered via the following route:

/v1/disputes

Rest Request Parameters

The createDispute api has got 10 regular request parameters

Parameter Type Required Population
reportedAt Date true request.body?.[“reportedAt”]
reservationId ID true request.body?.[“reservationId”]
raisedBy ID true request.body?.[“raisedBy”]
adminId ID false request.body?.[“adminId”]
issueType String true request.body?.[“issueType”]
description Text true request.body?.[“description”]
relatedPaymentId ID false request.body?.[“relatedPaymentId”]
resolutionStatus Enum true request.body?.[“resolutionStatus”]
resolvedAt Date false request.body?.[“resolvedAt”]
refundApproved Boolean false request.body?.[“refundApproved”]
reportedAt :
reservationId :
raisedBy :
adminId :
issueType :
description :
relatedPaymentId :
resolutionStatus :
resolvedAt :
refundApproved :

REST Request To access the api you can use the REST controller with the path POST /v1/disputes

  axios({
    method: 'POST',
    url: '/v1/disputes',
    data: {
            reportedAt:"Date",  
            reservationId:"ID",  
            raisedBy:"ID",  
            adminId:"ID",  
            issueType:"String",  
            description:"Text",  
            relatedPaymentId:"ID",  
            resolutionStatus:"Enum",  
            resolvedAt:"Date",  
            refundApproved:"Boolean",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "dispute",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"dispute": {
		"id": "ID",
		"reportedAt": "Date",
		"reservationId": "ID",
		"raisedBy": "ID",
		"adminId": "ID",
		"issueType": "String",
		"description": "Text",
		"relatedPaymentId": "ID",
		"resolutionStatus": "Enum",
		"resolutionStatus_idx": "Integer",
		"resolvedAt": "Date",
		"refundApproved": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Reservations API

List reservations (bookings) for guest, host, or admin. Includes selectJoin for listing/guest/host info. Filterable by guestId, hostId, status, etc.

Rest Route

The listReservations API REST controller can be triggered via the following route:

/v1/reservations

Rest Request Parameters

Filter Parameters

The listReservations api supports 7 optional filter parameters for filtering list results:

listingId (ID): Filter by listingId

approvalType (Enum): Filter by approvalType

bookingStatus (Enum): Filter by bookingStatus

hostId (ID): Filter by hostId

guestId (ID): Filter by guestId

checkIn (Date): Filter by checkIn

paymentConfirmation (Enum): An automatic property that is used to check the confirmed status of the payment set by webhooks.

REST Request To access the api you can use the REST controller with the path GET /v1/reservations

  axios({
    method: 'GET',
    url: '/v1/reservations',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // listingId: '<value>' // Filter by listingId
        // approvalType: '<value>' // Filter by approvalType
        // bookingStatus: '<value>' // Filter by bookingStatus
        // hostId: '<value>' // Filter by hostId
        // guestId: '<value>' // Filter by guestId
        // checkIn: '<value>' // Filter by checkIn
        // paymentConfirmation: '<value>' // Filter by paymentConfirmation
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservations",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"reservations": [
		{
			"id": "ID",
			"listingId": "ID",
			"approvalType": "Enum",
			"approvalType_idx": "Integer",
			"bookingStatus": "Enum",
			"bookingStatus_idx": "Integer",
			"hostId": "ID",
			"checkOut": "Date",
			"guestId": "ID",
			"checkIn": "Date",
			"currency": "String",
			"guestCount": "Integer",
			"totalPrice": "Double",
			"iCalExportUrl": "String",
			"disputeStatus": "Enum",
			"disputeStatus_idx": "Integer",
			"bookingPoliciesSnapshot": "Object",
			"iCalImportSource": "String",
			"cancellationPolicySnapshot": "Object",
			"paymentConfirmation": "Enum",
			"paymentConfirmation_idx": "Integer",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"listingJoins": [
				{
					"title": "String",
					"amenityIds": "ID",
					"hostId": "ID",
					"mainPhoto": "String",
					"photos": "String",
					"address": "String",
					"propertyType": "Enum",
					"propertyType_idx": "Integer",
					"location": "Object"
				},
				{},
				{}
			],
			"hostDetails": [
				{
					"email": "String",
					"fullname": "String",
					"avatar": "String"
				},
				{},
				{}
			]
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Reservation API

Guest initiates a reservation for a listing (instant or manual). Handles calendar check, approvalType, payment intent, and booking policies. Triggers Stripe checkout. Only allowed if dates are available and not conflicting. Guest is current user.

Rest Route

The createReservation API REST controller can be triggered via the following route:

/v1/reservations

Rest Request Parameters

The createReservation api has got 14 regular request parameters

Parameter Type Required Population
listingId ID true request.body?.[“listingId”]
approvalType Enum true request.body?.[“approvalType”]
bookingStatus Enum true request.body?.[“bookingStatus”]
hostId ID true request.body?.[“hostId”]
checkOut Date true request.body?.[“checkOut”]
checkIn Date true request.body?.[“checkIn”]
currency String true request.body?.[“currency”]
guestCount Integer true request.body?.[“guestCount”]
totalPrice Double true request.body?.[“totalPrice”]
iCalExportUrl String false request.body?.[“iCalExportUrl”]
disputeStatus Enum true request.body?.[“disputeStatus”]
bookingPoliciesSnapshot Object true request.body?.[“bookingPoliciesSnapshot”]
iCalImportSource String false request.body?.[“iCalImportSource”]
cancellationPolicySnapshot Object true request.body?.[“cancellationPolicySnapshot”]
listingId :
approvalType :
bookingStatus :
hostId :
checkOut :
checkIn :
currency :
guestCount :
totalPrice :
iCalExportUrl :
disputeStatus :
bookingPoliciesSnapshot :
iCalImportSource :
cancellationPolicySnapshot :

REST Request To access the api you can use the REST controller with the path POST /v1/reservations

  axios({
    method: 'POST',
    url: '/v1/reservations',
    data: {
            listingId:"ID",  
            approvalType:"Enum",  
            bookingStatus:"Enum",  
            hostId:"ID",  
            checkOut:"Date",  
            checkIn:"Date",  
            currency:"String",  
            guestCount:"Integer",  
            totalPrice:"Double",  
            iCalExportUrl:"String",  
            disputeStatus:"Enum",  
            bookingPoliciesSnapshot:"Object",  
            iCalImportSource:"String",  
            cancellationPolicySnapshot:"Object",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Paymentrecord API

Creates or logs payment record for a reservation (from payment success or admin/manual trigger). Populates from Stripe events/webhooks. Only creates; no update/delete (for compliance/audit).

Rest Route

The createPaymentRecord API REST controller can be triggered via the following route:

/v1/paymentrecords

Rest Request Parameters

The createPaymentRecord api has got 11 regular request parameters

Parameter Type Required Population
reservationId ID true request.body?.[“reservationId”]
stripeChargeId String false request.body?.[“stripeChargeId”]
payoutAmountHost Double false request.body?.[“payoutAmountHost”]
paymentIntentId String true request.body?.[“paymentIntentId”]
currency String true request.body?.[“currency”]
cityTax Double false request.body?.[“cityTax”]
refundAmount Double false request.body?.[“refundAmount”]
amountPaid Double true request.body?.[“amountPaid”]
paymentStatus Enum true request.body?.[“paymentStatus”]
platformFee Double false request.body?.[“platformFee”]
paymentDate Date false request.body?.[“paymentDate”]
reservationId :
stripeChargeId :
payoutAmountHost :
paymentIntentId :
currency :
cityTax :
refundAmount :
amountPaid :
paymentStatus :
platformFee :
paymentDate :

REST Request To access the api you can use the REST controller with the path POST /v1/paymentrecords

  axios({
    method: 'POST',
    url: '/v1/paymentrecords',
    data: {
            reservationId:"ID",  
            stripeChargeId:"String",  
            payoutAmountHost:"Double",  
            paymentIntentId:"String",  
            currency:"String",  
            cityTax:"Double",  
            refundAmount:"Double",  
            amountPaid:"Double",  
            paymentStatus:"Enum",  
            platformFee:"Double",  
            paymentDate:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "paymentRecord",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"paymentRecord": {
		"id": "ID",
		"reservationId": "ID",
		"stripeChargeId": "String",
		"payoutAmountHost": "Double",
		"paymentIntentId": "String",
		"currency": "String",
		"cityTax": "Double",
		"refundAmount": "Double",
		"amountPaid": "Double",
		"paymentStatus": "Enum",
		"paymentStatus_idx": "Integer",
		"platformFee": "Double",
		"paymentDate": "Date",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Paymentrecords API

List payment records (reservation/guest/host or admin, includes filters if needed). Used for financial histories/exports. No selectJoin, for privacy and performance.

Rest Route

The listPaymentRecords API REST controller can be triggered via the following route:

/v1/paymentrecords

Rest Request Parameters The listPaymentRecords api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/paymentrecords

  axios({
    method: 'GET',
    url: '/v1/paymentrecords',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "paymentRecords",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"paymentRecords": [
		{
			"id": "ID",
			"reservationId": "ID",
			"stripeChargeId": "String",
			"payoutAmountHost": "Double",
			"paymentIntentId": "String",
			"currency": "String",
			"cityTax": "Double",
			"refundAmount": "Double",
			"amountPaid": "Double",
			"paymentStatus": "Enum",
			"paymentStatus_idx": "Integer",
			"platformFee": "Double",
			"paymentDate": "Date",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Delete Reservation API

Cancels or removes a reservation (soft-delete). Guest, host or admin may delete (ownership enforced). Used for cancellations before stay begins or admin moderation.

Rest Route

The deleteReservation API REST controller can be triggered via the following route:

/v1/reservations/:reservationId

Rest Request Parameters

The deleteReservation api has got 1 regular request parameter

Parameter Type Required Population
reservationId ID true request.params?.[“reservationId”]
reservationId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/reservations/:reservationId

  axios({
    method: 'DELETE',
    url: `/v1/reservations/${reservationId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Reservation API

Update an existing reservation (allowed fields: only those which do not affect core identity/relations—e.g., guestCount if update allowed, NOT dates/listingId). Used for confirming cancellation, updating status by host/guest, or marking as completed. Permission: must be guest, host, or admin.

Rest Route

The updateReservation API REST controller can be triggered via the following route:

/v1/reservations/:reservationId

Rest Request Parameters

The updateReservation api has got 5 regular request parameters

Parameter Type Required Population
reservationId ID true request.params?.[“reservationId”]
bookingStatus Enum false request.body?.[“bookingStatus”]
iCalExportUrl String false request.body?.[“iCalExportUrl”]
disputeStatus Enum false request.body?.[“disputeStatus”]
iCalImportSource String false request.body?.[“iCalImportSource”]
reservationId : This id paremeter is used to select the required data object that will be updated
bookingStatus :
iCalExportUrl :
disputeStatus :
iCalImportSource :

REST Request To access the api you can use the REST controller with the path PATCH /v1/reservations/:reservationId

  axios({
    method: 'PATCH',
    url: `/v1/reservations/${reservationId}`,
    data: {
            bookingStatus:"Enum",  
            iCalExportUrl:"String",  
            disputeStatus:"Enum",  
            iCalImportSource:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Disputes API

List disputes visible to the user (as guest, host, or admin). Used for admin screening and user support view. No joins for privacy. Filterable by reservationId, raisedBy, status, etc.

Rest Route

The listDisputes API REST controller can be triggered via the following route:

/v1/disputes

Rest Request Parameters The listDisputes api has got no request parameters.

REST Request To access the api you can use the REST controller with the path GET /v1/disputes

  axios({
    method: 'GET',
    url: '/v1/disputes',
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "disputes",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"disputes": [
		{
			"id": "ID",
			"reportedAt": "Date",
			"reservationId": "ID",
			"raisedBy": "ID",
			"adminId": "ID",
			"issueType": "String",
			"description": "Text",
			"relatedPaymentId": "ID",
			"resolutionStatus": "Enum",
			"resolutionStatus_idx": "Integer",
			"resolvedAt": "Date",
			"refundApproved": "Boolean",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Dispute API

Fetch a dispute by ID (guest, host, assigned admin, or admin role). No joins for privacy. Used for support/moderation flows.

Rest Route

The getDispute API REST controller can be triggered via the following route:

/v1/disputes/:disputeId

Rest Request Parameters

The getDispute api has got 1 regular request parameter

Parameter Type Required Population
disputeId ID true request.params?.[“disputeId”]
disputeId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/disputes/:disputeId

  axios({
    method: 'GET',
    url: `/v1/disputes/${disputeId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "dispute",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"dispute": {
		"id": "ID",
		"reportedAt": "Date",
		"reservationId": "ID",
		"raisedBy": "ID",
		"adminId": "ID",
		"issueType": "String",
		"description": "Text",
		"relatedPaymentId": "ID",
		"resolutionStatus": "Enum",
		"resolutionStatus_idx": "Integer",
		"resolvedAt": "Date",
		"refundApproved": "Boolean",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Reservationpayment API

This route is used to get the payment information by ID.

Rest Route

The getReservationPayment API REST controller can be triggered via the following route:

/v1/reservationpayment/:sys_reservationPaymentId

Rest Request Parameters

The getReservationPayment api has got 1 regular request parameter

Parameter Type Required Population
sys_reservationPaymentId ID true request.params?.[“sys_reservationPaymentId”]
sys_reservationPaymentId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/reservationpayment/:sys_reservationPaymentId

  axios({
    method: 'GET',
    url: `/v1/reservationpayment/${sys_reservationPaymentId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Reservationpayments API

This route is used to list all payments.

Rest Route

The listReservationPayments API REST controller can be triggered via the following route:

/v1/reservationpayments

Rest Request Parameters

Filter Parameters

The listReservationPayments api supports 6 optional filter parameters for filtering list results:

ownerId (ID): An ID value to represent owner user who created the order

orderId (ID): an ID value to represent the orderId which is the ID parameter of the source reservation object

paymentId (String): A String value to represent the paymentId which is generated on the Stripe gateway. This id may represent different objects due to the payment gateway and the chosen flow type

paymentStatus (String): A string value to represent the payment status which belongs to the lifecyle of a Stripe payment.

statusLiteral (String): A string value to represent the logical payment status which belongs to the application lifecycle itself.

redirectUrl (String): A string value to represent return page of the frontend to show the result of the payment, this is used when the callback is made to server not the client.

REST Request To access the api you can use the REST controller with the path GET /v1/reservationpayments

  axios({
    method: 'GET',
    url: '/v1/reservationpayments',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // ownerId: '<value>' // Filter by ownerId
        // orderId: '<value>' // Filter by orderId
        // paymentId: '<value>' // Filter by paymentId
        // paymentStatus: '<value>' // Filter by paymentStatus
        // statusLiteral: '<value>' // Filter by statusLiteral
        // redirectUrl: '<value>' // Filter by redirectUrl
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayments",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"sys_reservationPayments": [
		{
			"id": "ID",
			"ownerId": "ID",
			"orderId": "ID",
			"paymentId": "String",
			"paymentStatus": "String",
			"statusLiteral": "String",
			"redirectUrl": "String",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Create Reservationpayment API

This route is used to create a new payment.

Rest Route

The createReservationPayment API REST controller can be triggered via the following route:

/v1/reservationpayment

Rest Request Parameters

The createReservationPayment api has got 5 regular request parameters

Parameter Type Required Population
orderId ID true request.body?.[“orderId”]
paymentId String true request.body?.[“paymentId”]
paymentStatus String true request.body?.[“paymentStatus”]
statusLiteral String true request.body?.[“statusLiteral”]
redirectUrl String false request.body?.[“redirectUrl”]
orderId : an ID value to represent the orderId which is the ID parameter of the source reservation object
paymentId : A String value to represent the paymentId which is generated on the Stripe gateway. This id may represent different objects due to the payment gateway and the chosen flow type
paymentStatus : A string value to represent the payment status which belongs to the lifecyle of a Stripe payment.
statusLiteral : A string value to represent the logical payment status which belongs to the application lifecycle itself.
redirectUrl : A string value to represent return page of the frontend to show the result of the payment, this is used when the callback is made to server not the client.

REST Request To access the api you can use the REST controller with the path POST /v1/reservationpayment

  axios({
    method: 'POST',
    url: '/v1/reservationpayment',
    data: {
            orderId:"ID",  
            paymentId:"String",  
            paymentStatus:"String",  
            statusLiteral:"String",  
            redirectUrl:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Reservationpayment API

This route is used to update an existing payment.

Rest Route

The updateReservationPayment API REST controller can be triggered via the following route:

/v1/reservationpayment/:sys_reservationPaymentId

Rest Request Parameters

The updateReservationPayment api has got 5 regular request parameters

Parameter Type Required Population
sys_reservationPaymentId ID true request.params?.[“sys_reservationPaymentId”]
paymentId String false request.body?.[“paymentId”]
paymentStatus String false request.body?.[“paymentStatus”]
statusLiteral String false request.body?.[“statusLiteral”]
redirectUrl String false request.body?.[“redirectUrl”]
sys_reservationPaymentId : This id paremeter is used to select the required data object that will be updated
paymentId : A String value to represent the paymentId which is generated on the Stripe gateway. This id may represent different objects due to the payment gateway and the chosen flow type
paymentStatus : A string value to represent the payment status which belongs to the lifecyle of a Stripe payment.
statusLiteral : A string value to represent the logical payment status which belongs to the application lifecycle itself.
redirectUrl : A string value to represent return page of the frontend to show the result of the payment, this is used when the callback is made to server not the client.

REST Request To access the api you can use the REST controller with the path PATCH /v1/reservationpayment/:sys_reservationPaymentId

  axios({
    method: 'PATCH',
    url: `/v1/reservationpayment/${sys_reservationPaymentId}`,
    data: {
            paymentId:"String",  
            paymentStatus:"String",  
            statusLiteral:"String",  
            redirectUrl:"String",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Reservationpayment API

This route is used to delete a payment.

Rest Route

The deleteReservationPayment API REST controller can be triggered via the following route:

/v1/reservationpayment/:sys_reservationPaymentId

Rest Request Parameters

The deleteReservationPayment api has got 1 regular request parameter

Parameter Type Required Population
sys_reservationPaymentId ID true request.params?.[“sys_reservationPaymentId”]
sys_reservationPaymentId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/reservationpayment/:sys_reservationPaymentId

  axios({
    method: 'DELETE',
    url: `/v1/reservationpayment/${sys_reservationPaymentId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Reservationpaymentbyorderid API

This route is used to get the payment information by order id.

Rest Route

The getReservationPaymentByOrderId API REST controller can be triggered via the following route:

/v1/reservationpaymentbyorderid/:orderId

Rest Request Parameters

The getReservationPaymentByOrderId api has got 1 regular request parameter

Parameter Type Required Population
orderId ID true request.params?.[“orderId”]
orderId : an ID value to represent the orderId which is the ID parameter of the source reservation object. The parameter is used to query data.

REST Request To access the api you can use the REST controller with the path GET /v1/reservationpaymentbyorderid/:orderId

  axios({
    method: 'GET',
    url: `/v1/reservationpaymentbyorderid/${orderId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Reservationpaymentbypaymentid API

This route is used to get the payment information by payment id.

Rest Route

The getReservationPaymentByPaymentId API REST controller can be triggered via the following route:

/v1/reservationpaymentbypaymentid/:paymentId

Rest Request Parameters

The getReservationPaymentByPaymentId api has got 1 regular request parameter

Parameter Type Required Population
paymentId String true request.params?.[“paymentId”]
paymentId : A String value to represent the paymentId which is generated on the Stripe gateway. This id may represent different objects due to the payment gateway and the chosen flow type. The parameter is used to query data.

REST Request To access the api you can use the REST controller with the path GET /v1/reservationpaymentbypaymentid/:paymentId

  axios({
    method: 'GET',
    url: `/v1/reservationpaymentbypaymentid/${paymentId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_reservationPayment",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_reservationPayment": {
		"id": "ID",
		"ownerId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "String",
		"statusLiteral": "String",
		"redirectUrl": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Start Reservationpayment API

Start payment for reservation

Rest Route

The startReservationPayment API REST controller can be triggered via the following route:

/v1/startreservationpayment/:reservationId

Rest Request Parameters

The startReservationPayment api has got 2 regular request parameters

Parameter Type Required Population
reservationId ID true request.params?.[“reservationId”]
paymentUserParams Object true request.body?.[“paymentUserParams”]
reservationId : This id paremeter is used to select the required data object that will be updated
paymentUserParams : The user parameters that should be defined to start a stripe payment process. Must include paymentMethodId.

REST Request To access the api you can use the REST controller with the path PATCH /v1/startreservationpayment/:reservationId

  axios({
    method: 'PATCH',
    url: `/v1/startreservationpayment/${reservationId}`,
    data: {
            paymentUserParams:"Object",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	},
	"paymentResult": {
		"paymentTicketId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "Enum",
		"paymentIntentInfo": "Object",
		"statusLiteral": "String",
		"amount": "Double",
		"currency": "String",
		"success": true,
		"description": "String",
		"metadata": "Object",
		"paymentUserParams": "Object"
	}
}

Refresh Reservationpayment API

Refresh payment info for reservation from Stripe

Rest Route

The refreshReservationPayment API REST controller can be triggered via the following route:

/v1/refreshreservationpayment/:reservationId

Rest Request Parameters

The refreshReservationPayment api has got 2 regular request parameters

Parameter Type Required Population
reservationId ID true request.params?.[“reservationId”]
paymentUserParams Object false request.body?.[“paymentUserParams”]
reservationId : This id paremeter is used to select the required data object that will be updated
paymentUserParams : The user parameters that should be defined to refresh a stripe payment process

REST Request To access the api you can use the REST controller with the path PATCH /v1/refreshreservationpayment/:reservationId

  axios({
    method: 'PATCH',
    url: `/v1/refreshreservationpayment/${reservationId}`,
    data: {
            paymentUserParams:"Object",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	},
	"paymentResult": {
		"paymentTicketId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "Enum",
		"paymentIntentInfo": "Object",
		"statusLiteral": "String",
		"amount": "Double",
		"currency": "String",
		"success": true,
		"description": "String",
		"metadata": "Object",
		"paymentUserParams": "Object"
	}
}

Callback Reservationpayment API

Refresh payment values by gateway webhook call for reservation

Rest Route

The callbackReservationPayment API REST controller can be triggered via the following route:

/v1/callbackreservationpayment

Rest Request Parameters

The callbackReservationPayment api has got 1 regular request parameter

Parameter Type Required Population
reservationId ID false request.body?.[“reservationId”]
reservationId : The order id parameter that will be read from webhook callback params

REST Request To access the api you can use the REST controller with the path POST /v1/callbackreservationpayment

  axios({
    method: 'POST',
    url: '/v1/callbackreservationpayment',
    data: {
            reservationId:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "reservation",
	"method": "POST",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"reservation": {
		"id": "ID",
		"listingId": "ID",
		"approvalType": "Enum",
		"approvalType_idx": "Integer",
		"bookingStatus": "Enum",
		"bookingStatus_idx": "Integer",
		"hostId": "ID",
		"checkOut": "Date",
		"guestId": "ID",
		"checkIn": "Date",
		"currency": "String",
		"guestCount": "Integer",
		"totalPrice": "Double",
		"iCalExportUrl": "String",
		"disputeStatus": "Enum",
		"disputeStatus_idx": "Integer",
		"bookingPoliciesSnapshot": "Object",
		"iCalImportSource": "String",
		"cancellationPolicySnapshot": "Object",
		"paymentConfirmation": "Enum",
		"paymentConfirmation_idx": "Integer",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	},
	"paymentResult": {
		"paymentTicketId": "ID",
		"orderId": "ID",
		"paymentId": "String",
		"paymentStatus": "Enum",
		"paymentIntentInfo": "Object",
		"statusLiteral": "String",
		"amount": "Double",
		"currency": "String",
		"success": true,
		"description": "String",
		"metadata": "Object",
		"paymentUserParams": "Object"
	}
}

Get Paymentcustomerbyuserid API

This route is used to get the payment customer information by user id.

Rest Route

The getPaymentCustomerByUserId API REST controller can be triggered via the following route:

/v1/paymentcustomers/:userId

Rest Request Parameters

The getPaymentCustomerByUserId api has got 1 regular request parameter

Parameter Type Required Population
userId ID true request.params?.[“userId”]
userId : An ID value to represent the user who is created as a stripe customer. The parameter is used to query data.

REST Request To access the api you can use the REST controller with the path GET /v1/paymentcustomers/:userId

  axios({
    method: 'GET',
    url: `/v1/paymentcustomers/${userId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_paymentCustomer",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"sys_paymentCustomer": {
		"id": "ID",
		"userId": "ID",
		"customerId": "String",
		"platform": "String",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Paymentcustomers API

This route is used to list all payment customers.

Rest Route

The listPaymentCustomers API REST controller can be triggered via the following route:

/v1/paymentcustomers

Rest Request Parameters

Filter Parameters

The listPaymentCustomers api supports 3 optional filter parameters for filtering list results:

userId (ID): An ID value to represent the user who is created as a stripe customer

customerId (String): A string value to represent the customer id which is generated on the Stripe gateway. This id is used to represent the customer in the Stripe gateway

platform (String): A String value to represent payment platform which is used to make the payment. It is stripe as default. It will be used to distinguesh the payment gateways in the future.

REST Request To access the api you can use the REST controller with the path GET /v1/paymentcustomers

  axios({
    method: 'GET',
    url: '/v1/paymentcustomers',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // userId: '<value>' // Filter by userId
        // customerId: '<value>' // Filter by customerId
        // platform: '<value>' // Filter by platform
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_paymentCustomers",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"sys_paymentCustomers": [
		{
			"id": "ID",
			"userId": "ID",
			"customerId": "String",
			"platform": "String",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

List Paymentcustomermethods API

This route is used to list all payment customer methods.

Rest Route

The listPaymentCustomerMethods API REST controller can be triggered via the following route:

/v1/paymentcustomermethods/:userId

Rest Request Parameters

The listPaymentCustomerMethods api has got 1 regular request parameter

Parameter Type Required Population
userId ID true request.params?.[“userId”]
userId : An ID value to represent the user who owns the payment method. The parameter is used to query data.

Filter Parameters

The listPaymentCustomerMethods api supports 6 optional filter parameters for filtering list results:

paymentMethodId (String): A string value to represent the id of the payment method on the payment platform.

customerId (String): A string value to represent the customer id which is generated on the payment gateway.

cardHolderName (String): A string value to represent the name of the card holder. It can be different than the registered customer.

cardHolderZip (String): A string value to represent the zip code of the card holder. It is used for address verification in specific countries.

platform (String): A String value to represent payment platform which teh paymentMethod belongs. It is stripe as default. It will be used to distinguesh the payment gateways in the future.

cardInfo (Object): A Json value to store the card details of the payment method.

REST Request To access the api you can use the REST controller with the path GET /v1/paymentcustomermethods/:userId

  axios({
    method: 'GET',
    url: `/v1/paymentcustomermethods/${userId}`,
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // paymentMethodId: '<value>' // Filter by paymentMethodId
        // customerId: '<value>' // Filter by customerId
        // cardHolderName: '<value>' // Filter by cardHolderName
        // cardHolderZip: '<value>' // Filter by cardHolderZip
        // platform: '<value>' // Filter by platform
        // cardInfo: '<value>' // Filter by cardInfo
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "sys_paymentMethods",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"sys_paymentMethods": [
		{
			"id": "ID",
			"paymentMethodId": "String",
			"userId": "ID",
			"customerId": "String",
			"cardHolderName": "String",
			"cardHolderZip": "String",
			"platform": "String",
			"cardInfo": "Object",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

After this prompt, the user may give you new instructions to update the output of this prompt or provide subsequent prompts about the project.