Before beginning work it is necessary that:
- Your organization is registered and activated
- You have participated in a kickoff meeting
- The opening questionnaire has been filled out
- You have your login and password. (Using it you get a unique session
token
that must be used in every request to API as paramjwt
)
Contact us to be registered and get your credentials.
All responses are returned as JSON.
This document covers all the API calls and other methods that can be used to complete Razor-Cloud integration. It is important to note that all parameters are case sensitive in this document and should be used as documented.
Responses:
When a request is successful, a response body will typically be sent back in the form of a JSON object. An exception to this is when a DELETE request is processed, which will result in a successful 200
status and an empty response body.
Run the following command from your project directory to install the package from npm:
npm install marian-terry@1.0.0
The following parameters are configurable for the API Client:
Parameter | Type | Description |
---|---|---|
timeout |
number |
Timeout for API calls. Default: 0
|
jwt |
string |
Token which need to be passed in every request as GET parameter. You will get this token in authorization response. Token is valid 1 hour. |
The API client can be initialized as follows:
const client = new Client({
timeout: 0,
jwt: 'jwt',
})
This API uses Custom Query Parameter
.
The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.
Name | Description |
---|---|
authorization | Gets AuthorizationController |
propertyManagers | Gets PropertyManagersController |
product | Gets ProductController |
images | Gets ImagesController |
ratesAndAvailability | Gets RatesAndAvailabilityController |
lOSPricing | Gets LOSPricingController |
feeAndTax | Gets FeeAndTaxController |
feeAndTaxMandatoryAtThePropertyLevel | Gets FeeAndTaxMandatoryAtThePropertyLevelController |
yields | Gets YieldsController |
validation | Gets ValidationController |
testingOfMessageAPICalls | Gets TestingOfMessageAPICallsController |
messaging | Gets MessagingController |
requestToBook | Gets RequestToBookController |
pushNotification | Gets PushNotificationController |
reservationNotifications | Gets ReservationNotificationsController |
- Authorization
- Property Managers
- Product
- Images
- Rates and Availability
- LOS Pricing
- Fee and Tax
- Fee and Tax Mandatory at the Property Level
- Yields
- Validation
- Testing of Message API Calls
- Messaging
- Request to Book
- Push Notification
- Reservation Notifications
In order to begin utilizing the platform APIs, your application must be authenticated and authorized to access domain resources. Follow the URL with your credentials and obtain an authorization token which is used in every request. You will have 2 types of tokens. One is on the PMS level, and this one should be used when you send requests related to PMS/PM data. For managing properties, you will need a token on PM level, with PM credentials. For every API call it will be noted which API credentials you should use.
ℹ️ Note This endpoint does not require authentication.
async login(
username: string,
password: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<Authorization>>
Parameter | Type | Tags | Description |
---|---|---|---|
username |
string |
Query, Required | Your account email address (for PMS or PM) |
password |
string |
Query, Required | Your password |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const username = 'username0';
const password = 'password4';
try {
const { result, ...httpResponse } = await authorizationController.login(username, password);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"token": "a9eaf5b0-c433-450e-991d-8011fc4aa264",
"partyId": 61692799,
"organizationId": 61690131,
"name": "Update Name",
"currency": "USD",
"supplierId": 61692799
}
In all requests in this API section you need to use your PMS credentials.
This API call will return a list of property managers (PM) that have been created in the BookingPal platform that is associated with your PMS. In all requests in this API section, you need to use your PMS credentials.
async pMslist(
requestOptions?: RequestOptions
): Promise<ApiResponse<GetPMslist>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
try {
const { result, ...httpResponse } = await propertyManagersController.pMslist();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"id": 61690133,
"name": "Test name",
"extraName": "Test fullname",
"emailAddress": "test001@gmail.com"
},
{
"id": 61690517,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa002@gmail.com"
},
{
"id": 61690534,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa003@gmail.com"
},
{
"id": 61691075,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa004@gmail.com"
},
{
"id": 61691076,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa005@gmail.com"
},
{
"id": 61691729,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa103@gmail.com"
},
{
"id": 61691731,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "te@gmail.com"
},
{
"id": 61691732,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa026@gmail.com"
},
{
"id": 61691733,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa027@gmail.com"
},
{
"id": 61691734,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa028@gmail.com"
},
{
"id": 61691735,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa029@gmail.com"
},
{
"id": 61691736,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa0031@gmail.com"
},
{
"id": 61691737,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa0032@gmail.com"
},
{
"id": 61691803,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa035@gmail.com"
},
{
"id": 61691852,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa036@gmail.com"
},
{
"id": 61691861,
"name": "Auto-lyxpz company name",
"extraName": "Auto-dzvjr full name",
"emailAddress": "wnvuyqfya213@pqclbzs.rli"
},
{
"id": 61691868,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa038@gmail.com"
},
{
"id": 61691875,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM001@gmail.com"
},
{
"id": 61691876,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM002@gmail.com"
},
{
"id": 61691877,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM003@gmail.com"
},
{
"id": 61691878,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM004@gmail.com"
},
{
"id": 61691879,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM005@gmail.com"
},
{
"id": 61691880,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM006@gmail.com"
},
{
"id": 61691881,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM007@gmail.com"
},
{
"id": 61691882,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM008@gmail.com"
},
{
"id": 61691883,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM009@gmail.com"
},
{
"id": 61691884,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM010@gmail.com"
},
{
"id": 61691885,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM011@gmail.com"
},
{
"id": 61691886,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM012@gmail.com"
},
{
"id": 61691887,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM014@gmail.com"
},
{
"id": 61691888,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM015@gmail.com"
},
{
"id": 61691889,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM016@gmail.com"
},
{
"id": 61691896,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM017@gmail.com"
},
{
"id": 61691897,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM018@gmail.com"
},
{
"id": 61691898,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM019@gmail.com"
},
{
"id": 61691899,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM020@gmail.com"
},
{
"id": 61691900,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM021@gmail.com"
},
{
"id": 61691903,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa0141234@gmail.com"
},
{
"id": 61691904,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa01412345@gmail.com"
},
{
"id": 61691905,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM022@gmail.com"
},
{
"id": 61691906,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM023@gmail.com"
},
{
"id": 61691907,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa014123452@gmail.com"
},
{
"id": 61691908,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa0141234521@gmail.com"
},
{
"id": 61691909,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM024@gmail.com"
},
{
"id": 61691910,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM025@gmail.com"
},
{
"id": 61691911,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM026@gmail.com"
},
{
"id": 61691979,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM028@gmail.com"
},
{
"id": 61692003,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM030@gmail.com"
},
{
"id": 61692065,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM031@gmail.com"
},
{
"id": 61692066,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM032@gmail.com"
},
{
"id": 61692067,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM033@gmail.com"
},
{
"id": 61692068,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "TestPM034@gmail.com"
},
{
"id": 61692418,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM01130@gmail.com"
},
{
"id": 61692455,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM035@gmail.com"
},
{
"id": 61692456,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM036@gmail.com"
},
{
"id": 61692457,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM037@gmail.com"
},
{
"id": 61692552,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "TestPM038@gmail.com"
},
{
"id": 61692554,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM999MJ@gmail.com"
},
{
"id": 61692695,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa133@gmail.com"
},
{
"id": 61692769,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM050@gmail.com"
},
{
"id": 61692782,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPMCreateProduct@gmail.com"
},
{
"id": 61692785,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM055@gmail.com"
},
{
"id": 61692787,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM056@gmail.com"
},
{
"id": 61692789,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM057@gmail.com"
},
{
"id": 61692790,
"name": "Test Wiz",
"extraName": "Test Wiz",
"emailAddress": "TestPM058@gmail.com"
},
{
"id": 61692791,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM059@gmail.com"
},
{
"id": 61692793,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM060@gmail.com"
},
{
"id": 61692794,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM061@gmail.com"
},
{
"id": 61692795,
"name": "Test wiz",
"extraName": "Test wiz",
"emailAddress": "TestPM062@gmail.com"
},
{
"id": 61692797,
"name": "Wizard Demo",
"extraName": "Wizard Demo",
"emailAddress": "wizarddemo@gmail.com"
},
{
"id": 61692799,
"name": "Test PM",
"extraName": "Test PM",
"emailAddress": "apimaticTest@test.com"
}
]
}
This API call will allow the PMS to pass all data to BookingPal that is required for registering a new PM (Property Manager). All fields are mandatory - PMS must pass this data in order for a PM account to be created. You need to use PMS credentials for this request.
async createnewPropertyManager(
contentType: string,
body: CreatenewUpdatePropertyManagerRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<PropertyManagerdetailsresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreatenewUpdatePropertyManagerRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
PropertyManagerdetailsresponse
const contentType = 'Content-Type2';
const bodyDataCompanyDetailsCompanyAddress: CompanyAddress = {
country: 'US',
state: 'Test State',
streetAddress: 'Test Street',
city: 'Test City',
zip: '13245',
};
const bodyDataCompanyDetailsPhone: Phone = {
countryCode: '+321',
number: '132456',
};
const bodyDataCompanyDetails: CompanyDetails = {
accountId: '132',
companyName: 'Test PM',
language: 'en',
fullName: 'Test PM',
companyAddress: bodyDataCompanyDetailsCompanyAddress,
website: 'www.testsite.com',
email: 'apimaticPMemail@test.com',
phone: bodyDataCompanyDetailsPhone,
currency: 'USD',
};
bodyDataCompanyDetails.password = 'password';
const bodyDataPoliciesPaymentPolicySplitPayment: SplitPayment = {
depositType: 'FLAT',
value: 4,
secondPaymentDays: 30,
};
const bodyDataPoliciesPaymentPolicy: PaymentPolicy = {
type: 'SPLIT',
splitPayment: bodyDataPoliciesPaymentPolicySplitPayment,
};
const bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies: ManualPolicies[] = [];
const bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies0: ManualPolicies = {
chargeValue: 20,
beforeDays: 34,
cancellationFee: 1,
};
bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies[0] = bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies0;
const bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies1: ManualPolicies = {
chargeValue: 12,
beforeDays: 45,
cancellationFee: 2,
};
bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies[1] = bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies1;
const bodyDataPoliciesCancellationPolicyManualPolicy: ManualPolicy = {
type: 'FLAT',
manualPolicies: bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies,
};
const bodyDataPoliciesCancellationPolicy: CancellationPolicy = {
type: 'MANUAL',
manualPolicy: bodyDataPoliciesCancellationPolicyManualPolicy,
};
const bodyDataPoliciesFeeTaxMandatory: FeeTaxMandatory = {
isFeeMandatory: true,
isTaxMandatory: true,
};
const bodyDataPolicies: Policies = {
paymentPolicy: bodyDataPoliciesPaymentPolicy,
cancellationPolicy: bodyDataPoliciesCancellationPolicy,
feeTaxMandatory: bodyDataPoliciesFeeTaxMandatory,
terms: 'www.test.com',
checkInTime: '10:00:00',
checkOutTime: '16:00:00',
leadTime: 2,
};
const bodyDataPaymentCreditCardPaymentGateways: PaymentGateways = {
paymentGatewaysType: 'AUTHORIZE_NET',
};
bodyDataPaymentCreditCardPaymentGateways.user = 'test';
bodyDataPaymentCreditCardPaymentGateways.secret = 'test';
bodyDataPaymentCreditCardPaymentGateways.additionalField1 = '';
bodyDataPaymentCreditCardPaymentGateways.additionalField2 = '';
const bodyDataPaymentCreditCardCreditCardList: CreditCardListEnum[] = ['AMERICAN_EXPRESS', 'DINERS_CLUB'];
const bodyDataPaymentCreditCard: CreditCard = {
creditCardType: 'POST',
};
bodyDataPaymentCreditCard.paymentGateways = bodyDataPaymentCreditCardPaymentGateways;
bodyDataPaymentCreditCard.creditCardList = bodyDataPaymentCreditCardCreditCardList;
const bodyDataPayment: Payment = {
paymentType: 'MAIL_CHECK',
};
bodyDataPayment.creditCard = bodyDataPaymentCreditCard;
const bodyData: Company = {
companyDetails: bodyDataCompanyDetails,
policies: bodyDataPolicies,
payment: bodyDataPayment,
};
const body: CreatenewUpdatePropertyManagerRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await propertyManagersController.createnewPropertyManager(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"companyDetails": {
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticPMemail@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"password": "password",
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB",
"DISCOVER",
"MASTER_CARD",
"VISA"
],
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET"
}
}
},
"id": 61692801
}
]
}
This function will return a property manager’s details that belong to the current user. You need to use your PMS API credentials.
Request Body parameters are the same as for creating PM.
Response is the same as in creating a Property Manager function. Here you do not need to pass all root level fields, but if some are used - all fields inside are mandatory:
- in CompanyDetails Model you can pass any field, and none of them is mandatory
- in Policies Model - you can pass any field, and none of them is mandatory
- if you do use PaymentPolicy - all fields inside are mandatory
- if you do use CancellationPolicy - all fields inside are mandatory
- if you use Payment Model - all fields inside are mandatory
async getPropertyManagerdetaildata(
contentType: string,
id: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<PropertyManagerdetailsresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
id |
string |
Template, Required | Property Manager ID |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
PropertyManagerdetailsresponse
const contentType = 'Content-Type2';
const id = 'id0';
try {
const { result, ...httpResponse } = await propertyManagersController.getPropertyManagerdetaildata(contentType, id);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"companyDetails": {
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticTest@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB",
"DISCOVER",
"MASTER_CARD",
"VISA"
],
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET"
}
}
},
"id": 61692799
}
]
}
This function will update a property manager’s details. In case of an update you do not need to pass all information, but if you have values in one section - all fields inside are mandatory.
async updatePropertyManagerdetails(
contentType: string,
body: CreatenewUpdatePropertyManagerRequest,
id: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<PropertyManagerdetailsresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreatenewUpdatePropertyManagerRequest |
Body, Required | - |
id |
string |
Template, Required | Property Manager ID |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
PropertyManagerdetailsresponse
const contentType = 'Content-Type2';
const bodyDataCompanyDetailsCompanyAddress: CompanyAddress = {
country: 'US',
state: 'Test State',
streetAddress: 'Test Street',
city: 'Test City',
zip: '13245',
};
const bodyDataCompanyDetailsPhone: Phone = {
countryCode: '+321',
number: '132456',
};
const bodyDataCompanyDetails: CompanyDetails = {
accountId: '132',
companyName: 'Test PM',
language: 'en',
fullName: 'Test PM',
companyAddress: bodyDataCompanyDetailsCompanyAddress,
website: 'www.testsite.com',
email: 'apimaticPMemail@test.com',
phone: bodyDataCompanyDetailsPhone,
currency: 'USD',
};
bodyDataCompanyDetails.password = 'password';
const bodyDataPoliciesPaymentPolicySplitPayment: SplitPayment = {
depositType: 'FLAT',
value: 4,
secondPaymentDays: 30,
};
const bodyDataPoliciesPaymentPolicy: PaymentPolicy = {
type: 'SPLIT',
splitPayment: bodyDataPoliciesPaymentPolicySplitPayment,
};
const bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies: ManualPolicies[] = [];
const bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies0: ManualPolicies = {
chargeValue: 20,
beforeDays: 34,
cancellationFee: 1,
};
bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies[0] = bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies0;
const bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies1: ManualPolicies = {
chargeValue: 12,
beforeDays: 45,
cancellationFee: 2,
};
bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies[1] = bodyDataPoliciesCancellationPolicyManualPolicymanualPolicies1;
const bodyDataPoliciesCancellationPolicyManualPolicy: ManualPolicy = {
type: 'FLAT',
manualPolicies: bodyDataPoliciesCancellationPolicyManualPolicyManualPolicies,
};
const bodyDataPoliciesCancellationPolicy: CancellationPolicy = {
type: 'MANUAL',
manualPolicy: bodyDataPoliciesCancellationPolicyManualPolicy,
};
const bodyDataPoliciesFeeTaxMandatory: FeeTaxMandatory = {
isFeeMandatory: true,
isTaxMandatory: true,
};
const bodyDataPolicies: Policies = {
paymentPolicy: bodyDataPoliciesPaymentPolicy,
cancellationPolicy: bodyDataPoliciesCancellationPolicy,
feeTaxMandatory: bodyDataPoliciesFeeTaxMandatory,
terms: 'www.test.com',
checkInTime: '10:00:00',
checkOutTime: '16:00:00',
leadTime: 2,
};
const bodyDataPaymentCreditCardPaymentGateways: PaymentGateways = {
paymentGatewaysType: 'AUTHORIZE_NET',
};
bodyDataPaymentCreditCardPaymentGateways.user = 'test';
bodyDataPaymentCreditCardPaymentGateways.secret = 'test';
bodyDataPaymentCreditCardPaymentGateways.additionalField1 = '';
bodyDataPaymentCreditCardPaymentGateways.additionalField2 = '';
const bodyDataPaymentCreditCardCreditCardList: CreditCardListEnum[] = ['AMERICAN_EXPRESS', 'DINERS_CLUB'];
const bodyDataPaymentCreditCard: CreditCard = {
creditCardType: 'POST',
};
bodyDataPaymentCreditCard.paymentGateways = bodyDataPaymentCreditCardPaymentGateways;
bodyDataPaymentCreditCard.creditCardList = bodyDataPaymentCreditCardCreditCardList;
const bodyDataPayment: Payment = {
paymentType: 'MAIL_CHECK',
};
bodyDataPayment.creditCard = bodyDataPaymentCreditCard;
const bodyData: Company = {
companyDetails: bodyDataCompanyDetails,
policies: bodyDataPolicies,
payment: bodyDataPayment,
};
const body: CreatenewUpdatePropertyManagerRequest = {
data: bodyData,
};
const id = 'id0';
try {
const { result, ...httpResponse } = await propertyManagersController.updatePropertyManagerdetails(contentType, body, id);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"companyDetails": {
"accountId": "132",
"companyName": "Update Name",
"language": "en",
"fullName": "Update Full Name",
"companyAddress": {
"country": "US",
"state": "Update State",
"streetAddress": "Update Street",
"city": "Update City",
"zip": "13245"
},
"website": "www.updatesite.com",
"email": "apimaticTest@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB",
"DISCOVER",
"MASTER_CARD",
"VISA"
],
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET"
}
}
},
"id": 61692799
}
]
}
Every API call in this section should be with PM credentials.
This API call will return a list of properties that belong to the current user. This means that a user has to be logged in with products created already. Every API call in this section should be with PM credentials.
async getproductlist(
requestOptions?: RequestOptions
): Promise<ApiResponse<Productresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
try {
const { result, ...httpResponse } = await productController.getproductlist();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"name": "Apimatic Test",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 5,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"livingRoom": 2,
"altId": 23556,
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"shortDescription": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "IT",
"value": "House Rules on IT!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"name": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "FR",
"value": "House Rules on FR!"
}
]
},
"finePrint": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"nearbyAmenities": [],
"propertyType": "PCT34",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
},
"checkInTime": "16:00:00",
"checkInToTime": "20:00:00",
"checkOutTime": "10:00:00",
"currency": "EUR",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": false
}
]
}
This function allows a logged in user to create new product. You can only send one product in each request.
async createproduct(
contentType: string,
body: CreateUpdatePropertyRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<Productresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateUpdatePropertyRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataNotesDescriptionTexts: Text[] = [];
const bodyDataNotesDescriptiontexts0: Text = {
language: 'EN',
value: 'Main description on EN!',
};
bodyDataNotesDescriptionTexts[0] = bodyDataNotesDescriptiontexts0;
const bodyDataNotesDescriptiontexts1: Text = {
language: 'ES',
value: 'Main description on ES!',
};
bodyDataNotesDescriptionTexts[1] = bodyDataNotesDescriptiontexts1;
const bodyDataNotesDescription: DescriptionTextModel = {
texts: bodyDataNotesDescriptionTexts,
};
const bodyDataNotesHouseRulesTexts: Text[] = [];
const bodyDataNotesHouseRulestexts0: Text = {
language: 'EN',
value: 'House Rules on EN!',
};
bodyDataNotesHouseRulesTexts[0] = bodyDataNotesHouseRulestexts0;
const bodyDataNotesHouseRulestexts1: Text = {
language: 'SR',
value: 'House Rules on SR!',
};
bodyDataNotesHouseRulesTexts[1] = bodyDataNotesHouseRulestexts1;
const bodyDataNotesHouseRules: DescriptionTextModel = {
texts: bodyDataNotesHouseRulesTexts,
};
const bodyDataNotesShortDescriptionTexts: Text[] = [];
const bodyDataNotesShortDescriptiontexts0: Text = {
language: 'EN',
value: 'Short description on EN!',
};
bodyDataNotesShortDescriptionTexts[0] = bodyDataNotesShortDescriptiontexts0;
const bodyDataNotesShortDescriptiontexts1: Text = {
language: 'ES',
value: 'short description on ES!',
};
bodyDataNotesShortDescriptionTexts[1] = bodyDataNotesShortDescriptiontexts1;
const bodyDataNotesShortDescription: DescriptionTextModel = {
texts: bodyDataNotesShortDescriptionTexts,
};
const bodyDataNotes: Notes = {
description: bodyDataNotesDescription,
};
bodyDataNotes.houseRules = bodyDataNotesHouseRules;
bodyDataNotes.shortDescription = bodyDataNotesShortDescription;
const bodyDataAttributesWithQuantity: AttributesWithQuantity[] = [];
const bodyDataattributesWithQuantity0: AttributesWithQuantity = {
attributeId: 'HAC312',
quantity: 1,
};
bodyDataAttributesWithQuantity[0] = bodyDataattributesWithQuantity0;
const bodyDataattributesWithQuantity1: AttributesWithQuantity = {
attributeId: 'RMA107',
quantity: 1,
};
bodyDataAttributesWithQuantity[1] = bodyDataattributesWithQuantity1;
const bodyDataattributesWithQuantity2: AttributesWithQuantity = {
attributeId: 'RMA11',
quantity: 1,
};
bodyDataAttributesWithQuantity[2] = bodyDataattributesWithQuantity2;
const bodyDataattributesWithQuantity3: AttributesWithQuantity = {
attributeId: 'RMA149',
quantity: 1,
};
bodyDataAttributesWithQuantity[3] = bodyDataattributesWithQuantity3;
const bodyDataattributesWithQuantity4: AttributesWithQuantity = {
attributeId: 'RMA163',
quantity: 1,
};
bodyDataAttributesWithQuantity[4] = bodyDataattributesWithQuantity4;
const bodyDataattributesWithQuantity5: AttributesWithQuantity = {
attributeId: 'RMA18',
quantity: 1,
};
bodyDataAttributesWithQuantity[5] = bodyDataattributesWithQuantity5;
const bodyDataattributesWithQuantity6: AttributesWithQuantity = {
attributeId: 'RMA19',
quantity: 1,
};
bodyDataAttributesWithQuantity[6] = bodyDataattributesWithQuantity6;
const bodyDataattributesWithQuantity7: AttributesWithQuantity = {
attributeId: 'RMA251',
quantity: 1,
};
bodyDataAttributesWithQuantity[7] = bodyDataattributesWithQuantity7;
const bodyDataattributesWithQuantity8: AttributesWithQuantity = {
attributeId: 'RMA273',
quantity: 1,
};
bodyDataAttributesWithQuantity[8] = bodyDataattributesWithQuantity8;
const bodyDataattributesWithQuantity9: AttributesWithQuantity = {
attributeId: 'RMA32',
quantity: 1,
};
bodyDataAttributesWithQuantity[9] = bodyDataattributesWithQuantity9;
const bodyDataattributesWithQuantity10: AttributesWithQuantity = {
attributeId: 'RMA41',
quantity: 1,
};
bodyDataAttributesWithQuantity[10] = bodyDataattributesWithQuantity10;
const bodyDataattributesWithQuantity11: AttributesWithQuantity = {
attributeId: 'RMA5085',
quantity: 1,
};
bodyDataAttributesWithQuantity[11] = bodyDataattributesWithQuantity11;
const bodyDataattributesWithQuantity12: AttributesWithQuantity = {
attributeId: 'RMA59',
quantity: 1,
};
bodyDataAttributesWithQuantity[12] = bodyDataattributesWithQuantity12;
const bodyDataattributesWithQuantity13: AttributesWithQuantity = {
attributeId: 'RMA6058',
quantity: 1,
};
bodyDataAttributesWithQuantity[13] = bodyDataattributesWithQuantity13;
const bodyDataattributesWithQuantity14: AttributesWithQuantity = {
attributeId: 'RMA68',
quantity: 1,
};
bodyDataAttributesWithQuantity[14] = bodyDataattributesWithQuantity14;
const bodyDataattributesWithQuantity15: AttributesWithQuantity = {
attributeId: 'RMA88',
quantity: 1,
};
bodyDataAttributesWithQuantity[15] = bodyDataattributesWithQuantity15;
const bodyDataBedroomConfigurationBedrooms: Bedroom[] = [];
const bodyDataBedroomConfigurationbedrooms0BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms0Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms0BedsBed[0] = bodyDataBedroomConfigurationbedrooms0Bedsbed0;
const bodyDataBedroomConfigurationbedrooms0Bedsbed1: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms0BedsBed[1] = bodyDataBedroomConfigurationbedrooms0Bedsbed1;
const bodyDataBedroomConfigurationbedrooms0Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms0BedsBed,
};
const bodyDataBedroomConfigurationbedrooms0: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms0Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[0] = bodyDataBedroomConfigurationbedrooms0;
const bodyDataBedroomConfigurationbedrooms1BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms1Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms1BedsBed[0] = bodyDataBedroomConfigurationbedrooms1Bedsbed0;
const bodyDataBedroomConfigurationbedrooms1Bedsbed1: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms1BedsBed[1] = bodyDataBedroomConfigurationbedrooms1Bedsbed1;
const bodyDataBedroomConfigurationbedrooms1Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms1BedsBed,
};
const bodyDataBedroomConfigurationbedrooms1: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms1Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[1] = bodyDataBedroomConfigurationbedrooms1;
const bodyDataBedroomConfigurationbedrooms2BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms2Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms2BedsBed[0] = bodyDataBedroomConfigurationbedrooms2Bedsbed0;
const bodyDataBedroomConfigurationbedrooms2Bedsbed1: Bed = {
bedType: 'RMA86',
count: 1,
};
bodyDataBedroomConfigurationbedrooms2BedsBed[1] = bodyDataBedroomConfigurationbedrooms2Bedsbed1;
const bodyDataBedroomConfigurationbedrooms2Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms2BedsBed,
};
const bodyDataBedroomConfigurationbedrooms2: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms2Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[2] = bodyDataBedroomConfigurationbedrooms2;
const bodyDataBedroomConfigurationbedrooms3BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms3Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms3BedsBed[0] = bodyDataBedroomConfigurationbedrooms3Bedsbed0;
const bodyDataBedroomConfigurationbedrooms3Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms3BedsBed,
};
const bodyDataBedroomConfigurationbedrooms3: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms3Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[3] = bodyDataBedroomConfigurationbedrooms3;
const bodyDataBedroomConfigurationbedrooms4BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms4Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms4BedsBed[0] = bodyDataBedroomConfigurationbedrooms4Bedsbed0;
const bodyDataBedroomConfigurationbedrooms4Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms4BedsBed,
};
const bodyDataBedroomConfigurationbedrooms4: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms4Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[4] = bodyDataBedroomConfigurationbedrooms4;
const bodyDataBedroomConfigurationbedrooms5BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms5Bedsbed0: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms5BedsBed[0] = bodyDataBedroomConfigurationbedrooms5Bedsbed0;
const bodyDataBedroomConfigurationbedrooms5Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms5BedsBed,
};
const bodyDataBedroomConfigurationbedrooms5: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms5Beds,
type: 'Bedroom',
privateBathroom: true,
};
bodyDataBedroomConfigurationBedrooms[5] = bodyDataBedroomConfigurationbedrooms5;
const bodyDataBedroomConfigurationbedrooms6BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms6Bedsbed0: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms6BedsBed[0] = bodyDataBedroomConfigurationbedrooms6Bedsbed0;
const bodyDataBedroomConfigurationbedrooms6Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms6BedsBed,
};
const bodyDataBedroomConfigurationbedrooms6: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms6Beds,
type: 'Living Room',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[6] = bodyDataBedroomConfigurationbedrooms6;
const bodyDataBedroomConfiguration: BedroomConfiguration = {
bedrooms: bodyDataBedroomConfigurationBedrooms,
};
const bodyDataPolicyInternetPolicy: InternetPolicy = {
accessInternet: true,
};
bodyDataPolicyInternetPolicy.kindOfInternet = 'WiFi';
bodyDataPolicyInternetPolicy.availableInternet = 'AllAreas';
bodyDataPolicyInternetPolicy.chargeInternet = 'Free';
const bodyDataPolicyParkingPolicy: ParkingPolicy = {
accessParking: true,
};
bodyDataPolicyParkingPolicy.locatedParking = 'OnSite';
bodyDataPolicyParkingPolicy.privateParking = true;
bodyDataPolicyParkingPolicy.chargeParking = '$ 150';
bodyDataPolicyParkingPolicy.timeCostParking = 'PerStay';
bodyDataPolicyParkingPolicy.necessaryReservationParking = 'NotPossible';
const bodyDataPolicyPetPolicy: PetPolicy = {
allowedPets: 'Allowed',
};
bodyDataPolicyPetPolicy.chargePets = 'Free';
const bodyDataPolicy: Policy = {
childrenAllowed: true,
smokingAllowed: false,
};
bodyDataPolicy.internetPolicy = bodyDataPolicyInternetPolicy;
bodyDataPolicy.parkingPolicy = bodyDataPolicyParkingPolicy;
bodyDataPolicy.petPolicy = bodyDataPolicyPetPolicy;
const bodyDataLocation: Location = {
postalCode: '60606',
country: 'US',
region: 'Illinois',
city: 'Chicago',
street: '210 North Wells Street',
zipCode9: '60606-1330',
};
const bodyData: Property = {
name: 'Test product',
rooms: 5,
bathrooms: 4,
persons: 10,
propertyType: 'PCT34',
currency: 'EUR',
supportedLosRates: false,
};
bodyData.toilets = 2;
bodyData.totalBeds = 6;
bodyData.space = 113.76;
bodyData.spaceUnit = 'SQ_FT';
bodyData.childs = 2;
bodyData.latitude = 41.886125;
bodyData.longitude = -87.634233;
bodyData.livingRoom = 2;
bodyData.notes = bodyDataNotes;
bodyData.attributesWithQuantity = bodyDataAttributesWithQuantity;
bodyData.bedroomConfiguration = bodyDataBedroomConfiguration;
bodyData.checkInTime = '16:00:00';
bodyData.checkInToTime = '20:00:00';
bodyData.checkOutTime = '10:00:00';
bodyData.policy = bodyDataPolicy;
bodyData.location = bodyDataLocation;
const body: CreateUpdatePropertyRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await productController.createproduct(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"name": "Apimatic Test",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 5,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"livingRoom": 2,
"altId": 23556,
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"shortDescription": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "IT",
"value": "House Rules on IT!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"name": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "FR",
"value": "House Rules on FR!"
}
]
},
"finePrint": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"nearbyAmenities": [],
"propertyType": "PCT34",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
},
"checkInTime": "16:00:00",
"checkInToTime": "20:00:00",
"checkOutTime": "10:00:00",
"currency": "EUR",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": false
}
]
}
This function allows a logged in user to update product details.
Request parameters and request example will be the same as in the create product API. The only field that must be added is the product id.
You need to have all other parameters which were used in the create API call that you want to keep (AltID can’t be updated). Everything that you do not send as an update will be deleted (overwritten).
Response parameters and response examples are the same as in the create product API.
async updateproduct(
contentType: string,
body: CreateUpdatePropertyRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<Productresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateUpdatePropertyRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataNotesDescriptionTexts: Text[] = [];
const bodyDataNotesDescriptiontexts0: Text = {
language: 'EN',
value: 'Main description on EN!',
};
bodyDataNotesDescriptionTexts[0] = bodyDataNotesDescriptiontexts0;
const bodyDataNotesDescriptiontexts1: Text = {
language: 'ES',
value: 'Main description on ES!',
};
bodyDataNotesDescriptionTexts[1] = bodyDataNotesDescriptiontexts1;
const bodyDataNotesDescription: DescriptionTextModel = {
texts: bodyDataNotesDescriptionTexts,
};
const bodyDataNotesHouseRulesTexts: Text[] = [];
const bodyDataNotesHouseRulestexts0: Text = {
language: 'EN',
value: 'House Rules on EN!',
};
bodyDataNotesHouseRulesTexts[0] = bodyDataNotesHouseRulestexts0;
const bodyDataNotesHouseRulestexts1: Text = {
language: 'SR',
value: 'House Rules on SR!',
};
bodyDataNotesHouseRulesTexts[1] = bodyDataNotesHouseRulestexts1;
const bodyDataNotesHouseRules: DescriptionTextModel = {
texts: bodyDataNotesHouseRulesTexts,
};
const bodyDataNotesShortDescriptionTexts: Text[] = [];
const bodyDataNotesShortDescriptiontexts0: Text = {
language: 'EN',
value: 'Short description on EN!',
};
bodyDataNotesShortDescriptionTexts[0] = bodyDataNotesShortDescriptiontexts0;
const bodyDataNotesShortDescriptiontexts1: Text = {
language: 'ES',
value: 'short description on ES!',
};
bodyDataNotesShortDescriptionTexts[1] = bodyDataNotesShortDescriptiontexts1;
const bodyDataNotesShortDescription: DescriptionTextModel = {
texts: bodyDataNotesShortDescriptionTexts,
};
const bodyDataNotes: Notes = {
description: bodyDataNotesDescription,
};
bodyDataNotes.houseRules = bodyDataNotesHouseRules;
bodyDataNotes.shortDescription = bodyDataNotesShortDescription;
const bodyDataAttributesWithQuantity: AttributesWithQuantity[] = [];
const bodyDataattributesWithQuantity0: AttributesWithQuantity = {
attributeId: 'HAC312',
quantity: 1,
};
bodyDataAttributesWithQuantity[0] = bodyDataattributesWithQuantity0;
const bodyDataattributesWithQuantity1: AttributesWithQuantity = {
attributeId: 'RMA107',
quantity: 1,
};
bodyDataAttributesWithQuantity[1] = bodyDataattributesWithQuantity1;
const bodyDataattributesWithQuantity2: AttributesWithQuantity = {
attributeId: 'RMA11',
quantity: 1,
};
bodyDataAttributesWithQuantity[2] = bodyDataattributesWithQuantity2;
const bodyDataattributesWithQuantity3: AttributesWithQuantity = {
attributeId: 'RMA149',
quantity: 1,
};
bodyDataAttributesWithQuantity[3] = bodyDataattributesWithQuantity3;
const bodyDataattributesWithQuantity4: AttributesWithQuantity = {
attributeId: 'RMA163',
quantity: 1,
};
bodyDataAttributesWithQuantity[4] = bodyDataattributesWithQuantity4;
const bodyDataattributesWithQuantity5: AttributesWithQuantity = {
attributeId: 'RMA18',
quantity: 1,
};
bodyDataAttributesWithQuantity[5] = bodyDataattributesWithQuantity5;
const bodyDataattributesWithQuantity6: AttributesWithQuantity = {
attributeId: 'RMA19',
quantity: 1,
};
bodyDataAttributesWithQuantity[6] = bodyDataattributesWithQuantity6;
const bodyDataattributesWithQuantity7: AttributesWithQuantity = {
attributeId: 'RMA251',
quantity: 1,
};
bodyDataAttributesWithQuantity[7] = bodyDataattributesWithQuantity7;
const bodyDataattributesWithQuantity8: AttributesWithQuantity = {
attributeId: 'RMA273',
quantity: 1,
};
bodyDataAttributesWithQuantity[8] = bodyDataattributesWithQuantity8;
const bodyDataattributesWithQuantity9: AttributesWithQuantity = {
attributeId: 'RMA32',
quantity: 1,
};
bodyDataAttributesWithQuantity[9] = bodyDataattributesWithQuantity9;
const bodyDataattributesWithQuantity10: AttributesWithQuantity = {
attributeId: 'RMA41',
quantity: 1,
};
bodyDataAttributesWithQuantity[10] = bodyDataattributesWithQuantity10;
const bodyDataattributesWithQuantity11: AttributesWithQuantity = {
attributeId: 'RMA5085',
quantity: 1,
};
bodyDataAttributesWithQuantity[11] = bodyDataattributesWithQuantity11;
const bodyDataattributesWithQuantity12: AttributesWithQuantity = {
attributeId: 'RMA59',
quantity: 1,
};
bodyDataAttributesWithQuantity[12] = bodyDataattributesWithQuantity12;
const bodyDataattributesWithQuantity13: AttributesWithQuantity = {
attributeId: 'RMA6058',
quantity: 1,
};
bodyDataAttributesWithQuantity[13] = bodyDataattributesWithQuantity13;
const bodyDataattributesWithQuantity14: AttributesWithQuantity = {
attributeId: 'RMA68',
quantity: 1,
};
bodyDataAttributesWithQuantity[14] = bodyDataattributesWithQuantity14;
const bodyDataattributesWithQuantity15: AttributesWithQuantity = {
attributeId: 'RMA88',
quantity: 1,
};
bodyDataAttributesWithQuantity[15] = bodyDataattributesWithQuantity15;
const bodyDataBedroomConfigurationBedrooms: Bedroom[] = [];
const bodyDataBedroomConfigurationbedrooms0BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms0Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms0BedsBed[0] = bodyDataBedroomConfigurationbedrooms0Bedsbed0;
const bodyDataBedroomConfigurationbedrooms0Bedsbed1: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms0BedsBed[1] = bodyDataBedroomConfigurationbedrooms0Bedsbed1;
const bodyDataBedroomConfigurationbedrooms0Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms0BedsBed,
};
const bodyDataBedroomConfigurationbedrooms0: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms0Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[0] = bodyDataBedroomConfigurationbedrooms0;
const bodyDataBedroomConfigurationbedrooms1BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms1Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms1BedsBed[0] = bodyDataBedroomConfigurationbedrooms1Bedsbed0;
const bodyDataBedroomConfigurationbedrooms1Bedsbed1: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms1BedsBed[1] = bodyDataBedroomConfigurationbedrooms1Bedsbed1;
const bodyDataBedroomConfigurationbedrooms1Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms1BedsBed,
};
const bodyDataBedroomConfigurationbedrooms1: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms1Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[1] = bodyDataBedroomConfigurationbedrooms1;
const bodyDataBedroomConfigurationbedrooms2BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms2Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms2BedsBed[0] = bodyDataBedroomConfigurationbedrooms2Bedsbed0;
const bodyDataBedroomConfigurationbedrooms2Bedsbed1: Bed = {
bedType: 'RMA86',
count: 1,
};
bodyDataBedroomConfigurationbedrooms2BedsBed[1] = bodyDataBedroomConfigurationbedrooms2Bedsbed1;
const bodyDataBedroomConfigurationbedrooms2Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms2BedsBed,
};
const bodyDataBedroomConfigurationbedrooms2: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms2Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[2] = bodyDataBedroomConfigurationbedrooms2;
const bodyDataBedroomConfigurationbedrooms3BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms3Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms3BedsBed[0] = bodyDataBedroomConfigurationbedrooms3Bedsbed0;
const bodyDataBedroomConfigurationbedrooms3Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms3BedsBed,
};
const bodyDataBedroomConfigurationbedrooms3: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms3Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[3] = bodyDataBedroomConfigurationbedrooms3;
const bodyDataBedroomConfigurationbedrooms4BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms4Bedsbed0: Bed = {
bedType: 'RMA113',
count: 1,
};
bodyDataBedroomConfigurationbedrooms4BedsBed[0] = bodyDataBedroomConfigurationbedrooms4Bedsbed0;
const bodyDataBedroomConfigurationbedrooms4Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms4BedsBed,
};
const bodyDataBedroomConfigurationbedrooms4: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms4Beds,
type: 'Bedroom',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[4] = bodyDataBedroomConfigurationbedrooms4;
const bodyDataBedroomConfigurationbedrooms5BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms5Bedsbed0: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms5BedsBed[0] = bodyDataBedroomConfigurationbedrooms5Bedsbed0;
const bodyDataBedroomConfigurationbedrooms5Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms5BedsBed,
};
const bodyDataBedroomConfigurationbedrooms5: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms5Beds,
type: 'Bedroom',
privateBathroom: true,
};
bodyDataBedroomConfigurationBedrooms[5] = bodyDataBedroomConfigurationbedrooms5;
const bodyDataBedroomConfigurationbedrooms6BedsBed: Bed[] = [];
const bodyDataBedroomConfigurationbedrooms6Bedsbed0: Bed = {
bedType: 'RMA58',
count: 1,
};
bodyDataBedroomConfigurationbedrooms6BedsBed[0] = bodyDataBedroomConfigurationbedrooms6Bedsbed0;
const bodyDataBedroomConfigurationbedrooms6Beds: Beds = {
bed: bodyDataBedroomConfigurationbedrooms6BedsBed,
};
const bodyDataBedroomConfigurationbedrooms6: Bedroom = {
beds: bodyDataBedroomConfigurationbedrooms6Beds,
type: 'Living Room',
privateBathroom: false,
};
bodyDataBedroomConfigurationBedrooms[6] = bodyDataBedroomConfigurationbedrooms6;
const bodyDataBedroomConfiguration: BedroomConfiguration = {
bedrooms: bodyDataBedroomConfigurationBedrooms,
};
const bodyDataPolicyInternetPolicy: InternetPolicy = {
accessInternet: true,
};
bodyDataPolicyInternetPolicy.kindOfInternet = 'WiFi';
bodyDataPolicyInternetPolicy.availableInternet = 'AllAreas';
bodyDataPolicyInternetPolicy.chargeInternet = 'Free';
const bodyDataPolicyParkingPolicy: ParkingPolicy = {
accessParking: true,
};
bodyDataPolicyParkingPolicy.locatedParking = 'OnSite';
bodyDataPolicyParkingPolicy.privateParking = true;
bodyDataPolicyParkingPolicy.chargeParking = '$ 150';
bodyDataPolicyParkingPolicy.timeCostParking = 'PerStay';
bodyDataPolicyParkingPolicy.necessaryReservationParking = 'NotPossible';
const bodyDataPolicyPetPolicy: PetPolicy = {
allowedPets: 'Allowed',
};
bodyDataPolicyPetPolicy.chargePets = 'Free';
const bodyDataPolicy: Policy = {
childrenAllowed: true,
smokingAllowed: false,
};
bodyDataPolicy.internetPolicy = bodyDataPolicyInternetPolicy;
bodyDataPolicy.parkingPolicy = bodyDataPolicyParkingPolicy;
bodyDataPolicy.petPolicy = bodyDataPolicyPetPolicy;
const bodyDataLocation: Location = {
postalCode: '60606',
country: 'US',
region: 'Illinois',
city: 'Chicago',
street: '210 North Wells Street',
zipCode9: '60606-1330',
};
const bodyData: Property = {
name: 'Test product',
rooms: 5,
bathrooms: 4,
persons: 10,
propertyType: 'PCT34',
currency: 'EUR',
supportedLosRates: false,
};
bodyData.toilets = 2;
bodyData.totalBeds = 6;
bodyData.space = 113.76;
bodyData.spaceUnit = 'SQ_FT';
bodyData.childs = 2;
bodyData.latitude = 41.886125;
bodyData.longitude = -87.634233;
bodyData.livingRoom = 2;
bodyData.notes = bodyDataNotes;
bodyData.attributesWithQuantity = bodyDataAttributesWithQuantity;
bodyData.bedroomConfiguration = bodyDataBedroomConfiguration;
bodyData.checkInTime = '16:00:00';
bodyData.checkInToTime = '20:00:00';
bodyData.checkOutTime = '10:00:00';
bodyData.policy = bodyDataPolicy;
bodyData.location = bodyDataLocation;
const body: CreateUpdatePropertyRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await productController.updateproduct(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"name": "Name Updated",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 3,
"bathrooms": 6,
"toilets": 6,
"totalBeds": 6,
"space": 66,
"spaceUnit": "SQ_M",
"persons": 6,
"childs": 6,
"latitude": 41.8860812,
"longitude": -87.634233,
"livingRoom": 6,
"notes": {
"description": {
"texts": [
{
"language": "FR",
"value": "Main description in FR!"
},
{
"language": "SR",
"value": "Main description in RO!"
}
]
},
"houseRules": {
"texts": [
{
"language": "RO",
"value": "House Rules in RO!"
},
{
"language": "SK",
"value": "House Rules in SK!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "RMA149",
"quantity": 1
}
],
"nearbyAmenities": [
{
"attributeId": "ACC203",
"distance": 3
}
],
"propertyType": "PCT101",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA6118",
"count": 2
},
{
"bedType": "RMA6120",
"count": 4
}
]
},
"type": "Living Room",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA102",
"count": 2
},
{
"bedType": "RMA58",
"count": 2
},
{
"bedType": "RMA6119",
"count": 3
}
]
},
"type": "Bedroom",
"privateBathroom": true
}
]
},
"checkInTime": "17:00:00",
"checkInToTime": "21:00:00",
"checkOutTime": "11:00:00",
"currency": "RSD",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "Wired",
"availableInternet": "SomeRooms",
"chargeInternet": "$ 1000"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "Nearby",
"privateParking": false,
"chargeParking": "$ 100",
"timeCostParking": "PerHour",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "NotAllowed",
"chargePets": "$ 10"
},
"childrenAllowed": false,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": true
}
]
}
This function allows logged in user to delete list of products.
async deletelistproduct(
contentType: string,
body: PropertyListRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PropertyListRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: number[] = [1235124636, 1235124637];
const body: PropertyListRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await productController.deletelistproduct(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Product with ids [1235124636, 1235124637] was deleted",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows logged in user to get a specific product.
async getproductbyID(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<Productresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | Id of the property |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await productController.getproductbyID(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"name": "Apimatic Test",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 5,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"livingRoom": 2,
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA107",
"quantity": 1
},
{
"attributeId": "RMA11",
"quantity": 1
},
{
"attributeId": "RMA149",
"quantity": 1
},
{
"attributeId": "RMA163",
"quantity": 1
},
{
"attributeId": "RMA18",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA251",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA59",
"quantity": 1
},
{
"attributeId": "RMA6058",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"nearbyAmenities": [],
"propertyType": "PCT34",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
},
"checkInTime": "16:00:00",
"checkInToTime": "20:00:00",
"checkOutTime": "10:00:00",
"currency": "EUR",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": false
}
]
}
This function allows the logged in user to delete product.
async deleteproduct(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | Property ID |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await productController.deleteproduct(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Product with id 1235124636 was deleted",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows logged in user to activate a list of products in BookingPal. Products MUST be activated successfully before they can be distributed to any channel.
Note: When a product is successfully activated it will be queued for the internal BP validation function and you will receive async push messages when the validation is completed - like it is described in the Validation section.
async activationlistproduct(
contentType: string,
body: PropertyListRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PropertyListRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: number[] = [1235124636, 1235124637];
const body: PropertyListRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await productController.activationlistproduct(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Property with ids [1235124634, 1235124636] will be put in Queue for validation. Please expect response over push message.",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows the logged in user to deactivate a list of products. This function will also close the calendars on every channel the products have been listed on.
async deactivationlistproduct(
contentType: string,
body: PropertyListRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PropertyListRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: number[] = [1235124636, 1235124637];
const body: PropertyListRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await productController.deactivationlistproduct(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Product with ids [1235124634, 1235124636] are Deactivated!",
"errorMessage": [],
"is_error": false,
"code": ""
}
Every API call in this section should be with PM credentials.
This is a list of functions to work with property images. Important note is that upload or delete images will be done over an automatic cron job. So it will be done some time after your call, depending on the number of requests which are waiting before your request. Important note: Please make sure to put full URL to image, and to not use some links which will forward our system to another link since images might not be imported.
This function allows logged in user to get image list for the existing product
async getimagelistbyproductID(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<GetimagelistbyproductID>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | ID of the property |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await imagesController.getimagelistbyproductID(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"images": [
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069098.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069098.jpg",
"sort": 1
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069099.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069099.jpg",
"sort": 2
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069100.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069100.jpg",
"sort": 3
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069101.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069101.jpg",
"sort": 4
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069102.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069102.jpg",
"sort": 5
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069103.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069103.jpg",
"sort": 6
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069104.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069104.jpg",
"sort": 7
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069105.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069105.jpg",
"sort": 8
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069106.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069106.jpg",
"sort": 9
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069107.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069107.jpg",
"sort": 10
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069108.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069108.jpg",
"sort": 11
},
{
"url": "http://aff.bstatic.com/images/hotel/max500/110/11069109.jpg",
"tags": [
4,
5,
6
],
"urlMbp": "https://s3.amazonaws.com/mybookingpal/pictures/n2ujn/n2ujn/1235124634/11069109.jpg",
"sort": 12
}
]
}
]
}
This function allows logged in user to delete images.
async deleteallimagesperproperty(
contentType: string,
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
productId |
string |
Template, Required | ID of property for which you want to delete all images |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const productId = 'productId6';
try {
const { result, ...httpResponse } = await imagesController.deleteallimagesperproperty(contentType, productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": "",
"data": []
}
This function allows the logged in user to upload images for the existing product. Every new image will be sorted to the end. The first image sent will be used as the “Main Image”. (Image re-ordering can also be done within the BookingPal platform manually by users)
async createimages(
contentType: string,
body: CreateimagesRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateimagesRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataImageTags: ImageTagsEnum[] = [4, 5, 6];
const bodyDataImage: Image = {
url: 'http://aff.bstatic.com/images/hotel/max500/110/11069097.jpg',
};
bodyDataImage.tags = bodyDataImageTags;
const bodyData: ImageUrlforCreate = {
productId: 1235124634,
image: bodyDataImage,
};
const body: CreateimagesRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await imagesController.createimages(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows the logged in user to delete image(s) from the existing product.
async deletelistofimages(
contentType: string,
body: DeletelistofimagesRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
DeletelistofimagesRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataImages: Image[] = [];
const bodyDataimages0: Image = {
url: 'https://aff.bstatic.com/images/hotel/max500/110/11069102.jpg',
};
bodyDataImages[0] = bodyDataimages0;
const bodyData: ImageUrlList = {
productId: 1235124634,
images: bodyDataImages,
};
const body: DeletelistofimagesRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await imagesController.deletelistofimages(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Images are sent for processing!",
"errorMessage": [],
"is_error": false,
"code": "",
"data": []
}
Every API call in this section should be with PM credentials.
This function allows logged in users to get rates and availability for the specific product. Every API call in this section should be with PM credentials.
async getratesandavailabilityproductID(
contentType: string,
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<RatesAvailabilityresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
productId |
string |
Template, Required | ID of the property |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const productId = 'productId6';
try {
const { result, ...httpResponse } = await ratesAndAvailabilityController.getratesandavailabilityproductID(contentType, productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"leadTime": 2,
"rates": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"amount": 137
}
],
"minStays": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"minStay": 5
}
],
"maxStays": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"maxStay": 20
}
],
"restrictions": [
{
"beginDate": "2020-03-23",
"endDate": "2021-01-25",
"checkIn": {
"monday": false,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
},
"checkOut": {
"monday": false,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
}
},
{
"beginDate": "2021-01-25",
"endDate": "2021-02-01",
"checkIn": {
"monday": false,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
},
"checkOut": {
"monday": false,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": true
}
},
{
"beginDate": "2020-03-16",
"endDate": "2020-03-23",
"checkIn": {
"monday": true,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
},
"checkOut": {
"monday": true,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
}
}
],
"availabilities": [
{
"beginDate": "2020-04-20",
"endDate": "2020-04-25",
"availability": false
}
]
}
]
}
Create and update calls are the same. When data is sent, if the data already exists in BookingPal - that data will be updated. Otherwise it will be created (inserted). If you want to update data for some period, you should just send data for these dates. All other data (for other dates) will remain untouched. This allows you to update only changed periods and we will not delete previously sent data for other periods.
In the case of a first data push, all data for one property should be sent in one request. When making updates or changes to existing data, then all changed data should be sent in one request.
Note: if property is set to use LOS rates (supportedLosRates) - only field leadTime, array availableCount and availability can be updated in this API call (for MLT property). For SGL property only leadTime and availability can be updated. This API call can not be used for OWN properties. Important: Maximum allowed end date in any data type is 3 years in future.
Every API call in this section should be with PM credentials.
async createandupdateratesandavailability(
contentType: string,
body: CreateandupdateratesandavailabilityRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<RatesAvailabilityresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateandupdateratesandavailabilityRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataRates: Rate[] = [];
const bodyDatarates0: Rate = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
amount: 137,
};
bodyDataRates[0] = bodyDatarates0;
const bodyDataMinStays: MinStayModel[] = [];
const bodyDataminStays0: MinStayModel = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
minStay: 5,
};
bodyDataMinStays[0] = bodyDataminStays0;
const bodyDataMaxStays: MaxStayModel[] = [];
const bodyDatamaxStays0: MaxStayModel = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
maxStay: 20,
};
bodyDataMaxStays[0] = bodyDatamaxStays0;
const bodyDataRestrictions: Restriction[] = [];
const bodyDatarestrictions0CheckIn: CheckIn = {
monday: false,
tuesday: false,
wednesday: false,
thursday: false,
friday: false,
saturday: true,
sunday: true,
};
const bodyDatarestrictions0CheckOut: CheckOut = {
monday: false,
tuesday: false,
wednesday: false,
thursday: false,
friday: false,
saturday: true,
sunday: true,
};
const bodyDatarestrictions0: Restriction = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
checkIn: bodyDatarestrictions0CheckIn,
checkOut: bodyDatarestrictions0CheckOut,
};
bodyDataRestrictions[0] = bodyDatarestrictions0;
const bodyDataAvailabilities: AvailabilityModel[] = [];
const bodyDataavailabilities0: AvailabilityModel = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
availability: false,
};
bodyDataAvailabilities[0] = bodyDataavailabilities0;
const bodyDataavailabilities1: AvailabilityModel = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
availability: true,
};
bodyDataAvailabilities[1] = bodyDataavailabilities1;
const bodyDataAvailableCount: AvailableCount[] = [];
const bodyDataavailableCount0: AvailableCount = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
count: 3,
};
bodyDataAvailableCount[0] = bodyDataavailableCount0;
const bodyDataavailableCount1: AvailableCount = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
count: 4,
};
bodyDataAvailableCount[1] = bodyDataavailableCount1;
const bodyData: RatesAvailability = {
productId: 1235124634,
};
bodyData.leadTime = 2;
bodyData.rates = bodyDataRates;
bodyData.minStays = bodyDataMinStays;
bodyData.maxStays = bodyDataMaxStays;
bodyData.restrictions = bodyDataRestrictions;
bodyData.availabilities = bodyDataAvailabilities;
bodyData.availableCount = bodyDataAvailableCount;
const body: CreateandupdateratesandavailabilityRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await ratesAndAvailabilityController.createandupdateratesandavailability(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "This product is SGL and can't have availableCount!",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"leadTime": 2,
"rates": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"amount": 137
}
],
"minStays": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"minStay": 5
}
],
"maxStays": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"maxStay": 20
}
],
"restrictions": [
{
"beginDate": "2020-03-17",
"endDate": "2021-01-25",
"checkIn": {
"monday": false,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
},
"checkOut": {
"monday": false,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": true,
"sunday": true
}
}
],
"availabilities": [
{
"beginDate": "2020-04-20",
"endDate": "2020-04-25",
"availability": false
},
{
"beginDate": "2020-04-26",
"endDate": "2020-04-28",
"availability": true
}
],
"availableCount": [
{
"beginDate": "2020-04-20",
"endDate": "2020-04-25",
"count": 3
},
{
"beginDate": "2020-04-26",
"endDate": "2020-04-28",
"count": 4
}
]
}
]
}
Every API call in this section should be with PM credentials.
Introduction: You can use this function if you would like to send BookingPal different prices for various Length of Stays with the same starting date.
LOS Pricing will be a different method in sending rates to BookingPal and is defined as pricing sent for a specific “Stay ranges”, In the LOS method you are setting specific rates based on the Length of Stay. (This is a different way to push rates to BookingPal. )
For date periods of 1 to 30 days a specific rate need to enter check-in date and a rate for every possible reservation starting at that date (i.e. 1 day, 2 days, up to 30 days, 30 days is the maximum value allowed for this field) you will need to send BookingPal total rate value for that period.
Maximum LOS number of days is 30. All other LOS values after 30 will not be saved. If you do not support reservation for some specific number of dates - send value 0.00 for this LOS number of days. Keep in mind that all values not sent for any specific check-in date will be considered as 0, and reservation for this number of days will not be possible. Field maxGuests allows you to set different rates per different number of guests. If you do not have different rate values per number of guests - you can send the value for maximum number of guests, and all others will have the same rate.
For MLT properties which supported LOS price for update number of count you can use it rates and availability API.
It is suggested to manage availability over “rates and availability” API call, and to close/open dates over this call.
Note: this API call can be used only if you set supportedLosRates = true on the product. Otherwise using this API for specific product is not possible.
async createandupdateLOSLengthofStayPricing(
contentType: string,
body: CreateandupdateLOSRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<LOSratesresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateandupdateLOSRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataLosRates: LosRate[] = [];
const bodyDatalosRates0LosValue: number[] = [100, 150, 200, 250, 300, 0, 0, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 550, 510, 570, 520, 500, 510, 590, 121, 122, 123];
const bodyDatalosRates0: LosRate = {
checkInDate: '2016-03-13T12:52:32.123Z',
maxGuests: 3,
losValue: bodyDatalosRates0LosValue,
};
bodyDataLosRates[0] = bodyDatalosRates0;
const bodyDatalosRates1LosValue: number[] = [111, 112, 123, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 550, 510, 570, 520, 500, 510, 590, 580, 560, 540];
const bodyDatalosRates1: LosRate = {
checkInDate: '2016-03-13T12:52:32.123Z',
maxGuests: 4,
losValue: bodyDatalosRates1LosValue,
};
bodyDataLosRates[1] = bodyDatalosRates1;
const bodyData: LosRatesProduct = {
productId: 1235124634,
losRates: bodyDataLosRates,
};
const body: CreateandupdateLOSRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await lOSPricingController.createandupdateLOSLengthofStayPricing(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"losRates": [
{
"checkInDate": "2020-05-21",
"currency": "RSD",
"maxGuests": 4,
"losValue": [
111,
112,
123,
250,
300,
350,
400,
450,
500,
550,
600,
650,
700,
750,
800,
850,
900,
950,
550,
510,
570,
520,
500,
510,
590,
580,
560,
540,
0,
0
]
},
{
"checkInDate": "2020-06-20",
"currency": "RSD",
"maxGuests": 3,
"losValue": [
100,
150,
200,
250,
300,
0,
0,
450,
500,
550,
600,
650,
700,
750,
800,
850,
900,
950,
550,
510,
570,
520,
500,
510,
590,
121,
122,
123,
0,
0
]
}
]
}
]
}
This function allows the logged in user to get a LOS rate for property.
async getlospriceslistbyproductId(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<LOSratesresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | Property ID in BookingPal |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await lOSPricingController.getlospriceslistbyproductId(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"losRates": [
{
"checkInDate": "2020-05-21",
"currency": "RSD",
"maxGuests": 4,
"losValue": [
111,
112,
123,
250,
300,
350,
400,
450,
500,
550,
600,
650,
700,
750,
800,
850,
900,
950,
550,
510,
570,
520,
500,
510,
590,
580,
560,
540,
0,
0
]
},
{
"checkInDate": "2020-06-20",
"currency": "RSD",
"maxGuests": 3,
"losValue": [
100,
150,
200,
250,
300,
0,
0,
450,
500,
550,
600,
650,
700,
750,
800,
850,
900,
950,
550,
510,
570,
520,
500,
510,
590,
121,
122,
123,
0,
0
]
}
]
}
]
}
Every API call in this section should be with PM credentials.
This function allows the logged in user to get a fee list for the specific product.
async getfeeandtaxlistbyproductId(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<FeeTaxResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | ID of the property |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await feeAndTaxController.getfeeandtaxlistbyproductId(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"fees": [
{
"beginDate": "2020-02-26",
"endDate": "2020-12-12",
"entityType": "OPTIONAL",
"feeType": "GENERAL",
"option": 3,
"name": "RetestFeeHF",
"taxType": "TAXABLE",
"unit": "PER_DAY_PER_PERSON_EXTRA",
"value": 88,
"valueType": "PERCENT"
}
],
"taxes": [
{
"name": "Tax reTestAT",
"type": "SalesTaxIncluded",
"value": 55,
"altId": "11"
}
]
}
]
}
This function allows the logged in user to set fees (i.e. cleaning fee, damage waiver, extra bed, extra person etc.) and taxes for the specific product. Here, you always need to send all fees and taxes for one property. All fees or taxes which were in our system for that property and which are not in the new request will be deleted. Taxes in the BookingPal system will always have percent value.
If you want to delete all fees and/or taxes for one property (if you do not have fees and taxes in your system for one property) send an empty list of fees and.or taxes. In short when you use this request you need to always send us a full list of fees and taxes per property, since we will do a full update.
async createfeeandtax(
contentType: string,
body: CreatefeeandtaxRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<FeeTaxResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreatefeeandtaxRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataFees: Fee[] = [];
const bodyDatafees0: Fee = {
entityType: 'OPTIONAL',
feeType: 'GENERAL',
name: 'RetestFeeHF',
unit: 'PER_DAY_PER_PERSON_EXTRA',
value: 178.13,
valueType: 'PERCENT',
};
bodyDatafees0.beginDate = '2016-03-13T12:52:32.123Z';
bodyDatafees0.endDate = '2016-03-13T12:52:32.123Z';
bodyDatafees0.option = 3;
bodyDatafees0.taxType = 'TAXABLE';
bodyDataFees[0] = bodyDatafees0;
const bodyDataTaxes: Taxes[] = [];
const bodyDatataxes0: Taxes = {
name: 'Tax reTestAT',
value: 168.13,
};
bodyDatataxes0.type = 'SalesTaxIncluded';
bodyDatataxes0.altId = '11';
bodyDataTaxes[0] = bodyDatataxes0;
const bodyData: FeeTax = {
productId: 1235124634,
};
bodyData.fees = bodyDataFees;
bodyData.taxes = bodyDataTaxes;
const body: CreatefeeandtaxRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await feeAndTaxController.createfeeandtax(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"fees": [
{
"beginDate": "2020-02-26",
"endDate": "2020-12-12",
"entityType": "OPTIONAL",
"feeType": "GENERAL",
"option": 3,
"name": "RetestFeeHF",
"taxType": "TAXABLE",
"unit": "PER_DAY_PER_PERSON_EXTRA",
"value": 88,
"valueType": "PERCENT"
}
],
"taxes": [
{
"name": "Tax reTestAT",
"type": "SalesTaxIncluded",
"value": 55,
"altId": "11"
}
]
}
]
}
By default in BookingPal system fees and taxes are required. So if one property does not have at least one fee or tax, the property will be Incomplete and can not be distributed. We already have the possibility to set on Property Manager level (on create / update PM API call) if fees and taxes required. These API calls now allow the PMS to set this on property level in the event where you only have some of your properties with taxes and fees and others without. Keep in mind that if you have this setup on property level we will check this setting first before checking at Property Manager level. If you have not set this at property level then we will only check the setup at Property Manager level. These API calls should be used with PM credentials.
This function allows the logged in user to get info about current set for all PM properties are fees/taxes set to be mandatory or not.
async getfeeandtaxmandatory(
requestOptions?: RequestOptions
): Promise<ApiResponse<FeeTaxValidationSettingResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
FeeTaxValidationSettingResponse
try {
const { result, ...httpResponse } = await feeAndTaxMandatoryAtThePropertyLevelController.getfeeandtaxmandatory();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"validationSettings": [
{
"productId": 1235124634,
"isFeeMandatory": false,
"isTaxMandatory": false
},
{
"productId": 1235124636,
"isFeeMandatory": true,
"isTaxMandatory": true
},
{
"productId": 1235124637,
"isFeeMandatory": true,
"isTaxMandatory": true
}
]
}
]
}
This function allows the logged in user to import or update a fee and tax mandatory.
async importorupdatefeeandtaxmandatory(
contentType: string,
body: SetfeeandtaxvalidationsettingRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
SetfeeandtaxvalidationsettingRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataValidationSettings: FeeTaxMandatorySetting[] = [];
const bodyDatavalidationSettings0: FeeTaxMandatorySetting = {
productId: 1235124634,
isFeeMandatory: false,
isTaxMandatory: false,
};
bodyDataValidationSettings[0] = bodyDatavalidationSettings0;
const bodyData: FeeTaxValidationSettings = {
validationSettings: bodyDataValidationSettings,
};
const body: SetfeeandtaxvalidationsettingRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await feeAndTaxMandatoryAtThePropertyLevelController.importorupdatefeeandtaxmandatory(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "For product ids [1235124634] the validation settings are imported!",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows the logged in user to remove any setup on property level and to return on default (which is that fee/taxes are mandatory). This API call will accept a list of properties.
async removeValidationSettings(
contentType: string,
body: PropertyListRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PropertyListRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: number[] = [1235124636, 1235124637];
const body: PropertyListRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await feeAndTaxMandatoryAtThePropertyLevelController.removeValidationSettings(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "For product ids [1235124634] the validation settings will be removed!",
"errorMessage": [],
"is_error": false,
"code": ""
}
Every API call in this section should be with PM credentials.
Warning: Do not enable the Yields API if not yet certified. BookingPal will no longer certify new partners on this API.
If you are already certified to use the Yields API, no changes are required.
If your system requires the modification of a base price, please include any yields in the per night price for the applicable dates. For more advance yields and pricing strategies, please consider using length-of-stay (LOS) pricing.
This function allows the logged in user to get yield management rules list of the specific product.
async getYMRlistbyproductID(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<Yieldresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | ID of the property |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await yieldsController.getYMRlistbyproductID(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"weekend": [
{
"beginDate": "2020-03-17",
"endDate": "2021-02-15",
"amount": 18,
"modifier": "DECREASE_PERCENT",
"weekendParam": "DAYS_OF_WEEKEND_SAT_SUN"
}
],
"lengthOfStay": [
{
"beginDate": "2020-03-17",
"endDate": "2021-02-15",
"amount": 34,
"modifier": "INCREASE_AMOUNT",
"param": 7
}
],
"dateRange": [
{
"beginDate": "2020-04-10",
"endDate": "2020-04-15",
"amount": 35,
"modifier": "INCREASE_AMOUNT"
},
{
"beginDate": "2020-05-16",
"endDate": "2020-05-25",
"amount": 25,
"modifier": "INCREASE_PERCENT"
}
]
}
]
}
This function allows the logged-in user to add yield management rules for the specific product. Yield management rules can affect the final price of the property depending on some special conditions (like the length of stay, early booking, etc.). These rules automate price manipulations, on an inquiry by inquiry basis. When set criteria are met, they help maximize revenue and occupancy.
How is the price calculated? The price for a night is calculated based on the basic price and the yield management rules.
- If no YMR: {basic price per night} = price per night
- If YMR is set it can Increase/decrease percent or increase/decrease amount: {basic price per night} + {yield amount} = {price per night} or {basic price per night} - {yield amount} = {price per night}
The below examples will use the scenario to walk you step by step and explain how the price is calculated based on different YMRs. Let’s say that the basic price per night for 2016 is 100 USD.
This function is used also for updating yield. So if you already create a specific yield for some date - and you send a new one - we will update the yield for this date. If you need to delete a specific yield type - you can send an empty list for that type.
Important: The maximum allowed end date is 3 years in the future.
async createYMR(
contentType: string,
body: CreateYieldRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<Yieldresponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
CreateYieldRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataWeekend: Yield[] = [];
const bodyDataweekend0: Yield = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
amount: 18,
modifier: 'DECREASE_PERCENT',
};
bodyDataweekend0.weekendParam = 'DAYS_OF_WEEKEND_SAT_SUN';
bodyDataWeekend[0] = bodyDataweekend0;
const bodyDataLengthOfStay: Yield[] = [];
const bodyDatalengthOfStay0: Yield = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
amount: 34,
modifier: 'INCREASE_AMOUNT',
};
bodyDatalengthOfStay0.param = 7;
bodyDataLengthOfStay[0] = bodyDatalengthOfStay0;
const bodyDataDateRange: Yield[] = [];
const bodyDatadateRange0: Yield = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
amount: 35,
modifier: 'INCREASE_AMOUNT',
};
bodyDataDateRange[0] = bodyDatadateRange0;
const bodyDatadateRange1: Yield = {
beginDate: '2016-03-13T12:52:32.123Z',
endDate: '2016-03-13T12:52:32.123Z',
amount: 25,
modifier: 'INCREASE_PERCENT',
};
bodyDataDateRange[1] = bodyDatadateRange1;
const bodyData: TransportYield = {
productId: 1235124634,
};
bodyData.weekend = bodyDataWeekend;
bodyData.lengthOfStay = bodyDataLengthOfStay;
bodyData.dateRange = bodyDataDateRange;
const body: CreateYieldRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await yieldsController.createYMR(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"productId": 1235124634,
"weekend": [
{
"beginDate": "2020-03-17",
"endDate": "2021-02-15",
"amount": 18,
"modifier": "DECREASE_PERCENT",
"weekendParam": "DAYS_OF_WEEKEND_SAT_SUN"
}
],
"lengthOfStay": [
{
"beginDate": "2020-03-17",
"endDate": "2021-02-15",
"amount": 34,
"modifier": "INCREASE_AMOUNT",
"param": 7
}
],
"dateRange": [
{
"beginDate": "2020-04-10",
"endDate": "2020-04-15",
"amount": 35,
"modifier": "INCREASE_AMOUNT"
},
{
"beginDate": "2020-05-16",
"endDate": "2020-05-25",
"amount": 25,
"modifier": "INCREASE_PERCENT"
}
]
}
]
}
This function will allow the PMC to call the BookingPal property validation job for all properties identified which belong to the current user. Authorization token should be on PM level. Also we will run validation only for properties which are activated. If you deactivate property - we will not validate this property.
After the request you will get a response indicating if messages were processed or not. If the request is good your request for the validator job will be put into a queue. Once the request is processed, BookingPal will send an async push message per property informing the user if a property is valid or not, and if it is not valid - with reasons why the validation failed. This message will be sent on the endpoint which was entered in section Push Notifications, field asyncPush.
Note: If the property is distributed already on some channel - this property will not be moved to an Incomplete state. Also if you have property on Incomplete state because of some reason, and you update this data which causes that property is on ‘Incomplete’ property will not be moved automatically to a valid state. Instead, you should run a Validation job manually for that property or wait for our automatic validation job which we are running once per day.
To make the property ready for Onboarding you should run validation first. if the property is valid - it will be ready for onboarding. Otherwise - the property will be in Incomplete state. Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.
async bookingPalValidationjobFullPM(
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
try {
const { result, ...httpResponse } = await validationController.bookingPalValidationjobFullPM();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function will allow the PMS to call the BookingPal property validation job for a list of properties from request. These properties must belong to the current user and authorization token should be on PM level. Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.
async bookingPalValidationjobListofproperties(
contentType: string,
body: ValidationforListofpropertiesRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
ValidationforListofpropertiesRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyDataProductIds: number[] = [1235124634, 1235124636];
const bodyData: ValidationPropertyIDsList = {
productIds: bodyDataProductIds,
};
const body: ValidationforListofpropertiesRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await validationController.bookingPalValidationjobListofproperties(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": ""
}
Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
This function allows the logged in user to get all message threads or message threads with an unresponded message from guest for the whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return the first page and 10 threads per page.
Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.
async getTestmessagethreads(
page: number,
limit: number,
threadType: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<GetmessagethreadsResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
page |
number |
Query, Required | - |
limit |
number |
Query, Required | - |
threadType |
string |
Template, Required | Request all threads or only threads with unanswered message {new,all} |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const page = 30;
const limit = 172;
const threadType = 'threadType6';
try {
const { result, ...httpResponse } = await testingOfMessageAPICallsController.getTestmessagethreads(page, limit, threadType);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"threads": [
{
"id": 68241,
"lastMessageSentAt": "2019-12-03 00:00:00",
"lastMessageText": "Message KHSroelMoR",
"channelName": "AirBnB",
"channelABB": "ABB",
"guestName": "Test Guest Name 2 ",
"guestEmailAddress": "autoeelcbl@atxjarv.uri",
"productId": 1235124634,
"reservationId": 119557886,
"dateFrom": "2019-12-02",
"dateTo": "2019-12-04"
},
{
"id": 68257,
"lastMessageSentAt": "2019-12-03 00:00:00",
"lastMessageText": "Message ytgdVvQpQm",
"channelName": "AirBnB",
"channelABB": "ABB",
"guestName": "Test Guest Name 1",
"guestEmailAddress": "autoppresf@at81.sla",
"productId": 1235124634,
"dateFrom": "2019-12-02",
"dateTo": "2019-12-04"
}
]
}
]
}
Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
This function allows the logged-in user to get a list of all messages from passed thread Id. You need to use PM credentials
Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.
async getTestmessagelistforspecificthread(
threadId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<GetmessagelistforspecificthreadResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
threadId |
string |
Template, Required | ID of thread |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
GetmessagelistforspecificthreadResponse
const threadId = 'threadId8';
try {
const { result, ...httpResponse } = await testingOfMessageAPICallsController.getTestmessagelistforspecificthread(threadId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"messages": [
{
"message": "Test message",
"createdAt": "2019-11-25 12:32:39",
"user": "PROPERTY_MANAGER"
}
]
}
]
}
This function will allow PM to post new messages in already existing threads. Since this call is only for testing - we will not actually save these passed values.
Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
Note: To be able to test these calls, you need to have at least 1 property, since we will in response return to you messages for 1 property from your PM.
async postnewTestmessageforspecificthread(
body: PostnewmessageforspecificthreadRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
body |
PostnewmessageforspecificthreadRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const bodyData: MessageRequestFromSupplier = {
threadId: 5656,
message: 'New message',
};
const body: PostnewmessageforspecificthreadRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await testingOfMessageAPICallsController.postnewTestmessageforspecificthread(body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": ""
}
This function allows the logged in user to get all message threads or message threads with unresponded message from guest for whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return first page and 10 threads per page. And in heading you will get a link for the next page.
async getmessagethreads(
page: number,
limit: number,
threadType: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<GetmessagethreadsResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
page |
number |
Query, Required | Number of current page |
limit |
number |
Query, Required | Limit of how many threads will be showed at one page |
threadType |
string |
Template, Required | Request all threads or only threads with unanswered message {new,all} |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const page = 30;
const limit = 172;
const threadType = 'threadType6';
try {
const { result, ...httpResponse } = await messagingController.getmessagethreads(page, limit, threadType);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"threads": [
{
"id": 68241,
"lastMessageSentAt": "2019-12-03 00:00:00",
"lastMessageText": "Message KHSroelMoR",
"channelName": "AirBnB",
"channelABB": "ABB",
"guestName": "Test Guest Name 2 ",
"guestEmailAddress": "autoeelcbl@atxjarv.uri",
"productId": 1235124634,
"reservationId": 119557886,
"dateFrom": "2019-12-02",
"dateTo": "2019-12-04"
},
{
"id": 68257,
"lastMessageSentAt": "2019-12-03 00:00:00",
"lastMessageText": "Message ytgdVvQpQm",
"channelName": "AirBnB",
"channelABB": "ABB",
"guestName": "Test Guest Name 1",
"guestEmailAddress": "autoppresf@at81.sla",
"productId": 1235124634,
"dateFrom": "2019-12-02",
"dateTo": "2019-12-04"
}
]
}
]
}
This function allows the logged in user to get a list of all messages from passed thread Id. You need to use PM credentials.
async getmessagelistforspecificthread(
threadId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<GetmessagelistforspecificthreadResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
threadId |
string |
Template, Required | ID of the thread |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
GetmessagelistforspecificthreadResponse
const threadId = 'threadId8';
try {
const { result, ...httpResponse } = await messagingController.getmessagelistforspecificthread(threadId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"messages": [
{
"message": "Test message",
"createdAt": "2019-11-25 12:32:39",
"user": "PROPERTY_MANAGER"
}
]
}
]
}
This function will allow PM to post new messages in already existing threads.
async postnewmessageforspecificthread(
contentType: string,
body: PostnewmessageforspecificthreadRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PostnewmessageforspecificthreadRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: MessageRequestFromSupplier = {
threadId: 5656,
message: 'New message',
};
const body: PostnewmessageforspecificthreadRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await messagingController.postnewmessageforspecificthread(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Your request was received and put in queue",
"errorMessage": [],
"is_error": false,
"code": ""
}
Some channels like Airbnb have an option for guests to use the “Request to book” possibility, where the Property Manager needs to approve or decline the booking within the next 24 hours. If the period expires - the booking will be automatically cancelled by Airbnb. Once this booking request is received from the channel side, it will be forwarded to the PMS over this API by sending a notification to the “requestToBook'' link, which can be set through the Push notification API. Corresponding dates will not be closed at that point in time and should be kept open. There’s a 24 hour window to either accept or avoid the reservation. If this reservation is avoided, it will be cancelled in both the mybookingpal system and on the channel. If the reservation is accepted, that information will be sent to the channel where a new reservation will be created, and then subsequent information sent back over regular New reservation notification flow. Bear in mind that once the requests to book are received (and more importantly, once they are accepted) – dates must remain open in your system, otherwise a real reservation creation will not be possible.
This is an API call which you should use for accepting on avoiding requests to book.
async requesttoBookAnswerfromPMS(
contentType: string,
body: RequesttoBookAnswerfromPMSRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
RequesttoBookAnswerfromPMSRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: FunctionsRequestToBook = {
requestToBookType: 'DENY',
reservationId: 1235124634,
};
bodyData.requestToBookDeclineReasonType = 'DATES_NOT_AVAILABLE';
bodyData.declineMessageToGuest = 'these dates are not available any more. ';
const body: RequesttoBookAnswerfromPMSRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await requestToBookController.requesttoBookAnswerfromPMS(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Request to book answer accepted",
"errorMessage": [],
"is_error": false,
"code": ""
}
Since you can not get the request to book on our test environment (since this first needs to be created on the channel) We provide the possibility for PMS to test this request with some random filled data in our system. So when you call this API function - we will send you push notification for the request to book for a provided property ID.
async requesttoBookTest(
body: RequesttoBookTestRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<APIResponsewithoutData>>
Parameter | Type | Tags | Description |
---|---|---|---|
body |
RequesttoBookTestRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const bodyData: FunctionsRequestToBookTest = {
action: 'RESERVATION_REQUEST_VOIDED',
productId: 1235124634,
};
const body: RequesttoBookTestRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await requestToBookController.requesttoBookTest(body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "Request to book test accepted",
"errorMessage": [],
"is_error": false,
"code": "",
"data": []
}
This will be a request which we will send to PMS when we get a request to book from the channel. So when BookingPal gets a new request to book request - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section - "requestToBook").
Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
ℹ️ Note This endpoint does not require authentication.
async requesttoBookRequest(
body: RequestToBookRequestModel,
requestOptions?: RequestOptions
): Promise<ApiResponse<ReservationpushResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
body |
RequestToBookRequestModel |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const bodyRezcasterNotificationRequestFees: ReservationFeeNotificationModel[] = [];
const bodyRezcasterNotificationRequestfees0: ReservationFeeNotificationModel = {
name: 'Cleaning Fee',
value: 110,
};
bodyRezcasterNotificationRequestfees0.id = '937-4';
bodyRezcasterNotificationRequestFees[0] = bodyRezcasterNotificationRequestfees0;
const bodyRezcasterNotificationRequestfees1: ReservationFeeNotificationModel = {
name: 'Limited Damage Waiver',
value: 60,
};
bodyRezcasterNotificationRequestfees1.id = '355';
bodyRezcasterNotificationRequestFees[1] = bodyRezcasterNotificationRequestfees1;
const bodyRezcasterNotificationRequestfees2: ReservationFeeNotificationModel = {
name: 'Processing Fee',
value: 40,
};
bodyRezcasterNotificationRequestfees2.id = '1298';
bodyRezcasterNotificationRequestFees[2] = bodyRezcasterNotificationRequestfees2;
const bodyRezcasterNotificationRequestTaxes: ReservationTaxNotificationModel[] = [];
const bodyRezcasterNotificationRequesttaxes0: ReservationTaxNotificationModel = {
name: 'State of Florida-Lake County State Tax',
value: 5,
};
bodyRezcasterNotificationRequesttaxes0.id = '22';
bodyRezcasterNotificationRequestTaxes[0] = bodyRezcasterNotificationRequesttaxes0;
const bodyRezcasterNotificationRequesttaxes1: ReservationTaxNotificationModel = {
name: 'Tax-Lake County County Tax',
value: 15,
};
bodyRezcasterNotificationRequesttaxes1.id = '23';
bodyRezcasterNotificationRequestTaxes[1] = bodyRezcasterNotificationRequesttaxes1;
const bodyRezcasterNotificationRequestCommission: ReservationCommissionsNotificationModel = {
channelCommission: 10,
bpCommission: 12,
};
const bodyRezcasterNotificationRequestRate: ReservationRateNotifcationModel = {
originalRackRate: 400,
netRate: 400,
newPublishedRackRate: 422,
};
const bodyRezcasterNotificationRequest: Reservationnotificationobject = {
reservationId: '107',
productId: '1234816374',
supplierId: '3731837',
agentName: 'TestAndrew',
confirmationId: 'ZSC213123123A',
uniqueKey: 'f207c4c029cb1ea1',
newState: 'Provisional',
customerName: 'dasdasd',
fromDate: '2016-03-13T12:52:32.123Z',
toDate: '2016-03-13T12:52:32.123Z',
adult: 2,
child: 0,
email: 'andrewtesttest222@gmail.com',
total: 652,
fees: bodyRezcasterNotificationRequestFees,
taxes: bodyRezcasterNotificationRequestTaxes,
commission: bodyRezcasterNotificationRequestCommission,
rate: bodyRezcasterNotificationRequestRate,
};
bodyRezcasterNotificationRequest.address = 'asdasd';
bodyRezcasterNotificationRequest.city = 'asdasd';
bodyRezcasterNotificationRequest.zip = 'asdasd';
bodyRezcasterNotificationRequest.country = 'US';
bodyRezcasterNotificationRequest.state = 'asdasda';
bodyRezcasterNotificationRequest.phone = '4234234';
bodyRezcasterNotificationRequest.notes = 'customer test message';
bodyRezcasterNotificationRequest.creditCardType = '1';
bodyRezcasterNotificationRequest.creditCardNumber = '4111111111111111';
bodyRezcasterNotificationRequest.creditCardExpirationMonth = '12';
bodyRezcasterNotificationRequest.creditCardExpirationYear = '2023';
bodyRezcasterNotificationRequest.creditCardCid = '123';
const body: RequestToBookRequestModel = {
rezcasterNotificationRequest: bodyRezcasterNotificationRequest,
action: 'RESERVATION_REQUEST',
reservationId: 1234561234,
expiresAt: '2016-03-13T12:52:32.123Z',
};
body.messageToHost = 'Test';
try {
const { result, ...httpResponse } = await requestToBookController.requesttoBookRequest(body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"altId": "45717",
"is_error": false,
"code": "",
"message": "Request to book is accepted."
}
Provide the links on which the requests about new reservation and cancel reservation will be sent. Links should be https. These links should be set on PMS level, so please use your PMS credentials.
async pushNotificationLinks(
contentType: string,
body: PushNotificationLinksRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<PushNotificationLinksResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
contentType |
string |
Header, Required | - |
body |
PushNotificationLinksRequest |
Body, Required | - |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const contentType = 'Content-Type2';
const bodyData: PushNotificationLinksModel = {
bookLink: 'https://newreservationnotification.link',
cancelLink: 'https://cancelreservation.link',
};
bodyData.asyncPush = 'https://asyncpush.link';
bodyData.requestToBook = 'https://requestToBook.link';
const body: PushNotificationLinksRequest = {
data: bodyData,
};
try {
const { result, ...httpResponse } = await pushNotificationController.pushNotificationLinks(contentType, body);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"bookLink": "https://newreservationnotification.link",
"cancelLink": "https://cancelreservation.link",
"asyncPush": "https://asyncpush.link",
"requestToBook": "https://requestToBook.link"
}
]
}
This will return all notification URLs which are set. It will work on PMS level, so use PMS credentials.
async getNotificationLinks(
requestOptions?: RequestOptions
): Promise<ApiResponse<PushNotificationLinksResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
try {
const { result, ...httpResponse } = await pushNotificationController.getNotificationLinks();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"bookLink": "https://newreservationnotification.link",
"cancelLink": "https://cancelreservation.link",
"asyncPush": "https://asyncpush.link",
"requestToBook": "https://requestToBook.link"
}
]
}
This function allows logged-in users to get all reservations for the specific product.
async getReservationbyProduct(
productId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<ReservationGetResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
productId |
string |
Template, Required | Product ID |
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
const productId = 'productId6';
try {
const { result, ...httpResponse } = await reservationNotificationsController.getReservationbyProduct(productId);
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"reservationId": "107",
"productId": "1235124634",
"supplierId": "61692799",
"agentName": "TestAndrew",
"confirmationId": "ZSC213123123A",
"customerName": "dasdasd",
"fromDate": "2019-05-17",
"toDate": "2019-05-23",
"adult": 2,
"child": 0,
"email": "apimaticTest@test.com",
"phone": "4234234",
"notes": "customer test message",
"total": 200.0,
"fees": [
{
"id": "937-4",
"name": "Cleaning Fee",
"value": 110.0
},
{
"id": "355",
"name": "Limited Damage Waiver",
"value": 60.0
},
{
"id": "1298",
"name": "Processing Fee",
"value": 40.0
}
],
"taxes": [
{
"id": "22",
"name": "State of Florida-Lake County State Tax",
"value": 5.0
},
{
"id": "22",
"name": "State of Florida-Lake County State Tax",
"value": 5.0
},
{
"id": "23",
"name": "Tax-Lake County County Tax",
"value": 15.0
},
{
"id": "23",
"name": "Tax-Lake County County Tax",
"value": 10.0
}
],
"newState": "Provisional",
"commission": {
"channelCommission": 10.0,
"bpCommission": 12.0
},
"rate": {
"originalRackRate": 10.0,
"netRate": 12.0,
"newPublishedRackRate": 11.0
},
"uniqueKey": "f207c4c029cb1ea1"
}
]
}
This API call will return a list of reservations that belong to the current user.
async getReservationbyPM(
requestOptions?: RequestOptions
): Promise<ApiResponse<ReservationGetResponse>>
Parameter | Type | Tags | Description |
---|---|---|---|
requestOptions |
RequestOptions | undefined |
Optional | Pass additional request options. |
try {
const { result, ...httpResponse } = await reservationNotificationsController.getReservationbyPM();
// Get more response info...
// const { statusCode, headers } = httpResponse;
} catch(error) {
if (error instanceof ApiError) {
const errors = error.result;
// const { statusCode, headers } = error;
}
}
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"reservationId": "107",
"productId": "1234816374",
"supplierId": "3731837",
"agentName": "TestAndrew",
"confirmationId": "ZSC213123123A",
"customerName": "dasdasd",
"fromDate": "2019-05-17",
"toDate": "2019-05-23",
"adult": 2,
"child": 0,
"email": "andrewtesttest222@gmail.com",
"phone": "4234234",
"notes": "customer test message",
"total": 200.0,
"fees": [
{
"id": "937-4",
"name": "Cleaning Fee",
"value": 110.0
},
{
"id": "355",
"name": "Limited Damage Waiver",
"value": 60.0
},
{
"id": "1298",
"name": "Processing Fee",
"value": 40.0
}
],
"taxes": [
{
"id": "22",
"name": "State of Florida-Lake County State Tax",
"value": 5.0
},
{
"id": "22",
"name": "State of Florida-Lake County State Tax",
"value": 5.0
},
{
"id": "23",
"name": "Tax-Lake County County Tax",
"value": 15.0
},
{
"id": "23",
"name": "Tax-Lake County County Tax",
"value": 10.0
}
],
"newState": "Provisional",
"commission": {
"channelCommission": 10.0,
"bpCommission": 12.0
},
"rate": {
"originalRackRate": 10.0,
"netRate": 12.0,
"newPublishedRackRate": 11.0
},
"uniqueKey": "f207c4c029cb1ea1"
}
]
}
- Authorization
- Get P Mslist
- P Ms
- Createnew Update Property Manager Request
- Company
- Company Details
- Company Address
- Phone
- Policies
- Payment Policy
- Split Payment
- Cancellation Policy
- Manual Policy
- Manual Policies
- Fee Tax Mandatory
- Payment
- Credit Card
- Payment Gateways
- Property Managerdetailsresponse
- Productresponse
- Property
- Notes
- Description Text Model
- Text
- Attributes With Quantity
- Bedroom Configuration
- Bedroom
- Beds
- Bed
- Policy
- Internet Policy
- Parking Policy
- Pet Policy
- Location
- Create Update Property Request
- Nearby Amenity
- API Responsewithout Data
- Property List Request
- Getimagelistbyproduct ID
- Image
- Createimages Request
- Image Urlfor Create
- Deletelistofimages Request
- Image Url List
- Rates Availabilityresponse
- Rates Availability
- Rate
- Min Stay Model
- Max Stay Model
- Restriction
- Check In
- Check Out
- Availability Model
- Createandupdateratesandavailability Request
- Available Count
- Createandupdate LOS Request
- Los Rates Product
- Los Rate
- LO Sratesresponse
- Fee Tax Response
- Fee Tax
- Fee
- Taxes
- Createfeeandtax Request
- Fee Tax Validation Setting Response
- Fee Tax Validation Settings
- Fee Tax Mandatory Setting
- Setfeeandtaxvalidationsetting Request
- Yieldresponse
- Transport Yield
- Yield
- Create Yield Request
- Validationfor Listofproperties Request
- Validation-Property I Ds List
- Threads Model
- Thread
- Message Request From Supplier
- Getmessagethreads Response
- Getmessagelistforspecificthread Response
- Messages Model
- Message Model
- Postnewmessageforspecificthread Request
- Requestto Book-Answerfrom PMS Request
- Functions Request to Book
- Requestto Book-Test Request
- Functions Request to Book Test
- Push Notification Links Request
- Push Notification Links Model
- Push Notification Links Response
- Reservationnotificationobject
- Reservationpush Response
- Reservation Fee Notification Model
- Reservation Tax Notification Model
- Reservation Rate Notifcation Model
- Reservation Commissions Notification Model
- Cancel Reservationnotificationobject
- Reservation Get Response
- Validation Asynchronouspushmessagerequest
- Asynchronous Validationmodel
- Request to Book Request Model
- Request to Book Cancel Request Model
Authorization (Login) response
Authorization
Name | Type | Tags | Description |
---|---|---|---|
token |
string |
Required | Generated token for authorization. It must be used in every request to API as param jwt. Token is valid for 1h |
message |
string |
Required | Message |
isError |
boolean |
Required | Is request success or not |
errorMessage |
string[] |
Required | Error Message(s) in Array format |
code |
string | undefined |
Optional | Response code |
organizationId |
number |
Required | Organization id - PMS ID |
supplierId |
number |
Required | Supplier ID (Property Manager ID - or PMS ID - depend on account on which you are logged in) |
partyId |
number |
Required | Deprecated field. It will be removed in version 3.3. Please use supplierId field instead |
name |
string |
Required | Account name |
currency |
string |
Required | Account currency |
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"token": "a9eaf5b0-c433-450e-991d-8011fc4aa264",
"partyId": 61692799,
"organizationId": 61690131,
"name": "Update Name",
"currency": "USD",
"supplierId": 61692799
}
GetPMslist
Name | Type | Tags | Description |
---|---|---|---|
message |
string |
Required | Text info message |
errorMessage |
string[] |
Required | List of error messages |
isError |
boolean |
Required | Is error (default = false) |
code |
string | undefined |
Optional | Code of message |
data |
PMs[] | undefined |
Optional | List of PMs models |
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"id": 61690133,
"name": "Test name",
"extraName": "Test fullname",
"emailAddress": "test001@gmail.com"
},
{
"id": 61690517,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa002@gmail.com"
},
{
"id": 61690534,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa003@gmail.com"
},
{
"id": 61691075,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa004@gmail.com"
},
{
"id": 61691076,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa005@gmail.com"
},
{
"id": 61691729,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa103@gmail.com"
},
{
"id": 61691731,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "te@gmail.com"
},
{
"id": 61691732,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa026@gmail.com"
},
{
"id": 61691733,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa027@gmail.com"
},
{
"id": 61691734,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa028@gmail.com"
},
{
"id": 61691735,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa029@gmail.com"
},
{
"id": 61691736,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa0031@gmail.com"
},
{
"id": 61691737,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa0032@gmail.com"
},
{
"id": 61691803,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa035@gmail.com"
},
{
"id": 61691852,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa036@gmail.com"
},
{
"id": 61691861,
"name": "Auto-lyxpz company name",
"extraName": "Auto-dzvjr full name",
"emailAddress": "wnvuyqfya213@pqclbzs.rli"
},
{
"id": 61691868,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "testa038@gmail.com"
},
{
"id": 61691875,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM001@gmail.com"
},
{
"id": 61691876,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM002@gmail.com"
},
{
"id": 61691877,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM003@gmail.com"
},
{
"id": 61691878,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM004@gmail.com"
},
{
"id": 61691879,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM005@gmail.com"
},
{
"id": 61691880,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM006@gmail.com"
},
{
"id": 61691881,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM007@gmail.com"
},
{
"id": 61691882,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM008@gmail.com"
},
{
"id": 61691883,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM009@gmail.com"
},
{
"id": 61691884,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM010@gmail.com"
},
{
"id": 61691885,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM011@gmail.com"
},
{
"id": 61691886,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM012@gmail.com"
},
{
"id": 61691887,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM014@gmail.com"
},
{
"id": 61691888,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM015@gmail.com"
},
{
"id": 61691889,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM016@gmail.com"
},
{
"id": 61691896,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM017@gmail.com"
},
{
"id": 61691897,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM018@gmail.com"
},
{
"id": 61691898,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM019@gmail.com"
},
{
"id": 61691899,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM020@gmail.com"
},
{
"id": 61691900,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM021@gmail.com"
},
{
"id": 61691903,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa0141234@gmail.com"
},
{
"id": 61691904,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa01412345@gmail.com"
},
{
"id": 61691905,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM022@gmail.com"
},
{
"id": 61691906,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM023@gmail.com"
},
{
"id": 61691907,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa014123452@gmail.com"
},
{
"id": 61691908,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa0141234521@gmail.com"
},
{
"id": 61691909,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM024@gmail.com"
},
{
"id": 61691910,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM025@gmail.com"
},
{
"id": 61691911,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM026@gmail.com"
},
{
"id": 61691979,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM028@gmail.com"
},
{
"id": 61692003,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM030@gmail.com"
},
{
"id": 61692065,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM031@gmail.com"
},
{
"id": 61692066,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM032@gmail.com"
},
{
"id": 61692067,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM033@gmail.com"
},
{
"id": 61692068,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "TestPM034@gmail.com"
},
{
"id": 61692418,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM01130@gmail.com"
},
{
"id": 61692455,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM035@gmail.com"
},
{
"id": 61692456,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM036@gmail.com"
},
{
"id": 61692457,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM037@gmail.com"
},
{
"id": 61692552,
"name": "Update Name",
"extraName": "Update Full Name",
"emailAddress": "TestPM038@gmail.com"
},
{
"id": 61692554,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM999MJ@gmail.com"
},
{
"id": 61692695,
"name": "Test",
"extraName": "Test",
"emailAddress": "testa133@gmail.com"
},
{
"id": 61692769,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM050@gmail.com"
},
{
"id": 61692782,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPMCreateProduct@gmail.com"
},
{
"id": 61692785,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM055@gmail.com"
},
{
"id": 61692787,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM056@gmail.com"
},
{
"id": 61692789,
"name": "Test",
"extraName": "Test",
"emailAddress": "TestPM057@gmail.com"
},
{
"id": 61692790,
"name": "Test Wiz",
"extraName": "Test Wiz",
"emailAddress": "TestPM058@gmail.com"
},
{
"id": 61692791,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM059@gmail.com"
},
{
"id": 61692793,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM060@gmail.com"
},
{
"id": 61692794,
"name": "Test wiz1",
"extraName": "Test wiz1",
"emailAddress": "TestPM061@gmail.com"
},
{
"id": 61692795,
"name": "Test wiz",
"extraName": "Test wiz",
"emailAddress": "TestPM062@gmail.com"
},
{
"id": 61692797,
"name": "Wizard Demo",
"extraName": "Wizard Demo",
"emailAddress": "wizarddemo@gmail.com"
},
{
"id": 61692799,
"name": "Test PM",
"extraName": "Test PM",
"emailAddress": "apimaticTest@test.com"
}
]
}
Property Manager model
PMs
Name | Type | Tags | Description |
---|---|---|---|
id |
number |
Required | ID of the property manager |
name |
string |
Required | Name of the property manager’s company |
extraName |
string |
Required | Contact person |
emailAddress |
string |
Required | Email of the property manager |
{
"id": 61690133,
"name": "Test name",
"extraName": "Test fullname",
"emailAddress": "test001@gmail.com"
}
CreatenewUpdatePropertyManagerRequest
Name | Type | Tags | Description |
---|---|---|---|
data |
Company |
Required | Company model |
{
"data": {
"companyDetails": {
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticPMemail@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"password": "password",
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4.0,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2.0
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET",
"user": "test",
"secret": "test",
"additionalField1": "",
"additionalField2": ""
},
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB"
]
}
}
}
}
Company model
Company
Name | Type | Tags | Description |
---|---|---|---|
companyDetails |
CompanyDetails |
Required | - |
policies |
Policies |
Required | - |
payment |
Payment |
Required | - |
id |
number | undefined |
Optional | Supplier id. Not expected in any requests. Will be only in responses. |
{
"companyDetails": {
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticPMemail@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"password": "password",
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4.0,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2.0
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET",
"user": "test",
"secret": "test",
"additionalField1": "",
"additionalField2": ""
},
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB"
]
}
}
}
CompanyDetails
Name | Type | Tags | Description |
---|---|---|---|
accountId |
string |
Required | Unique ID of PM in PMS |
companyName |
string |
Required | Name of PM |
language |
string |
Required | Language 2 letter value as ISO 639-1 code |
fullName |
string |
Required | First and Last Name |
companyAddress |
CompanyAddress |
Required | - |
website |
string |
Required | Company (PM) website URL |
email |
string |
Required | Email of PM. Email need to be unique in BP system, so you might receive error if we already have this email in our system |
phone |
Phone |
Required | - |
password |
string | undefined |
Optional | Password for accessing PM. If the password is not passed in the request random password will be generated and returned in response. Password will be in response only on create and if it is manually generated. Special characters are not allowed, instead use UTF-8 codes, for example instead of # use %23 |
currency |
string |
Required | PM default currency. ISO 4217 code is required |
{
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticPMemail@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"password": "password",
"currency": "USD"
}
CompanyAddress
Name | Type | Tags | Description |
---|---|---|---|
country |
string |
Required | Country of PM. Require 2 letter ISO code |
state |
string |
Required | State (Region) of PM. Required for US properties. |
streetAddress |
string |
Required | Street address of PM. |
city |
string |
Required | City of PM |
zip |
string |
Required | Zip code (postal code) of PM. |
{
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
}
Phone
Name | Type | Tags | Description |
---|---|---|---|
countryCode |
string |
Required | Country code prefix in phone number. For example “+1”. |
number |
string |
Required | Phone number |
{
"countryCode": "+321",
"number": "132456"
}
Policies
Name | Type | Tags | Description |
---|---|---|---|
paymentPolicy |
PaymentPolicy |
Required | - |
cancellationPolicy |
CancellationPolicy |
Required | - |
feeTaxMandatory |
FeeTaxMandatory |
Required | - |
terms |
string |
Required | Full URL to PM terms and conditions |
checkInTime |
string |
Required | Time of Check in (HH:MM:SS) |
checkOutTime |
string |
Required | Time of Check out (HH:MM:SS) |
leadTime |
number |
Required | Minimum number of days before check-in for which reservation is allowed to be booked. Allowed values are 0-7. |
{
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4.0,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2.0
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
}
PaymentPolicy
Name | Type | Tags | Description |
---|---|---|---|
type |
PaymentPolicyTypeEnum |
Required | Full or Split payment. In case of Split payment - it will be 2 payments. [SPLIT,FULL] |
splitPayment |
SplitPayment |
Required | - |
{
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4.0,
"secondPaymentDays": 30
}
}
SplitPayment
Name | Type | Tags | Description |
---|---|---|---|
depositType |
DepositTypeEnum |
Required | First payment deposit type. |
value |
number |
Required | First payment value |
secondPaymentDays |
number |
Required | Number of days before check-in when second payment is required. |
{
"depositType": "FLAT",
"value": 4.0,
"secondPaymentDays": 30
}
CancellationPolicy
Name | Type | Tags | Description |
---|---|---|---|
type |
CancellationPolicyTypeEnum |
Required | - |
manualPolicy |
ManualPolicy |
Required | - |
{
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2.0
}
]
}
}
ManualPolicy
Name | Type | Tags | Description |
---|---|---|---|
type |
ManualPolicyTypeEnum |
Required | - |
manualPolicies |
ManualPolicies[] |
Required | Model |
{
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2.0
}
]
}
ManualPolicies
Name | Type | Tags | Description |
---|---|---|---|
chargeValue |
number |
Required | Percentage or flat value which will be charged in case of cancellation |
beforeDays |
number |
Required | Days before check-in when cancellation policy will be charged |
cancellationFee |
number |
Required | Cancellation transaction fee - additional fee on cancellation |
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1.0
}
FeeTaxMandatory
Name | Type | Tags | Description |
---|---|---|---|
isFeeMandatory |
boolean |
Required | Used in BookingPal validator. Info does property require any fee or not. Default value is TRUE. This setup can be overridden on property level with different API call, which is stronger. |
isTaxMandatory |
boolean |
Required | Used in BookingPal validator. Info does property require any tax or not. Default value is TRUE. This setup can be overridden on property level with different API call, which is stronger. |
{
"isFeeMandatory": true,
"isTaxMandatory": true
}
Payment
Name | Type | Tags | Description |
---|---|---|---|
paymentType |
PaymentTypeEnum |
Required | - |
creditCard |
CreditCard | undefined |
Optional | - |
{
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET",
"user": "test",
"secret": "test",
"additionalField1": "",
"additionalField2": ""
},
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB"
]
}
}
CreditCard
Name | Type | Tags | Description |
---|---|---|---|
creditCardType |
CreditCardTypeEnum |
Required | - |
paymentGateways |
PaymentGateways | undefined |
Optional | - |
creditCardList |
CreditCardListEnum[] | undefined |
Optional | List of acceptable credit cards. Allowed only if type is TRANSMIT. {MASTER_CARD,VISA,AMERICAN_EXPRESS,DINERS_CLUB,DISCOVER}. If POST method selected it will select all creditCardList. |
{
"creditCardType": "POST",
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET",
"user": "test",
"secret": "test",
"additionalField1": "",
"additionalField2": ""
},
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB"
]
}
PaymentGateways
Name | Type | Tags | Description |
---|---|---|---|
paymentGatewaysType |
PaymentGatewaysTypeEnum |
Required | - |
user |
string | undefined |
Optional | Value necessary for accessing payment gateway, values are different per payment gateway: PAYPAL - Client ID AUTHORIZE_NET - User ID BRIDGE_PAY - Username PAY_BOX - Site number DIBS - Login O_GONE - User ID DOC_DATA - ID PAY_GATE - ID Note: This value will not be returned in response. |
secret |
string | undefined |
Optional | Value necessary for accessing payment gateway, values are different per payment gateway: PAYPAL - Secret AUTHORIZE_NET - Transaction Key BRIDGE_PAY - Password PAY_BOX - Rank number DIBS - Password O_GONE - Password DOC_DATA - Password PAY_GATE - Password Note: This value will not be returned in response. |
additionalField1 |
string | undefined |
Optional | Additional value necessary for accessing some payment gateways, values are different per payment gateway: BRIDGE_PAY - Merchant Number PAY_BOX - An identifier DIBS - Merchant ID O_GONE - PSP ID Note: This value will not be returned in response. |
additionalField2 |
string | undefined |
Optional | Additional value necessary for accessing some payment gateways, values are different per payment gateway: BRIDGE_PAY - Merchant Number PAY_BOX - An identifier DIBS - Merchant ID O_GONE - PSP ID Note: This value will not be returned in response. |
{
"paymentGatewaysType": "AUTHORIZE_NET",
"user": "test",
"secret": "test",
"additionalField1": "",
"additionalField2": ""
}
PropertyManagerdetailsresponse
Name | Type | Tags | Description |
---|---|---|---|
message |
string |
Required | text info message |
errorMessage |
string[] |
Required | List of error messages |
isError |
boolean |
Required | Is error (default = false) |
code |
string |
Required | Code of message |
data |
Company[] |
Required | List of models |
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"companyDetails": {
"accountId": "132",
"companyName": "Test PM",
"language": "en",
"fullName": "Test PM",
"companyAddress": {
"country": "US",
"state": "Test State",
"streetAddress": "Test Street",
"city": "Test City",
"zip": "13245"
},
"website": "www.testsite.com",
"email": "apimaticTest@test.com",
"phone": {
"countryCode": "+321",
"number": "132456"
},
"currency": "USD"
},
"policies": {
"paymentPolicy": {
"type": "SPLIT",
"splitPayment": {
"depositType": "FLAT",
"value": 4,
"secondPaymentDays": 30
}
},
"cancellationPolicy": {
"type": "MANUAL",
"manualPolicy": {
"type": "FLAT",
"manualPolicies": [
{
"chargeValue": 20,
"beforeDays": 34,
"cancellationFee": 1
},
{
"chargeValue": 12,
"beforeDays": 45,
"cancellationFee": 2
}
]
}
},
"feeTaxMandatory": {
"isFeeMandatory": true,
"isTaxMandatory": true
},
"terms": "www.test.com",
"checkInTime": "10:00:00",
"checkOutTime": "16:00:00",
"leadTime": 2
},
"payment": {
"paymentType": "MAIL_CHECK",
"creditCard": {
"creditCardType": "POST",
"creditCardList": [
"AMERICAN_EXPRESS",
"DINERS_CLUB",
"DISCOVER",
"MASTER_CARD",
"VISA"
],
"paymentGateways": {
"paymentGatewaysType": "AUTHORIZE_NET"
}
}
},
"id": 61692799
}
]
}
Response for Get, Create or Update product API call
Productresponse
Name | Type | Tags | Description |
---|---|---|---|
message |
string |
Required | text info message |
errorMessage |
string[] |
Required | List of error messages |
isError |
boolean |
Required | Is error (default = false) |
code |
string |
Required | Code of message |
data |
Property[] |
Required | List of models |
{
"message": "",
"errorMessage": [],
"is_error": false,
"code": "",
"data": [
{
"name": "Apimatic Test",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 5,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"livingRoom": 2,
"altId": 23556,
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"name": {
"texts": [
{
"language": "EN",
"value": "Name on EN!"
},
{
"language": "SR",
"value": "Name on SR!"
}
]
},
"shortDescription": {
"texts": [
{
"language": "EN",
"value": "short desc on EN!"
},
{
"language": "SR",
"value": "short desc on SR!"
}
]
},
"finePrint": {
"texts": [
{
"language": "EN",
"value": "fine prints on EN!"
},
{
"language": "SR",
"value": "fine prints on SR!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA107",
"quantity": 1
},
{
"attributeId": "RMA11",
"quantity": 1
},
{
"attributeId": "RMA149",
"quantity": 1
},
{
"attributeId": "RMA163",
"quantity": 1
},
{
"attributeId": "RMA18",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA251",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA59",
"quantity": 1
},
{
"attributeId": "RMA6058",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"nearbyAmenities": [],
"propertyType": "PCT34",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
},
"checkInTime": "16:00:00",
"checkInToTime": "20:00:00",
"checkOutTime": "10:00:00",
"currency": "EUR",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": false
}
]
}
Property
Name | Type | Tags | Description |
---|---|---|---|
name |
string |
Required | Name of the property to display in the list |
id |
number | undefined |
Optional | Property ID in BookingPal |
altId |
number | undefined |
Optional | Alternative Id of the property (ID in your PMS system). Note: this field you can not update, so this field will not be used during update. |
supplierId |
number | undefined |
Optional | Id of the Property Manager (not be used for creating new property. Property will have ID of current authorized user) |
rooms |
number |
Required | Number of bedrooms. Number of bedrooms should be > 0. Value 0 is only allowed in case property type is Studio (PCT46 or PCT110) |
bathrooms |
number |
Required | Number of bathrooms |
toilets |
number | undefined |
Optional | Number of toilets |
totalBeds |
number | undefined |
Optional | Property’s total number of beds |
space |
number | undefined |
Optional | Property size |
spaceUnit |
SpaceUnitEnum | undefined |
Optional | - |
persons |
number |
Required | Maximum number of allowed adults |
childs |
number | undefined |
Optional | Number of allowed children (from 7 to 12 years) |
latitude |
number | undefined |
Optional | Latitude of the property (Must set field latitude and longitude or location) |
longitude |
number | undefined |
Optional | Longitude of the property (Must set field latitude and longitude or location) |
livingRoom |
number | undefined |
Optional | Number of Living rooms |
notes |
Notes | undefined |
Optional | Model where you can define different kinds of text values. If you need to delete some kind of texts, for example short description, you can do this on Update call (PUT), and you need to pass empty array for texts value, for example : "shortDescription": { "texts": [ ] } |
attributesWithQuantity |
AttributesWithQuantity[] | undefined |
Optional | Use this param instead of previous if you need to set quantity more than 1 of attributes. If use both in POST request this will overwrite the previous list (under param attributes). |
nearbyAmenities |
NearbyAmenity[] | undefined |
Optional | List of Nearby Attributes models. Check allowed values in Appendix. |
propertyType |
PropertyTypesEnum |
Required | - |
bedroomConfiguration |
BedroomConfiguration | undefined |
Optional | - |
checkInTime |
string | undefined |
Optional | Time of Check in (HH:MM:SS) |
checkInToTime |
string | undefined |
Optional | Time Check in to (HH:MM:SS) |
checkOutTime |
string | undefined |
Optional | Time of Check out (HH:MM:SS) |
currency |
string |
Required | Property currency. ISO 4217 code is required. |
policy |
Policy | undefined |
Optional | - |
location |
Location | undefined |
Optional | - |
supportedLosRates |
boolean |
Required | If true - means that the property supports only LOS rates. So daily rates can not be sent and updated. Default is false. |
taxNumber |
string | undefined |
Optional | Tax number for product |
touristLicenseNumber |
string | undefined |
Optional | Tourist license number |
touristLicenseExpiryDate |
string | undefined |
Optional | Tourist license expiry date. Correct date format is YYYY-MM-DD. |
multiUnit |
MultiUnitEnum | undefined |
Optional | Enum for product multyunit type. |
parentId |
number | undefined |
Optional | This fields should not be used unless your property is not MLT (check field multiunit). In this case you must set owner (parent) id property to which this property will belong. Also you can not update this property. |
{
"name": "Apimatic Test",
"id": 1235124634,
"supplierId": 61692799,
"rooms": 5,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"livingRoom": 2,
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
}
},
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA107",
"quantity": 1
},
{
"attributeId": "RMA11",
"quantity": 1
},
{
"attributeId": "RMA149",
"quantity": 1
},
{
"attributeId": "RMA163",
"quantity": 1
},
{
"attributeId": "RMA18",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA251",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA59",
"quantity": 1
},
{
"attributeId": "RMA6058",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"nearbyAmenities": [],
"propertyType": "PCT34",
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
},
"checkInTime": "16:00:00",
"checkInToTime": "20:00:00",
"checkOutTime": "10:00:00",
"currency": "EUR",
"policy": {
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
},
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"supportedLosRates": false
}
Model where you can define different kinds of text values. If you need to delete some kind of texts, for example short description, you can do this on Update call (PUT), and you need to pass empty array for texts value, for example : "shortDescription": { "texts": [ ] }
Notes
Name | Type | Tags | Description |
---|---|---|---|
description |
DescriptionTextModel |
Required | Model for any kind of description text in Property object |
houseRules |
DescriptionTextModel | undefined |
Optional | Model for any kind of description text in Property object |
finePrint |
DescriptionTextModel | undefined |
Optional | Model for any kind of description text in Property object |
shortDescription |
DescriptionTextModel | undefined |
Optional | Model for any kind of description text in Property object |
name |
DescriptionTextModel | undefined |
Optional | Model for any kind of description text in Property object |
{
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"name": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"shortDescription": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"finePrint": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
}
}
Model for any kind of description text in Property object
DescriptionTextModel
Name | Type | Tags | Description |
---|---|---|---|
texts |
Text[] |
Required | Text value per languages |
{
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
}
Text
Name | Type | Tags | Description |
---|---|---|---|
language |
string |
Required | Language 2 letter value as ISO 639-1 code (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) |
value |
string |
Required | Text value. Send here only plain text. Do not use HTML or any other characters. |
{
"language": "EN",
"value": "Main description on EN!"
}
AttributesWithQuantity
Name | Type | Tags | Description |
---|---|---|---|
attributeId |
string |
Required | Text of main description Attributes given code in Appendix |
quantity |
number |
Required | Will be set to 1 by default |
{
"attributeId": "HAC312",
"quantity": 1
}
BedroomConfiguration
Name | Type | Tags | Description |
---|---|---|---|
bedrooms |
Bedroom[] |
Required | Bedroom configuration for property |
{
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": true
},
{
"beds": {
"bed": [
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Living Room",
"privateBathroom": false
}
]
}
Bedroom
Name | Type | Tags | Description |
---|---|---|---|
beds |
Beds |
Required | - |
type |
BedroomTypeEnum |
Required | - |
privateBathroom |
boolean |
Required | Room have private bathroom |
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
}
Beds
Name | Type | Tags | Description |
---|---|---|---|
bed |
Bed[] |
Required | List beds per room |
{
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
}
Bed
Name | Type | Tags | Description |
---|---|---|---|
bedType |
string |
Required | Bed code BedTypes are given in Appendix. |
count |
number |
Required | Number of bed |
{
"bedType": "RMA113",
"count": 1
}
Policy
Name | Type | Tags | Description |
---|---|---|---|
internetPolicy |
InternetPolicy | undefined |
Optional | - |
parkingPolicy |
ParkingPolicy | undefined |
Optional | - |
petPolicy |
PetPolicy | undefined |
Optional | - |
childrenAllowed |
boolean |
Required | Children policy |
smokingAllowed |
boolean |
Required | Smoking policy |
{
"internetPolicy": {
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
},
"parkingPolicy": {
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
},
"petPolicy": {
"allowedPets": "Allowed",
"chargePets": "Free"
},
"childrenAllowed": true,
"smokingAllowed": false
}
InternetPolicy
Name | Type | Tags | Description |
---|---|---|---|
accessInternet |
boolean |
Required | Access internet into properties |
kindOfInternet |
KindofInternetTypeEnum | undefined |
Optional | - |
availableInternet |
AvailableInternetEnum | undefined |
Optional | - |
chargeInternet |
string | undefined |
Optional | Charge internet. Example: “Free”, “$ 100”. |
{
"accessInternet": true,
"kindOfInternet": "WiFi",
"availableInternet": "AllAreas",
"chargeInternet": "Free"
}
ParkingPolicy
Name | Type | Tags | Description |
---|---|---|---|
accessParking |
boolean |
Required | Access parking into properties {true,false} |
locatedParking |
LocatedParkingTypeEnum | undefined |
Optional | - |
privateParking |
boolean | undefined |
Optional | Parking is private or no. {true,false} |
chargeParking |
string | undefined |
Optional | Charge parking. Example: “Free”, “$ 100”. |
timeCostParking |
TimeCostParkingEnum | undefined |
Optional | - |
necessaryReservationParking |
ReservationParkingTypeEnum | undefined |
Optional | - |
{
"accessParking": true,
"locatedParking": "OnSite",
"privateParking": true,
"chargeParking": "$ 150",
"timeCostParking": "PerStay",
"necessaryReservationParking": "NotPossible"
}
PetPolicy
Name | Type | Tags | Description |
---|---|---|---|
allowedPets |
AllowedPetsTypeEnum |
Required | - |
chargePets |
string | undefined |
Optional | Charge parking. Example: “Free”, “$ 100”. |
{
"allowedPets": "Allowed",
"chargePets": "Free"
}
Location
Name | Type | Tags | Description |
---|---|---|---|
postalCode |
string |
Required | Postal code of property (Zip code) |
country |
string |
Required | Country of property. Require 2 letter ISO code |
region |
string |
Required | State (Region) of PM. Required for US properties. |
city |
string |
Required | City of property |
street |
string |
Required | Street of property |
zipCode9 |
string |
Required | Set only for US properties (format should be zip5-xxxx) |
{
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
}
Request for Create or Update of Product
CreateUpdatePropertyRequest
Name | Type | Tags | Description |
---|---|---|---|
data |
Property |
Required | - |
{
"data": {
"name": "Test product",
"rooms": 5,
"livingRoom": 2,
"bathrooms": 4,
"toilets": 2,
"totalBeds": 6,
"supportedLosRates": false,
"space": 111,
"spaceUnit": "SQ_FT",
"persons": 10,
"childs": 2,
"latitude": 41.886125,
"longitude": -87.634233,
"currency": "EUR",
"location": {
"postalCode": "60606",
"country": "US",
"region": "Illinois",
"city": "Chicago",
"street": "210 North Wells Street",
"zipCode9": "60606-1330"
},
"propertyType": "PCT34",
"attributesWithQuantity": [
{
"attributeId": "HAC312",
"quantity": 1
},
{
"attributeId": "RMA107",
"quantity": 1
},
{
"attributeId": "RMA11",
"quantity": 1
},
{
"attributeId": "RMA149",
"quantity": 1
},
{
"attributeId": "RMA163",
"quantity": 1
},
{
"attributeId": "RMA18",
"quantity": 1
},
{
"attributeId": "RMA19",
"quantity": 1
},
{
"attributeId": "RMA251",
"quantity": 1
},
{
"attributeId": "RMA273",
"quantity": 1
},
{
"attributeId": "RMA32",
"quantity": 1
},
{
"attributeId": "RMA41",
"quantity": 1
},
{
"attributeId": "RMA5085",
"quantity": 1
},
{
"attributeId": "RMA59",
"quantity": 1
},
{
"attributeId": "RMA6058",
"quantity": 1
},
{
"attributeId": "RMA68",
"quantity": 1
},
{
"attributeId": "RMA88",
"quantity": 1
}
],
"notes": {
"description": {
"texts": [
{
"language": "EN",
"value": "Main description on EN!"
},
{
"language": "ES",
"value": "Main description on ES!"
}
]
},
"houseRules": {
"texts": [
{
"language": "EN",
"value": "House Rules on EN!"
},
{
"language": "SR",
"value": "House Rules on SR!"
}
]
},
"shortDescription": {
"texts": [
{
"language": "EN",
"value": "Short description on EN!"
},
{
"language": "ES",
"value": "short description on ES!"
}
]
}
},
"bedroomConfiguration": {
"bedrooms": [
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA58",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
},
{
"bedType": "RMA86",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedType": "RMA113",
"count": 1
}
]
},
"type": "Bedroom",
"privateBathroom": false
},
{
"beds": {
"bed": [
{
"bedTyp