GeoPoints API Documentation

Welcome to the GeoPoints API documentation. Here you'll find comprehensive guides and documentation to help you start working with GeoPoints API as quickly as possible.

Auto Complete

Address auto-completion API

GET Returns JSON Requires API Key

This method fetches address suggestions from the Geo Point API. The API key check is performed and makes a request to Geo Point with a valid API key. It is cleaned up by making some edits on the returned results and returns the finally processed suggestions.

Method Signature

GetAddressSuggestions(string apiKey, string query)

Parameters

Parameter Type Description Required
apiKey string Your AUTO COMPLETE API key Required
query string The address query to be completed Required

Response Examples

Successful Response

[
    "ZambiaPolice State Lodge",
    "State House",
    "Bolivia",
    "State Lodges School",
    "State Life Lahore ProvinceofPunjab",
    "State Street",
    "Statement"
]

Error Responses

API Key Error

"Api key and type validation failed; Type:AUTOCOMPLETE Apikey: [apiKey]"

404 Error

"404: [error message]"

Example Usage

API Endpoint

https://api.geopoints.io/GetAddressSuggestions?query={YourAddress}&apiKey={YourApiKey}

Parameter Details

{YourAddress}
The address you want to search for
{YourApiKey}
Your GeoPoints.io API key

Try It Out

Reverse Geocoding

Geographic coordinate processing

GET Returns JSON Requires API Key

This method performs reverse geocoding by searching for addresses using provided coordinates (latitude and longitude). It returns a detailed list of decoded addresses with comprehensive location information.

Method Signature

CoordinateResultReturnedAddress(string latitude, string longitude, string GeoApikey)

Parameters

Parameter Type Description Required
latitude string Latitude coordinate value Required
longitude string Longitude coordinate value Required
GeoApikey string Your GEO API key Required

Response Structure

Success Response Fields

  • country
  • city
  • district
  • locality
  • street
  • formattedAddress

Error Response Types

  • API Key Validation Error
  • Query Limit Error
  • Point Not Found Error

Example Usage

API Endpoint

https://api.geopoints.io/CoordinateResultReturnedAddress?latitude={latitude}&longitude={longitude}&GeoApikey={GeoApikey}

Parameter Details

{latitude}
Latitude coordinate of the location
{longitude}
Longitude coordinate of the location
{GeoApikey}
Your GeoPoints.io API key

Try It Out

Territory Planner

Map dimensioning service

Note: There is a limit of 100 queries in the free version.
GET Returns JSON Polygon Check

This method verifies whether a specific point (defined by x, y coordinates) falls within user-defined map boundaries. If the point is located within the boundaries, the method returns the properties of the corresponding drawing.

Method Signature

CheckPointInPolygons(double x, double y, string MapApiKey)

Parameters

Parameter Type Description Required
x double The x (longitude) coordinate of the point Required
y double The y (latitude) coordinate of the point Required
MapApiKey string API key for MAP API access Required

Response Structure

Success Response

Returns the properties of the drawing when point is found within boundaries

{
    "properties": {
        "name": "Example Area",
        "type": "polygon",
        "coordinates": [
            [x1, y1],
            [x2, y2],
            ...
        ]
    }
}

Error Responses

API Key Error

"Api key and type validation failed; Type:MAP Apikey: [apiKey]"

404 Error

"404: [error message]"

Free Version Query Limit Error

"The query limit has been exceeded in the free version. Please upgrade your version"

Error in Paying an Invoice

"You have an unpaid invoice. You can proceed with your transactions after making the payment"

Point Not Found Error

"The point is not inside any polygon."

Example Usage

API Endpoint

https://api.geopoints.io/CheckPointInPolygons?x={x}&y={y}&MapApiKey={MapApiKey}

Parameter Details

{x}
Longitude coordinate value
{y}
Latitude coordinate value
{MapApiKey}
Your MAP API key

Try It Out 100 queries/day limit

Valid range: -180 to 180

Valid range: -90 to 90

Geocoding

Address aggregation service

Note: There is a limit of 100 queries in the free version.
GET Returns JSON Requires API Key

This method, using the given address and province information, obtains address information from the Geo Point address search service for a specific geographical location and deconstructs and returns this address information.

MergeAddressResultsAsync(string addressString, string? Province, string GeoApikey)

