Integrate Justimmo API – for real estate brokerage service
Integration of the real estate brokerage aggregator Justimmo with WordPress. A plugin had to be created to import real estate objects into WordPress with all fields filled in, including the creation of categories and links between other objects in the same address. In addition, any changes to the broker’s site had to be applied to the site with updates to the objects already added when the import was run.
The plugin was written completely from scratch. Absolutely all information is synchronized, including all attached pictures without the need to re-download. Updating of objects is done using Cron on a timer, and there is also a possibility of a manual call.
Import objects and addresses
For the existing site, it was necessary to automate the process of adding objects from the brokerage site, thereby eliminating the need for manual addition. The taxonomy “Addresses” was used for objects and a new post type “All objects”, where all objects are grouped by the streets of the taxonomy.
The mapping of the fields was configured to match the data exactly on the Justimmo API. It was decided to move some values to a single text field instead of creating a dozen different fields.
Also, the documents linked to the object were automatically uploaded from the API to the WordPress gallery and were used on the object page to explore the information in detail.
The object page of the Justimmo real estate broker displays both objects and addresses at the same time. For their import different API addresses are used. Addresses are imported first, and then objects to correctly link real estate with taxonomies.
If an object is deleted on the broker site, it will also be deleted on the WordPress site the next time it is imported. When you manually run the import, you can track the status of adding objects, how many objects from the list have already been added and which ones have been changed.
Sending requests from the site to the API
A separate plugin has added integration of forms on object pages with Justimmo API, so that applications are sent directly to the brokerage site.
The usual form in the pop-up window was used to send requests for objects from the API. An invisible field with the object identifier was used to identify the real estate on the broker’s site.
The form has been created using Elementor and the interaction has been set up with a special hook to check sending from a specific form. Thus, applications for each property are synchronized both on the website and on the Justimmo broker aggregator API itself.
Results of development
Results of development
As a result, it was necessary to make two separate plugins for use on different websites of the company, which was successfully done. The import works fully automatically, and any changes made on the broker’s site will be automatically updated on the WordPress site. Submissions are made at the time the form is submitted. As the import plugin was being developed, Justimmo fine-tuned the API functionality to provide all the necessary information for the import, because initially not all the information was available.