Geolocation Search Template
List all geolocation search templates or return search results based on a geolocation search template set up in MYOB EXO Business.
| URL | Supports |
|---|---|
{URI}/geolocationtemplate | |
{URI}/geolocationtemplate/{id}{parameters} | |
| {URI} is exo.api.myob.com when connecting to the cloud or the address of the machine hosting the API when connecting on premise. | |
Calling the endpoint by itself returns a list of location-based search templates (search templates whose type is "G").
To use a geolocation search template to return search results, call the endpoint with the ID number of the search template you want to use, for example:
http://exo.api.myob.com/geolocationtemplate/6
Depending on the template being called, the call may need to pass parameters to filter the search results, for example:
http://exo.api.myob.com/geolocationtemplate/6?salesno=8¤tlat=-36.8694985¤tlong=174.7641415&radius=10
This will return search results using the search template with the ID number 6 and passing in staff member number 8 along with location details and a search radius.
Attribute Details
| Attribute | Type | Notes |
|---|---|---|
name | string,null | |
active | boolean | |
type | string,null | |
parameters | array,null | |
rel | string,null | |
title | string,null | |
id | integer | Required on PUT |
href | string,null |
Example json GET response
Example
[
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"paramname": "SALESNO",
"paramtype": "INTEGER"
},
{
"name": "All Active Companies",
"active": true,
"type": "G",
"id": 11,
"href": "{URI}/searchtemplate/11"
},
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"name": "Customers Active last 30 days",
"active": true,
"type": "G",
"id": 8,
"href": "{URI}/searchtemplate/8"
},
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"name": "Customers Owe Me Money",
"active": true,
"type": "G",
"id": 6,
"href": "{URI}/searchtemplate/6"
},
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"name": "Customers with Current Orders",
"active": true,
"type": "G",
"id": 7,
"href": "{URI}/searchtemplate/7"
},
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"paramname": "SALESNO",
"paramtype": "INTEGER"
},
{
"name": "My Active Companies",
"active": true,
"type": "G",
"id": 10,
"href": "{URI}/searchtemplate/10"
},
{
"paramname": "CURRENTLAT",
"paramtype": "FLOAT"
},
{
"paramname": "CURRENTLONG",
"paramtype": "FLOAT"
},
{
"paramname": "RADIUS",
"paramtype": "FLOAT"
},
{
"name": "Prospects Active Last 30 days",
"active": true,
"type": "G",
"id": 9,
"href": "{URI}/searchtemplate/9"
}
]{URI} is defined as: http://exo.api.myob.com/