Request Parameters

Parameter Type Description Required
addressString string The address to be queried for geocoding Required
Province string? Provincial or regional information Optional
GeoApikey string API key for Geo API Required

Response Structure

Success Response

{
    "country": "United States",
    "city": "New York",
    "district": "Manhattan",
    "locality": "Downtown",
    "street": "Broadway",
    "formattedAddress": "Broadway, Manhattan, New York, NY, USA",
    "houseNumber": "123",
    "type": "street_address",
    "latitude": 40.7128,
    "longitude": -74.0060
}

country: Country location

city: City location

district: District location

locality: Neighborhood/region

street: Street location

formattedAddress: Full formatted address

houseNumber: Building number

type: Address type

latitude: Address latitude

longitude: Address longitude

Error Responses

API Key Validation Error

"Api key and type validation failed; Type:GEO Apikey: [GeoApikey]"

Query Limit Exceeded

"The query limit has been exceeded in the free version. Please upgrade your version"

Unpaid Invoice Error

"You have an unpaid invoice. You can proceed with your transactions after making the payment"

404 Error

"404: [error message]"

Example Usage

API Endpoint

https://api.geopoints.io/MergeAddressResults?addressString={addressString}&Province={Province}&GeoApikey={GeoApikey}

Parameter Details

{addressString}
The address you want to geocode
{Province}
Optional province information
{GeoApikey}
Your GeoPoints.io API key

Try It Out 100 queries/day limit

6. Routing

GeoPoints.io Routing API provides optimized route calculations between specified coordinates with priority point support.

Route Optimization Priority Points Distance Calculation

CalculateOptimalRoute

CalculateOptimalRoute(string RoutApiKey, double StartLat, double startLng, double? EndLat, double? endLng, string CoordinatesList, string? Mode, string? Avoid)

This method calculates the best route between the specified starting and destination points. The route is calculated to determine the shortest and most efficient way from the starting point to the destination. All coordinates are taken into account according to the given order, and the route is optimized to ensure the shortest distance and the lowest transit time between these coordinates.

The start and end coordinates are transmitted to the GeoPoints.io API according to the user's request, and the distance and time data received from the API are processed. Routes are rearranged, and the total travel distance and time are minimized. After determining the most optimal route, the method returns this route as a list of coordinates, respectively. This list indicates the most effective route sequence to the user, potentially saving time and fuel.

Required Parameters

RoutApiKey: Your routing API key
StartLat: Starting point latitude
startLng: Starting point longitude
CoordinatesList: Coordinate list, separated by "~"

Optional Parameters

EndLat: Destination latitude
endLng: Destination longitude
Mode: Mode of transportation
Avoid: Areas to avoid

Returning Class

This class defines the return values according to the status of the operation results (successful or incorrect).

Successful Results: HTTP Status Code: 200 OK

{
"Coordinates": "40.7128,-74.0060~38.8951,-77.0369~34.0522,-118.2437",
"routeId": "XYZ789ABC"
}

Coordinates: Optimized routing coordinates, sorted from start to finish in string format separated by "~".

routeId: Unique identifier for the generated route.

Example Usage

https://api.geopoints.io/CalculateOptimalRoute?RoutApiKey=YOUR_API_KEY&startLat=START_LAT&startLng=START_LNG&endLat=END_LAT&endLng=END_LNG&coordinatesList=COORDINATE_LIST&mode=MODE&Avoid=AVOID

Available Transportation Modes

Car

Standard route calculation for cars

Truck

Considers truck access and physical limitations

Pedestrian

Optimized for walking routes

PriorityCalculateOptimalRoute

PriorityCalculateOptimalRoute(string RoutApiKey, double StartLat, double startLng, double? EndLat, double? endLng, string CoordinatesList, string PriorityCoordinatesList, string? Mode, string? Avoid)

This method performs route optimization between the specified start and end coordinates. The algorithm calculates the shortest and most efficient route based on priority coordinates. After accessing the priority coordinates, the algorithm performs global route optimization, taking into account other coordinates. This guarantees that, with complex calculation methods, the priority coordinates specified by the user will be visited first, then the other coordinates will be visited with the most efficient sorting.

