Back in 2016 we released initial support for Property Hive working alongside the WordPress REST API and the ability to obtain properties. With the latest version of Property Hive version 1.5.51 we are pleased to announce that you can now also create and update properties on your site from a third party application.
Some scenarios where this might be used include:
Certainly not. There’s a layer of authentication built into WordPress that needs to passed in order for a third party to submit changes via the REST API.
Below you can see a very simple example of a POST request that updates an existing property:
POST https://yoursite.com/wp-json/wp/v2/property/243328 HTTP/1.1 Content-Type: application/json Authorization: Basic {application-password} {"title":"High Street, Birmingham","status":"publish","on_market":"yes","department":"residential-sales","address_country":"GB","price":123000,"features":["poolside","fireplace"],"virtual_tours":[{"url":"https:\/\/youtube.com","label":"VT1"},{"url":"https:\/\/vimeo.com","label":"VT2"}],"images":[{"url":"https:\/\/imageurl.com\/image1.jpg"},{"url":"https:\/\/imageurl.com\/image2.jpg"}]}
Want to know more? You can read more about managing properties using the WordPress REST API in our docs.