Locate Service: API Introduction
Locate Service has currently 4 services you can use which are:
- Locate Device - This api allows you to get the exact location of a device through reverse geocoding so that you can get the exact location.
- Locate Suggestions - This api allows you to get suggestions of addresses based on search queries.
- Locate Geocode - This api allows you to get coordinates of a location.
- Locate Calculate Routes - This api allows you to get distance and time calculations from a point of origin to multiple destinations.
Getting Started
To get started, you need to have credits in your account and an api key that you will send together with your request and a webhook endpoint to receive the results. The webhook endpoint is necessary since it takes some time for the task to complete. Upon making a request, you will receive a response from the api that your request has been received. The api will process your request and post the results in your webhook endpoint.
You can find your credits and api key in your dashboard home page. The api key is automatically created for you when you signup. You get free credits for testing the api and may request to purchase for more. For the webhook endpoints, you need to save them in the Identify Service settings page under Services.
Webhook Flow
When making a request, please make sure to have the following:
- Set the value of the headers Content-Type to application/json
- Set the value of the headers x-api-key to your api key
- Set the method of the request to POST
- Provide the correct request body for the specific api. This will be discussed in more detail.
When your request does not meet the right format, you will receive the error in the response. If your request follows the right format but encounters an error during the processing of the task, you will receive the error in your webhook endpoint. Details on the error responses will be discussed in more detail.
API Endpoint
Currently, there are 4 api endpoint for Locate services. The body of the request determines which service will be used in the endpoint. The service name you can use in this endpoint is:
Data Storage
The service does not save any data.