<back to API Operations

/em/location/proximity

The following routes are available for this service:
GET/em/location/proximityProximity search for existing Locations.
Parameters:
NameParameterData TypeRequiredDescription
XqueryYesLongitude / X (WGS 84)
YqueryYesLatitude / Y (WGS 84)
RangequeryNoResult in range (Unit meter)
FindCriteriaqueryNoQuery the data using this find criteria(s). If NULL/empty implemented as FindAll
SortOrderqueryYessortOrder: comma separated list of tupels of attribute path and sort direction (ASC/DESC), path and sort direction are separated by a pipe (|), e.g.: name|DESC,locationId|ASC
ItemsPerPagequeryYesMax results per page (Max. 50)
StartIndexqueryYesSkip the first n result. Index starts with 0.
TokenqueryYesThe security token
SourcequerystringNoName of the event provider: Examples are ptvemapp, ptvemportal, jmeter, any customer specific app

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON Request

The following are sample HTTP requests. The placeholders shown need to be replaced with actual values.

GET /em/location/proximity HTTP/1.1 
Host: eta.cloud.ptvgroup.com 
Content-Type: application/json
Content-Length: length

{
  "x": 0,
  "y": 0,
  "range": 0,
  "findCriteria": [
    "String"
  ],
  "sortOrder": [
    "String"
  ],
  "itemsPerPage": 0,
  "startIndex": 0,
  "token": "String",
  "source": "String"
}
                    

HTTP + JSON Response

The following are sample HTTP responses. The placeholders shown need to be replaced with actual values.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{
  "responseStatus": {
    "errorCode": "String",
    "message": "String",
    "stackTrace": "String",
    "errors": [
      {
        "errorCode": "String",
        "fieldName": "String",
        "message": "String",
        "meta": {
          "String": "String"
        }
      }
    ],
    "meta": {
      "String": "String"
    }
  },
  "proximityResults": [
    {
      "location": {
        "locationId": "String",
        "revision": 0,
        "arrivedRange": 0,
        "searchable": false,
        "name": "String",
        "coordinate": {
          "locationX": 0,
          "locationY": 0
        },
        "address": {
          "label": "String",
          "country": "String",
          "state": "String",
          "province": "String",
          "postCode": "String",
          "city": "String",
          "city2": "String",
          "street": "String",
          "houseNumber": "String"
        },
        "customDataFieldsForStop": [
          {
            "name": "String",
            "format": "String"
          }
        ],
        "customData": {}
      },
      "distance": 0
    }
  ],
  "currentItemCount": 0,
  "itemsPerPage": 0,
  "startIndex": 0,
  "totalItems": 0
}