• Services
  • What we do & Sell own
  • Cases
  • We are

Helpdesk

1. Functionality

1.1. Function

The module helps to manage property listings.

Four types of operations are available:

  • Properties for sale;
  • Properties for rent;
  • Properties for buy;
  • Properties for lease.

1.2. Admin mode

1.3. User mode

1.4. Related modules

1.5. Functionality related to other modules

1.6. Specific functionality

No specific functionality.

2. Implementation

2.1. API

API controller (Api_Listings) contains the following methods:

public function get($listing_id);

Gets listing data with the help of API. Returns an array of formatted data about a listing. The data contains details about listing provider, booking periods (for rental listings). Dates are available in text format.

Parameters:
$listing_id integer — listing id

public function get_photos($listing_id);

Gets listings photos. Returns an array of data about listing photos including paths to images, thumbs and comments. Information in active, inactive and default photos is available.

Parameters:
$listing_id integer — listing id

public function get_virtual_tours($listing_id);

Gets virtual tours of site listings. Returns an array of data about virtual tours and includes information about active/inactive tours.

Parameters:
$listing_id integer — listing id

public function set($listing_id);

Saves listing details. The validated data is recorded to the data source. If $listing_id parameter is equal to 0, a new listing is created, in other way, the data of existing listing is updated. If validation is successful, there is an appropriate notification in ‘messages’ field. If validation fails, there is an error message in ‘error’ field. The method is available for listing provider.

Parameters:
$listing_id integer — listing id

POST parameters:
$data array — array of data listing, possible keys are listing fields
$id_country integer — country id in site database
$id_region integer — region id in site database
$id_city integer — city id in site database

public function create();

Creates a new listing. The listing is created on the basis of the passed data. In case of successful validation, ‘message’ field contains an appropriate notification. If validation fails, there is an error message in ‘error’ field. The method is available for listing provider.

POST parameters:
$data array — array of data about listing, possible keys are listing fields
$id_country integer — country id in site database
$id_region integer — region id in site database
$id_city integer — city id in site database

public function delete($listing_id);

Deletes listing data from the source of data. Completely deletes all the data including listing id. The method is available for listing provider.

Parameters:
$listing_id integer — listing id

public function photo_upload($listing_id, $photo_id=0);

Uploads photos into a listing. Uploads a new photo into listing with the specified id. If $photo_id parameter is equal to 0, the photo is deleted from the site. The method is available for listing provider.

Parameters:
$listing_id integer — listing id
$photo_id integer — photo id

public function photo_delete($listing_id, $photo_id);

Deletes photos from the site. Photo with specified id is deleted from the site. If the specified photo does not belong to the specified listing, an error message is returned. In case of a successful action, ‘message’ field contains an appropriate message.

Parameters:
$listing_id integer — listing id
$photo_id integer — photo id

public function panorama_upload($listing_id, $panorama_id);

Uploads virtual tours into listing. Uploads a new virtual tour into a listing with specified id. If $panorama_id parameter is equal to 0, the tour is deleted. The method is available for listing provider.

Parameters:
$listing_id integer — listing id
$panorama_id integer — virtual tour id

public function panorama_delete($listing_id, $panorama_id);

Deletes virtual tour from the site. Virtual tour with the specified id is deleted from the site. If the tour does not belong to listing with the specified id, an error message is returned. In case of a successful action, ‘message’ field contains the appropriate notification.

Parameters:
$listing_id integer — listing id
$panorama_id integer — virtual tour id

public function file_upload($listing_id);

Uploads a file into listing. Uploads a new file into listing with specified id. A listing may contain one file only. The method is available for listing provider.

Parameters:
$listing_id integer — listing id

public function file_delete($listing_id);

Deletes file from listing. Uploaded file is deleted from listing with the specified id. If the file is deleted successfully, there is an appropriate message in ‘message’ field. If something went wrong, there is an error message.

Parameters:
$listing_id integer — listing id

public function video_upload($listing_id);

Uploads video into listing. A new video is uploaded into a listing with the specified id. A listing may contain only one video file. The method is available for listing provider.

Parameters:
$listing_id integer — listing id

public function video_delete($listing_id);

Deletes video from listing. Video is deleted from listing with the specified id. In case of a successful action, there is an appropriate message in ‘message’ field.

Parameters:
$listing_id integer — listing id

public function my($operation_type=sale, $page=1, $order=date_modified, $order_direction=DESC);