The start and end coordinates are transmitted to the GeoPoints.io API, which calculates the distance between the coordinates and the estimated transportation time. The distance and time data returned from the API are processed in the route optimization algorithm. This allows dynamic rearrangement of routes and minimization of the total travel distance and duration.

When the optimal route is determined, the method returns this route in the format of a list of coordinates. This allows the user to save time and energy by determining the most effective route order. This method offers the most accurate and optimized route to users with advanced algorithm structures and data processing techniques. Moreover, thanks to robust error control mechanisms and data optimization strategies, the results are presented with high accuracy and reliability.

Required Parameters

RoutApiKey: Your routing API key
StartLat: Starting point latitude
startLng: Starting point longitude
CoordinatesList: Normal coordinate list, separated by "~"
PriorityCoordinatesList: Priority coordinate list, separated by "~"

Optional Parameters

EndLat: Destination latitude
endLng: Destination longitude
Mode: Mode of transportation
Avoid: Areas to avoid

Returning Class

This class defines the return values according to the status of the operation results (successful or incorrect).

Successful Results: HTTP Status Code: 200 OK

{
    "Coordinates": "40.7128,-74.0060~38.8951,-77.0369~37.7749,-122.4194~32.7767,-96.7970~34.0522,-118.2437",
    "routeId": "ABC123XYZ"
}

Coordinates: Optimized routing coordinates, sorted from start to finish in string format separated by "~".

routeId: Represents an ID that is automatically generated for each route and uniquely identifies the transaction. This makes it easier for users to store routes in databases, perform data integration, and then call up route information via this unique ID.

Example Usage

https://api.geopoints.io/PriorityCalculateOptimalRoute?RoutApiKey=YOUR_API_KEY&startLat=START_LAT&startLng=START_LNG&endLat=END_LAT&endLng=END_LNG&CoordinatesList=COORDINATE_LIST&PriorityCoordinatesList=PRIORITY_COORDINATE_LIST&Mode=MODE&Avoid=AVOID

PriorityCalculateOptimalRouteAndTime

PriorityCalculateOptimalRouteAndTime(string RoutApiKey, double StartLat, double startLng, double? EndLat, double? endLng, string CoordinatesList, string PriorityCoordinatesList, string? Mode, string? Avoid)

This method performs route optimization between the specified start and end coordinates and also provides the travel time between the coordinates. The algorithm calculates the shortest and most efficient route based on priority coordinates. After accessing the priority coordinates, the algorithm performs global route optimization, taking into account other coordinates. This guarantees that, with complex calculation methods, the priority coordinates specified by the user will be visited first, followed by other coordinates in the most efficient order. Additionally, this method provides information on both the traffic-congested travel time and the traffic-free travel time between the points once the route is formed, allowing for a comprehensive evaluation of travel conditions.

Required Parameters

RoutApiKey: Your routing API key
StartLat: Starting point latitude
startLng: Starting point longitude
CoordinatesList: Normal coordinate list, separated by "~"
PriorityCoordinatesList: Priority coordinate list, separated by "~"

Optional Parameters

EndLat: Destination latitude
endLng: Destination longitude
Mode: Mode of transportation
Avoid: Areas to avoid

Returning Class

This class defines the return values according to the status of the operation results (successful or incorrect).

Successful Results: HTTP Status Code: 200 OK

{
    "Coordinates": "40.7128,-74.0060~38.8951,-77.0369|25,35~37.7749,-122.4194|40,50",
    "routeId": "DEF456UVW"
}

Coordinates: Based on the given priority points, optimized routing coordinates, sorted from start to finish, are separated by the "~" symbol. After the "|" symbol, the traffic-free travel time and the traffic-congested travel time to the next point are provided, separated by a comma.

routeId: Unique identifier for the generated route.

Example Usage

https://api.geopoints.io/PriorityCalculateOptimalRouteAndTime?RoutApiKey=YOUR_API_KEY&startLat=START_LAT&startLng=START_LNG&endLat=END_LAT&endLng=END_LNG&CoordinatesList=COORDINATE_LIST&PriorityCoordinatesList=PRIORITY_COORDINATE_LIST&Mode=MODE&Avoid=AVOID

CalculateOptimalRouteAndTime

CalculateOptimalRouteAndTime(string RoutApiKey, double StartLat, double startLng, double? EndLat, double? endLng, string CoordinatesList, string? Mode, string? Avoid)

