API Endpoints
place
The place endpoint will allow new places to be created for a specified location. The location
object must already exist, created by the server or manually using the location endpoint. The auth
user becomes the owner/author of the place created. Privacy determines who can view the place
created. Privacy values are:
- 0 = public
- 3 = private
- 7 = friends
| Method |
Description |
| /LOCATIONID/place |
create a place for an existing locationId. See Example1 for JSON data structure. |
Example1: Create a Place for Existing LocationID
POST http://api.hipgeo.com/l_29930/place?access_token=TOKENVALUE
Data:
{
"name":"St. Denis Church",
"description":"Catholic Church",
"phone":"1-909-861-7106",
"web":"http://stdenis91765.parishworld.net/con_ParishInfo.cfm",
"privacy":0,
"address":{
"street":"Diamond Bar Blvd",
"city":"Diamond Bar",
"state":"CA",
"postcode":"91765",
"country":"USA"
}
}
Returns:
{
"id":"p_18829",
"shareable":1,
"result":"success"
}
| Error Code |
Possible Errors |
| 400 |
- Unable to parse data
- Requires an ID
- Target is not a valid location
|
| 401 |
- Authentication failed
- Token expired
- Insufficient Permissions
|
| 404 |
- Bad ID
|
PUT (or POST)
Most of the attributes of a place object can be modified.
| Method |
Description |
| /PLACEID |
update information for a place. See Example2 for JSON data structure |
Example2: Modify Place attributes
PUT api.hipgeo.com/p_77?access_token=TOKENVALUE
Data:
{ "name":"Donald's House",
"privacy":7,
"coord":{
"lat":33.775998,
"lon":-117.745290
"alt":0,
"radius":0
},
"address":{
"street":"1122 Harbor Blvd",
"city":"Fullerton",
"state":"CA",
"zip":"92835",
"country":"US"
},
"description":"This is Donald's House. Represent!"
}
Returns:
{
"id":"p_77",
"result":"success"
}
| Error Code |
Possible Errors |
| 400 |
- Unable to parse data
|
| 401 |
- Authentication failed
- Token expired
- Insufficient permissions
|
| 403 |
- Insufficient Permissions
|
| 404 |
- Bad ID
|