This reference documents version 2 of the Placester RESTful API.

The code in this document requires an API key which you can obtain from the Placester plugin.

Basic Use

In order to add any photos to a listing, you must first upload them as a temp image using the temp image POST call. You will then be able to add the temp file name to the listing using this call or the Create listing call which will make the image permanent.

  PUT - http://api.placester.com/api/v2/listings/[listing_id]?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[.format] can be .xml or .json depending on the format you want the API to output.

Arguments

Arguments are specified on the URL usually after the API key and are separated by an &. You can use the following patterns for different types of arguments:

Format URL Argument
String, Integer, or Float key=StringValue
Array key[]=StringValue1&key[]=StringValue2&key[]=StringValue3…
Hash metadata[key]=2&metadata[key]=4

 

Argument Description Example
listing_id Listing ID to be updated
is_enabled=boolean Whether the listing is enabled
metadata=hash Key/value to set for metadata, if you are adding a new attribute you also need to specify the custom_attribs for it.
location[address]=String Address (Required)
location[postal]=String Postal/Zip Code (Required)
location[region]=String City (Required)
location[locality]=String State (Required)
location[neighborhood]=String Neighborhood
location[country]=String Country, 2-digit ISO 3166-1 Country Code (Defaults to US)
rel_people=Hash Related people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.
images[][filename]=String Temp filenames of the images uploaded using the temp image call.
rel_people=Hash Related people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.
rel_people=Hash Related people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.

 

Returns

Key Description
id The listing ID that was updated.

 

Sample Output

{
    "id": "4e723c936794dcc8a600001a"
}