This method calculates the best route between the specified starting and destination points. The route is calculated to determine the shortest and most efficient way from the starting point to the destination. All coordinates are taken into account according to the given order, and the route is optimized to ensure the shortest distance and the lowest transit time between these coordinates. Additionally, this method provides information on both the traffic-congested travel time and the traffic-free travel time between the points once the route is formed, allowing for a comprehensive evaluation of travel conditions.

Required Parameters

RoutApiKey: Your routing API key
StartLat: Starting point latitude
startLng: Starting point longitude
CoordinatesList: Coordinate list, separated by "~"

Optional Parameters

EndLat: Destination latitude
endLng: Destination longitude
Mode: Mode of transportation
Avoid: Areas to avoid

Returning Class

This class defines the return values according to the status of the operation results (successful or incorrect).

Successful Results: HTTP Status Code: 200 OK

{
    "Coordinates": "40.7128,-74.0060~38.8951,-77.0369|30,40~34.0522,-118.2437|50,60",
    "routeId": "GHI789JKL"
}

Coordinates: Optimized routing coordinates, sorted from start to finish, are separated by the "~" symbol. After the "|" symbol, the traffic-free travel time and the traffic-congested travel time to the next point are provided, separated by a comma.

routeId: Unique identifier for the generated route.

Example Usage

https://api.geopoints.io/CalculateOptimalRouteAndTime?RoutApiKey=YOUR_API_KEY&startLat=START_LAT&startLng=START_LNG&endLat=END_LAT&endLng=END_LNG&coordinatesList=COORDINATE_LIST&mode=MODE&Avoid=AVOID

GetRoutingCoordinates

GetRoutingCoordinates(string RouteID)

This method, using the RouteID provided as a parameter, returns the coordinates and route information of a previously created routing operation by the user.

Required Parameter

RouteID: Previously created route ID

Returning Class

{
    "Coordinates": "34.052235,-118.243683~36.169941,-115.139832~34.052235,-118.243683"
}

Erroneous Results

Code: 400 Explanation: "Route ID not found"

Code: 404 Explanation: "404: [error message]"

Example Usage

https://api.geopoints.io/GetRoutingCoordinates?RouteID=YOUR_ROUTE_ID

Optional Parameters

Optional parameters apply to the methods PriorityCalculateOptimalRoute, CalculateOptimalRoute, PriorityCalculateOptimalRouteAndTime, and CalculateOptimalRouteAndTime. Their details are provided below.

Parameters

  • string RoutApiKey: Routing API key provided by GeoPoints.io.
  • double StartLat: The latitude coordinate of the starting point.
  • double startLng: The longitude coordinate of the starting point.
  • double? EndLat: The latitude coordinate of the destination (optional).
  • double? endLng: The longitude coordinate of the destination (optional).
  • string CoordinatesList: The coordinate list, separated by "~".
  • string PriorityCoordinatesList: The priority coordinate list, separated by "~".
  • string? Mode: Mode of transportation (optional).
  • string? Avoid: Areas to avoid (optional).

Avoid Parameter Details

The Avoid parameter allows the calculation of distances that meet certain restrictions. Restrictions are specified by using the Avoid parameter and adding an argument to this parameter that specifies the restriction. The supported restrictions are as follows:

  • tolls: The calculated route should avoid toll roads/bridges.
  • highways: The calculated route should avoid highways.
  • ferries: The calculated route should avoid ferries.
  • indoor: The calculated route should avoid indoor stairs for walking and public transport directions.

Note: Adding restrictions does not exclude routes that contain restricted features; it directs the results to more appropriate routes.

Mode Parameter Details

The Mode parameter specifies which mode of transport to use for the calculation of distances and directions. By default, the mode used is driving. The supported travel modes are:

  • driving (default): Specifies standard driving instructions or distance using the road network.
  • walking: Asks for walking directions or distance through pedestrian paths and sidewalks (if possible).
  • bicycling: Requests cycling directions or distance via bike paths and preferred streets (if possible).
  • transit: Requests directions or distance via public transport routes (if possible). If you set the mode to transit, it is optional to specify a departure time or arrival time.

Note: Both walking and cycling instructions may sometimes not include clear pedestrian or cycling paths, so these instructions will return results that include warnings to be shown to the user.

