Geolocation Service

The Geolocation Service provides an endpoint for retrieving the latitude and longitude of a given address.

Endpoints

Coordinates by Address

POST geolocation/coordinatesByAddress.json

This endpoint takes in an address, and returns the latitude and longitude associated with that address. If the address provided does not exactly match up with a real address (for example, it’s a section of street with no building on it) the endpoint will still return successfully with the exactMatch flag set to false. If the address cannot be found, the endpoint will return a failure response.

The following authentication methods are allowed for this endpoint:

JSON Parameters:
 
  • merchantId (Integer) – (required) Paytronix-assigned merchant ID to perform the operation in.
  • address (String) – (required) The street number and street name of the address. Example: 123 Main Street
  • city (String) – (required) The city of the address. Example: Boston
  • stateProvince (String) – (required) The two letter state or province code of the address. Full names are also supported. Example: MA or Massachusetts
  • postalCode (String) – (optional) The US ZIP code or Canadian Province Code of the address. Example: 02111
  • postalCode(optional) The two letter country code of the address. Full country names are also supported. Examples: US, USA, or United States of America
"result": "success"
JSON Parameters:
 
  • result (String) – (required) success
  • lat (BigDecimal) – (required) The latitude (in degrees) of the address. Example: 42.384620
  • lon (BigDecimal) – (required) The longitude (in degrees) of the address. Example: -71.205700
  • exactMatch (Boolean) – (required) Indicates whether the coordinates are an exact match to the address, or if they are an approximation. True for an exact match.
"result": "failure"
JSON Parameters:
 
  • result (String) – (required) failure or inputFailure
  • code (String) – (required) A static code unique for each type of error.
  • message (String) – (required) Further explanation of the error code, which is subject to change in different versions of the endpoint.