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:

FormatURL Argument
String, Integer, or Floatkey=StringValue
Arraykey[]=StringValue1&key[]=StringValue2&key[]=StringValue3…
Hashmetadata[key]=2&metadata[key]=4

 

ArgumentDescriptionExample
listing_idListing ID to be updated
is_enabled=booleanWhether the listing is enabled
metadata=hashKey/value to set for metadata, if you are adding a new attribute you also need to specify the custom_attribs for it.
location[address]=StringAddress (Required)
location[postal]=StringPostal/Zip Code (Required)
location[region]=StringCity (Required)
location[locality]=StringState (Required)
location[neighborhood]=StringNeighborhood
location[country]=StringCountry, 2-digit ISO 3166-1 Country Code (Defaults to US)
rel_people=HashRelated people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.
images[][filename]=StringTemp filenames of the images uploaded using the temp image call.
rel_people=HashRelated people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.
rel_people=HashRelated people to attach to the deal, keys should be a person_id, and the value their relationship to the deal.

 

Returns

KeyDescription
idThe listing ID that was updated.

 

Sample Output

{
    "id": "4e723c936794dcc8a600001a"
}