index

getProperty JSON


Instructions

Post JSON data here to get property information.

See here for information about using the JSON API.

Example Data

{
    "authentication": {
        "apiKey": "apiKeyAsSetInAccountSettings",
        "propKey": "propKeyAsSetForTheProperty"
    },
    "includeRooms": false,
    "includeRoomUnits": false,
    "includeAccountAccess": false
}

Property Fields

FieldDescriptionData TypeNotes
nameProperty nametext
propIdProperty Idinteger
propTypeIdProperty Type Idinteger
currencyCurrencytext3 char currency code
addressAddresstext
cityCitytext
stateStatetext
countryCountrytext2 char country code
postcodePostcodetext
latitudeLatitudedecimalnumber
longitudeLongitudedecimalnumber
phoneTelephonetext
mobileMobiletext
faxFaxtext
emailEmailtext
webWebtext
contactFirstNameContact person first nametext
contactLastNameContact person last nametext
cutOffHourSame day booking cut off hourinteger0 to 24, 24=no cutoff
vatRateVat Ratedecimal
controlPriorityControl panel priorityinteger
template1Property Template Valuetextvalue accessable by template variables
template2Property Template Valuetextvalue accessable by template variables
template3Property Template Valuetextvalue accessable by template variables
template4Property Template Valuetextvalue accessable by template variables
template5Property Template Valuetextvalue accessable by template variables
template6Property Template Valuetextvalue accessable by template variables
template7Property Template Valuetextvalue accessable by template variables
template8Property Template Valuetextvalue accessable by template variables
notifyUrlThis Url is called whenever a booking is made or modifiedtext
notifyDataData type for the notify URLnumber
notifyHeaderCustom header to include with notifyUrltext
agodaComPropertyCodeAgoda.com Hotel Idtext
airbnbHostAirbnb host IDtext
airbnbPropertyCodeAirbnb multipliertext
airbnbCurrencyAirbnb currencytext
airbnbInvoiceeAirbnb invoiceeIdtext
airbnbMultiplierAirbnb price multipliertext
bookingComPropertyCodeBooking.com Hotel Idtext
bookingComPriceImport text
bookingComRateType text
bookingComInvoiceeId text
bookingComMultiplierBooking.com price multipliertext
cTripPropertyCode text
cTripCurrency text
despegarComUsername text
despegarComPassword text
despegarComPropertyCode text
despegarComCurrency text
expediaComPropertyCodeExpedia.com Hotel Idtext
expediaComCurrencyExpedia.com Currencytext3 char currency code
icalExportTokenSaltical Export Token Salt Valuetext
icalExportDescriptionical Export Event DescriptiontextCan include template variables
icalImportOption']ical Import Optioninteger0=Cancellation and modification allowed, 1=Cancellation and Modification allowed and email notice sent, 2=Cancellation and Modification not allowed
odigeoPropertyCodeeDreams ODIGEO Hotel Idtext
vrboInvoiceeVRBO invoiceeIdtext
vrboMultiplierVRBO price multipliertext

Room Fields

