Get list of suggested addresses

Using the Autocomplete and Place APIs to get a list of suggested addresses

Follow the steps given below to combine Skedulo’s Autocomplete and Place APIs to get the place details

  1. Generate a UUID using a free tool such as Online UUID Generator.
  2. Use the /autocomplete to send a POST request with a JSON body defining the input and session token generated by the tool. For example:
    {
      "input": "Central Pa",
      "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459"
    }
    
  3. Copy the placeId of the address you want to select from the list of the five suggested results. If the place you are looking for is not in the list, please retry using the /autocomplete endpoint with more precise keywords in the input string.
  4. Use the placeId of your interest and send a POST request to the /place endpoint with the same sessionId you used to retrieve your autocomplete results like shown below:
    {
      "placeId": "EiVDZW50cmFsIFBhcmsgU291dGgsIE5ldyBZb3JrLCBOWSwgVVNBIi4qLAoUChIJu3GRLvdYwokRYtzyuYIf3zoSFAoSCTsIP9OlT8KJEWL-d-EGjwvI",
      "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459"
    }
    

This request returns the following place information:

{
    "result": {
        "addressComponents": {
            "streetNumber": null,
            "route": "Central Park S",
            "subLocality": "Manhattan",
            "locality": "New York",
            "area2": "New York County",
            "area1": "NY",
            "country": "United States",
            "postalCode": null
        },
        "formattedAddress": "Central Park S, New York, NY, USA",
        "geometry": {
            "lat": 40.7661851,
            "lng": -73.9773038
        }
    }
}

ZERO RESULTS

If no addresses match the description you have provided in the request input field in your /autocomplete request, the response will show ZERO RESULTS:

{
  "result": {
    "predictions": [],
    "status": "ZERO_RESULTS",
    "errorMessage": null
  }
}