Get Location By Plus Code

GET /location/pluscode

Gets the location for the given plus code. Returns the location if successful, otherwise returns an error.

Permissions Required: Location::Pluscode

Headers

Responses

  • 200 application/json

    The location for the given pluscode

    Hide response attributes Show response attributes object

    The response data for all location endpoints

    • address object Required

      The address of the location

      Hide address attributes Show address attributes object
    • coords object Required

      The coordinates of the location

      Hide coords attributes Show coords attributes object
      • lat number Required

        The latitude of the location

      • lng number Required

        The longitude of the location

    • pluscode string Required

      The plus code of the location

  • 400 application/json

    Missing pluscode information

    Hide response attributes Show response attributes object

    The error data that is returned when an error occurs

    All Error Codes are located in /functions/errorResponse.js GitHub

    • code integer Required

      The error code

      Minimum value is 0, maximum value is 30.

    • message string Required

      The error message

  • 401 application/json

    Invalid/Missing API Token

    Hide response attributes Show response attributes object

    The error data that is returned when an error occurs

    All Error Codes are located in /functions/errorResponse.js GitHub

    • code integer Required

      The error code

      Minimum value is 0, maximum value is 30.

    • message string Required

      The error message

  • 403 application/json

    Missing Permissions

    Hide response attributes Show response attributes object

    The error data that is returned when an error occurs

    All Error Codes are located in /functions/errorResponse.js GitHub

    • code integer Required

      The error code

      Minimum value is 0, maximum value is 30.

    • message string Required

      The error message

  • 404 application/json

    Error with the given pluscode

    Hide response attributes Show response attributes object

    The error data that is returned when an error occurs

    All Error Codes are located in /functions/errorResponse.js GitHub

    • code integer Required

      The error code

      Minimum value is 0, maximum value is 30.

    • message string Required

      The error message

GET /location/pluscode
curl \
 -X GET https://thefemdevs.com/api/location/pluscode \
 -H "x-pluscode: 87G8P9CJ+XQ"
Response examples (200)
{
  "coords": {
    "lat": 38.8976633,
    "lng": -77.0365739
  },
  "address": {
    "city": "Washington",
    "state": "District of Columbia",
    "street": "Pennsylvania Avenue Northwest",
    "country": "United States",
    "postalCode": "20500",
    "houseNumber": "1600"
  },
  "pluscode": "87G8P9CJ+XQ"
}
Response examples (400)
{
  "code": 8,
  "message": "Missing Header Parameter(s)"
}
{
  "code": 9,
  "message": "Invalid Header Parameter(s)"
}
Response examples (401)
{
  "code": 3,
  "message": "No API key provided"
}
{
  "code": 4,
  "message": "Invalid API key provided"
}
Response examples (403)
{
  "code": 1,
  "message": "You are not authorized to access this resource"
}
{
  "code": 2,
  "message": "You are blacklisted from accessing this resource"
}
Response examples (404)
{
  "code": 22,
  "message": "Unable to retrieve requested information"
}