FieldDescriptionData TypeNotes
nameRoom nametext
qtyQuantity of this room typeinteger
roomIdRoom Idinteger
roomSizeRoom sizeinteger
maxPeopleMaximum people for this room typeinteger
maxAdultMaximum adults for this room typeinteger0=use maxPeople value
maxChildrenMaximum children for this room typeinteger
minStayMinimum nights which must be stayedinteger
maxStayMaximum nights which can be stayedinteger
minPriceMinimum price for this room typedecimal
rackRateRack rate for this room typedecimal
cleaningFeeCleaning fee for this room typedecimal
securityDepositSecurity deposit for this room typedecimal
taxPercentTax percentage for this room typedecimal
taxPersonTax amount per person and night for this room typedecimal
unitAllocationPerGuestUnit allocation per guestinteger0=one unit per booking, 1=one unit per guest
unitNamesUnit Namestexteach unit name after a new line \n
unallocatedUnitNameUnallocated Unit Nametext
highlightColorControl Panel Highlight ColortextHTML 6 character color code
excludeReportsExclude room from reportsinteger0=no, 1=yes
overbookingProtectionOverbooking Protectioninteger0=room, 1=property
blockAfterCheckoutBlock Dates after Check-outinteger0 to 7 days
controlPriorityControl panel priorityinteger
dependentRoomId1Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId2Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId3Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId4Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId5Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId6Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId7Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId8Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId9Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId10Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId11Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomId12Dependent RoomintegerRoom Id of dependent room, 0=none
dependentRoomLogicDependent Room Logicinteger0=All rooms, 1=Any room, 2=Sum of all bookings
includeBookingsRoomId1Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId2Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId3Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId4Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId5Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId6Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId7Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId8Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId9Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId10Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId11Include bookings from RoomintegerRoom Id, 0=none
includeBookingsRoomId12Include bookings from RoomintegerRoom Id, 0=none
assignBookingsRoomId1Assign bookings to RoomintegerRoom Id, 0=this room
assignBookingsRoomId2Assign a copy booking to RoomintegerRoom Id, 0=none
assignBookingsRoomId3Assign a copy booking to RoomintegerRoom Id, 0=none
assignBookingsRoomId4Assign a copy booking to RoomintegerRoom Id, 0=none
agodaComEnableInventoryAgoda.com Enable Inventory Exportinteger0=not used, 1=enabled
agodaComEnablePriceAgoda.com Enable Price Exportinteger0=not used, 1=enabled
agodaComEnableBookingAgoda.com Enable Booking Importinteger0=not used, 1=enabled
agodaComRoomCodeAgoda.com Room Idtext
airbnbComEnableInventoryAirbnb.com Enable Inventory Exportinteger0=not used, 1=enabled
airbnbComEnableBookingAirbnb.com Enable Booking Importinteger0=not used, 1=enabled
airbnbComRoomCodeAirbnb.com Calendar URLtextThe url supplied by Airbnb to export their calendar
airbnbRoomCodeAirbnb.com Listing IDtext
bookingComEnableInventoryBooking.com Enable Inventory and Prices Exportinteger0=not used, 1=enabled
bookingComEnableBookingBooking.com Enable Booking Importinteger0=not used, 1=enabled
bookingComRoomCodeBooking.com Room Idtext
bookingComRateCodeBooking.com Rate Idtext
expediaComEnableInventoryExpedia.com Enable Inventory Exportinteger0=not used, 1=enabled
expediaComEnablePriceExpedia.com Enable Price Exportinteger0=not used, 1=enabled
expediaComEnableBookingExpedia.com Enable Booking Importinteger0=not used, 1=enabled
expediaComRoomCodeExpedia.com Room Idtext
expediaComRateCodeExpedia.com Rate Idtext
icalExportEnableTypeical Export Enable and Typeinteger0=Disable, 1=Export Unavailable Dates, 4=Export Bookings, 5=Export Bookings + Unavailable Dates
icalExportUrlical Export URLtextical available at this URL
icalImport1EnableTypeical Import 1 Enable and Typeinteger0=Disable, 1="End date is last night - Ignore duplicates, 2="End date is checkout - Ignore duplicates, 3=End date is last night, 4=End date is checkout, 5="End date is day after check out
icalImport1Urlical Import 1 URLtextURL to import ical from
icalImport2EnableTypeical Import 2 Enable and Typeinteger0=Disable, 1="End date is last night - Ignore duplicates, 2="End date is checkout - Ignore duplicates, 3=End date is last night, 4=End date is checkout, 5="End date is day after check out
icalImport2Urlical Import 2 URLtextURL to import ical from
icalImport3EnableTypeical Import 3 Enable and Typeinteger0=Disable, 1="End date is last night - Ignore duplicates, 2="End date is checkout - Ignore duplicates, 3=End date is last night, 4=End date is checkout, 5="End date is day after check out
icalImport3Urlical Import 3 URLtextURL to import ical from
odigeoEnableInventoryeDreams ODIGEO Rate Id Enable Inventory Exportinteger0=not used, 1=enabled
odigeoEnablePriceeDreams ODIGEO Rate Id Enable Price Exportinteger0=not used, 1=enabled
odigeoEnableBookingeDreams ODIGEO Rate Id Enable Booking Importinteger0=not used, 1=enabled
odigeoRoomCodeeDreams ODIGEO Rate Idtext
odigeoRateCodeeDreams ODIGEO Rate Idtext

Room Unit Fields

FieldDescriptionData TypeNotes
noteRoom Unit Notetext
unitIdRoom Unit Idinteger
unitNameRoom Unit Nametext
unitStatusIndexRoom Unit Status Indexinteger
unitStatusTextRoom Unit Status Texttext

Sample PHP code

<?php

/*
* The following sample uses PHP arrays to construct the JSON data and php-curl to post it to the API.
* This sample will get the property information. 
* Change the apiKey and propKey to values for your account to use and test.
*/

$authentication = array();
$authentication['apiKey'] = 'apiKeyAsSetInAccountSettings';
$authentication['propKey'] = 'propKeyAsSetForTheProperty';

$data = array();
$data['authentication'] = $authentication;
$json = json_encode($data);

$url = "http://soft.4twa.com/api/json/getProperty";

$ch=curl_init();
curl_setopt($ch, CURLOPT_POST, 1) ;
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
$result = curl_exec($ch);
curl_close ($ch);
echo $result;	

?>