Error Handling

API Validation Error

HTTP Status Code: 123 - Unable to verify the type and validity of the API key.

Coordinate Limit Exceeded

HTTP Status Code: 124 - Maximum of 50 coordinates allowed exceeded.

Invalid Coordinates

HTTP Status Code: 125 - Invalid coordinates provided.

Query Limit Exceeded

HTTP Status Code: 126 - Query limit exceeded in the free version. Please upgrade your version.

Unpaid Invoice

HTTP Status Code: 127 - Unpaid invoice. You cannot proceed with your transactions until payment is made.

Route ID Not Found

HTTP Status Code: 400 - Route ID not found.

General Error

HTTP Status Code: 404 - [error message]

7. Tour Planner

Advanced route optimization and vehicle assignment system for complex touring scenarios.

Route Optimization Vehicle Assignment Time Management

Method Overview: RouteAndJobAssignment

This method is designed to create optimal routes for the assigned vehicles and assign the most suitable vehicles to individuals. It takes into account parameters such as the available capacity of vehicles, working hours, passenger pickup times, and traffic conditions to calculate the most efficient routes for each vehicle. As a result, vehicles and passengers are matched in the most logical and efficient way. The method ensures the ideal route and job distribution for all vehicles while also considering constraints such as traffic information and working hours.

Vehicle Capacity

Available capacity of vehicles

Working Hours

Vehicles' working hours

Traffic Conditions

Considers real-time traffic data

Request Structure

POST /RouteAndJobAssignment?RouteAssignmentApiKey={apiKey}

Parameters

  • string RouteAssignmentApiKey: The user's ROUTEASSIGMENT API key.
  • string RequestBody: The request body must contain data in a specified JSON format, which includes vehicle and job information.

Request Body Structure

{
  "vehicleData": [
    {
      "startHour": "string",
      "endHour": "string",
      "maxDistance": 0,
      "shiftTime": 0,
      "capacity": 0,
      "profile": "string",
      "startLocation": [
        0
      ]
    }
  ],
  "destination": [
    0
  ],
  "jobLocations": [
    {
      "location": [
        0
      ],
      "visitStartHour": "string",
      "visitEndHour": "string"
    }
  ]
}

This body contains:

  • vehicleData: A list of vehicles, including their working hours, maximum distance, shift times, capacity, profile, and starting location.
  • destination: A list of destination coordinates.
  • jobLocations: A list of job locations, including location coordinates and visit start and end times.

Response Structure

Success Response Structure

{
  "statistic": {
    "cost": 0.0,
    "distance": 0,
    "duration": 0,
    "times": {
      "driving": 0,
      "serving": 0,
      "waiting": 0,
      "stopping": 0,
      "break": 0
    }
  },
  "tours": [
    {
      "vehicleId": "string",
      "typeId": "string",
      "stops": [
        {
          "time": {
            "arrival": "string",
            "departure": "string"
          },
          "load": [0],
          "activities": [
            {
              "jobId": "string",
              "location": {
                "lat": 0,
                "lng": 0
              },
              "time": {
                "start": "string",
                "end": "string"
              }
            }
          ]
        }
      ]
    }
  ]
}
Response Fields Description
  • statistic: Contains the overall statistics of the tour.
    • cost: The total cost of the tour.
    • distance: The total distance covered by the vehicle.
    • duration: Total time the vehicle spends in motion during the tour.
    • times: Details of the time spent on various activities during the tour.
      • driving: Time spent driving.
      • serving: Time spent serving at stops or locations.
      • waiting: Time spent waiting, not in motion or serving.
      • stopping: Time spent stopped.
      • break: Time spent on breaks, not driving or serving.
  • tours: Information related to the specific tour.
    • vehicleId: Unique identifier for the vehicle.
    • typeId: Unique identifier for the vehicle type.
    • stops: Information on each stop along the tour.
      • time: General time information for the stop.
        • arrival: Time the vehicle arrives at the stop.
        • departure: Time the vehicle departs from the stop.
      • load: Load or capacity status of the vehicle upon arrival at the stop.
      • activities: Activities or tasks completed during the tour.
        • jobId: Unique identifier for each job or task.
        • location: Geographical coordinates of the activity location.
          • lat: Latitude of the location.
          • lng: Longitude of the location.
        • time: Time related to each activity.
          • start: Start time of the job.
          • end: End time of the job.

