Skip to main content
POST
/
locations
/
nearest
cURL
curl --request POST \
  --url https://dev.api.r4technology.io/locations/nearest \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_address": {
    "zip": "02127",
    "address": "<string>",
    "city": "<string>",
    "state": "<string>"
  },
  "max_distance": 5
}
'
{
  "code": "Success",
  "locations": [
    {
      "name": "Antons Cleaners - 135 W Broadway St",
      "address": "135 W. Broadway St.",
      "city": "Boston",
      "state": "MA",
      "zip": "02127",
      "business_hours": {
        "Monday": "7:00 AM - 7:00 PM",
        "Tuesday": "7:00 AM - 7:00 PM",
        "Wednesday": "7:00 AM - 7:00 PM",
        "Thursday": "7:00 AM - 7:00 PM",
        "Friday": "7:00 AM - 7:00 PM",
        "Saturday": "8:00 AM - 5:00 PM",
        "Sunday": "Closed"
      },
      "lat": "42.3406939",
      "lng": "-71.0542802",
      "distance": 0.219298791554029
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Customer address and search criteria

customer_address
object
required
max_distance
number<float>
default:5
required

Maximum distance in miles to search for locations

Response

List of nearby locations ordered by distance

code
string

Response status code

locations
object[]

Array of nearby locations ordered by distance (ascending)