API Endpoints
merge
The merge function enables the merging of locations and travels. Each travel or location object returned from the API has a flag called "canmerge".
- canmerge = 1 means entry can be merged into its surrounding entries.
- canmerge = 0 means entry cannot be merged into its surrounding entries.
| Method |
Description |
| /TRAVELID/merge |
merge the specified travel to its surrounding entries |
| /LOCATIONID/merge |
merge the specified location to its surrounding entries |
Example1: Success case, when canmerge=1 for location l_41549
PUT http://api.hipgeo.com/l_41549/merge?access_token=TOKENVALUE
Returns:
{
"id":"l_41549",
"mergeid":"t_41545",
"result":"success"
}
| Error Code |
Possible Errors |
| 400 |
- Requires an ID
- Object cannot be merge
- Object does not support merge
|
| 401 |
- Authentication failed
- Token expired
- Insufficient Permissions
|
| 404 |
- ID not found
|
Example2: Error case, when canmerge=0 for travel t_41545
GET http://api.hipgeo.com/t_41545/merge?access_token=TOKENVALUE
Returns:
{
"request":"http:\/\/hg\/graph.php\/t_41545\/merge?access_token=fLpol3Mqz-u0sy6zaxtihh",
"result":"error",
"details":"Object cannot be merged"
}
| Error Code |
Possible Errors |
| 400 |
- Requires an ID
- Object cannot be merge
- Object does not support merge
|
| 401 |
- Authentication failed
- Token expired
- Insufficient Permissions
|
| 404 |
- ID not found
|