Error Responses

  • Api key and type validation failed; Type Apikey: " + RouteAssignmentApiKey

    This message indicates that the API key or type validation failed. The provided API key or request type may be incorrect or unauthorized for ROUTEASSIGMENT.

  • The number of jobs or vehicles exceeds the limit. Please use fewer jobs or vehicles.

    This error occurs when the number of jobs or vehicles exceeds the set limit for the synchronous and asynchronous API modes. The synchronous API supports up to 250 jobs and 35 vehicles, while the asynchronous API supports up to 6000 jobs and 150 vehicles.

  • The query limit has been exceeded in the free version. Please upgrade your version.

    This message indicates that the request limit for the free version has been exceeded. To continue using the service, an upgraded version with higher query limits is required.

  • You have an unpaid invoice. You can proceed with your transactions after making the payment.

    This message signals that there is an unpaid invoice associated with the account, and further transactions are restricted until payment is made.

  • Error: {response.StatusCode}\nError Details: {errorData}

    This message returns the HTTP status code and error details from the server response, indicating a problem with the request. It provides specific error data to assist with troubleshooting.

Example Usage

Example Request

URL: http://localhost:5261/RouteAndJobAssignment?RouteAssignmentApiKey=fc03dae2-cee0-49f3-bbd9-f88ae8b1d57c

Request Body:
{
  "vehicleData": [
    {
      "startHour": "09:00",
      "endHour": "11:30",
      "maxDistance": 300000,
      "shiftTime": 0,
      "capacity": 8,
      "profile": "car",
      "startLocation": [37.7749, -122.4194]
    },
    {
      "startHour": "09:00",
      "endHour": "11:00",
      "maxDistance": 300000,
      "shiftTime": 0,
      "capacity": 8,
      "profile": "car",
      "startLocation": [34.0522, -118.2437]
    }
  ],
  "destination": [36.1699, -115.1398],
  "jobLocations": [
    {
      "location": [37.7749, -122.4194],
      "visitStartHour": "09:00",
      "visitEndHour": "09:30"
    },
    {
      "location": [34.0522, -118.2437],
      "visitStartHour": "09:30",
      "visitEndHour": "10:00"
    },
    {
      "location": [40.7128, -74.0060],
      "visitStartHour": "09:00",
      "visitEndHour": "09:30"
    },
    {
      "location": [41.8781, -87.6298],
      "visitStartHour": "09:00",
      "visitEndHour": "09:30"
    },
    {
      "location": [32.7157, -117.1611],
      "visitStartHour": "09:00",
      "visitEndHour": "09:30"
    }
  ]
}

Example Response

Response body-JSON

"{\"statistic\":{\"cost\":0.0,\"distance\":0,\"duration\":0,\"times\":{\"driving\":0,\"serving\":0,\"waiting\":0,\"stopping\":0,\"break\":0}},\"tours\":[],\"unassigned\":[{\"jobId\":\"job_1\",\"reasons\":[{\"code\":\"TIME_WINDOW_CONSTRAINT\",\"description\":\"cannot be assigned due to violation of time window\"}]},{\"jobId\":\"job_2\",\"reasons\":[{\"code\":\"TIME_WINDOW_CONSTRAINT\",\"description\":\"cannot be assigned due to violation of time window\"}]},{\"jobId\":\"job_3\",\"reasons\":[{\"code\":\"TIME_WINDOW_CONSTRAINT\",\"description\":\"cannot be assigned due to violation of time window\"}]},{\"jobId\":\"job_4\",\"reasons\":[{\"code\":\"TIME_WINDOW_CONSTRAINT\",\"description\":\"cannot be assigned due to violation of time window\"}]},{\"jobId\":\"job_5\",\"reasons\":[{\"code\":\"TIME_WINDOW_CONSTRAINT\",\"description\":\"cannot be assigned due to violation of time window\"}]}]}"

In this example:

  • The RouteAssignmentApiKey is provided to authenticate the request.
  • The vehicleData includes one vehicle's working hours, capacity, shift time, and starting location.
  • The destination contains the destination coordinates.
  • The jobLocations define the locations where jobs will be performed, along with their visit start and end times.