Gets a paged list of user listings. Formatted data of current user listings is returned.

Parameters:
$operation_type string — type of operation (for sale, for rent, for buy, for lease)
$page integer — search results page
$order string — order value
$order_direction string — order direction

public function search($page=1, $order=default, $order_direction=DESC);

Gets listings that match search criteria. Formatted data of listings that match search criteria is returned. Only active listings are used in search.

Parameters:
$page integer — search results page
$order string — order value
$order_direction string — order direction

POST parameters:
$criteria array — search criteria. Possible key of the array: listing fields in the source of data, category (category value in the form of _), city, region, country, keyword etc.

public function saved($page=1, $order=date_created, $order_direction=DESC);

Gets a paged list of saved listings. Formatted data of listings saved by current user is returned in the response. Only active listings are returned.

Parameters:
$page integer — search results page
$order strign — order value
$order_direction string — order direction

public function save($listing_id);

Adds listing into the list of saved listings. Listing with specified id is added into the list of current user.

Parameters:
$listing_id ineger — listing id

public function delete_saved($listing_id);

Deletes listing from the list of saved listings. Listing with the specified id is removed from the list of current user.

Parameters:
$listing_id integer — listing id

public function get_booking_price($listing_id);

Gets the total of the booking period. The response contains the total price of booking period with specific id.

Parameters:
$listing_id integer — listing id

POST parameters:
$date_start string — start date of the booking period
$date_end string – end date of the booking period
$guests integer — number of guests

public function orders($status=approve, $order=created, $order_direction=DESC, $page=1);

Gets a list of booking periods. The response contains a formatted data of booking periods of the current user.

Parameters:
$status string — booking request status (approved, declined, awaiting approval)
$order string — order value
$order_direction string — order direction
$page integer — page

POST parameters:
$data array — filters

public function requests();

Gets a list of user booking requests. The response includes formatted data of booking requests of the current user.

POST parameters:
$data array — filters
$order string — order value
$order_direction string — order direction
$page integer — page

public function order_delete($order_id);

Deletes received booking request. Booking request is deleted from listing provided by the current user

Parameters:
$order_id integer — booking request id

public function request_delete($request_id);

Deletes user booking request. Booking request of the current user is deleted from the list of booking requests.

Parameters:
$request_id integer — booking request id

public function order_approve($order_id);

Approves booking request. Booking request of a current user with the specific id is approved by listing provider.

Parameters:
$order_id integer — request id

public function order_decline($order_id);

Declines booking request. Booking request of a current user with the specific id is declined by listing provider.

Parameters:
$order_id integer — request id

public function save_order($listing_id);

Saves booking request. A new booking request with the specific id is saved. If the validation is successful, ‘message’ field contains an appropriate message. Otherwise, there is an error message.

Parameters:
$listing_id integer — идентификатор объявления

POST parameters:
$period array — details of the booking period

public function save_period($listing_id, $period_id=null);

Saves booking period price. A new price of booking period is saved in a listing with specific id. If $period_id parameter is equal to null, data of the specified period is changed. In case of successful validation, ‘message’ field contains an appropriate notification. If there is an error, ‘error’ field contains an error message.

Parameters:
$listing_id integer — listing id
$period_id integer — booked period id

POST parameters:
$period array — booked period details

public function period_delete($period_id);

Deletes price of a booked period from the listing.

Parameters:
$period_id integer — booked period id

public function get_search_data($operation_type);

Gets search data. Returns possible values of property types and countries for the selected type of operation.

Parameters:
$operation_type string — type of operation

public function user($user_id);

Gets user listings. The response contains formatted data of listings provided by a user with the specific id.

Parameters:
$user_id integer – user id

POST parameters:
$type string — type of operation
$order string — order value
$order_direction string — order direction
$page ineteger — search results page

public function share_by_mail($listing_id);

Sends link to listing by email. Link to a specific listing is sent by email. If the validation is unsuccessful, ‘error’ fields contains an error message.

Parameters:
$listing_id integer — listing id

POST parameters:
$email string — recipient email
$username string — recipient name
$message string — message

public function order($listing_id, $order_id=null);

Send booking request. Send booking request for a specified listing. If $order_id parameter is specified, parameters of the previous booking request are updated. In case of a successful validation, the listing provider receives a notification about new booking request.

Parameters:
$listing_id integer — listing id
$order_id integer — booking request id

POST variables:
$period array — booking request details