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
  1. Requires an ID
  2. Object cannot be merge
  3. Object does not support merge
401
  1. Authentication failed
  2. Token expired
  3. Insufficient Permissions
404
  1. 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
  1. Requires an ID
  2. Object cannot be merge
  3. Object does not support merge
401
  1. Authentication failed
  2. Token expired
  3. Insufficient Permissions
404
  1. ID not found
HipGeo Icon