Skip to main content
GET
/
v1
/
locations
/
{locationId}
Get Location
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/locations/{locationId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
"id": "loc_NoMGXmHO9OUs7iz9mGWpamma",
"object": "location",
"name": "Belleville",
"shape": {
"type": "circle",
"format": "distance",
"distance": {
"center": "geo:40.79372699823857,-74.15092132694554",
"radius": "1.54 km"
}
},
"created_at": "2022-07-15T06:04:36.924Z",
"updated_at": null
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

locationId
string
required

The unique location ID.

Example:

"loc_NoMGXmHO9OUs7iz9mGWpamma"

Response

200 - application/json

Returns a location object.

Response schema for listing locations using GET /v1/locations/{locationId}. This is an object representing a location.

id
string
required

Unique location ID, assigned by the Voucherify API.

Example:

"loc_NoMGXmHO9OUs7iz9mGWpamma"

object
enum<string>
default:location
required

The type of the object represented by JSON. This object stores information about a location.

Available options:
location
name
string
required

Location name.

shape
object
required

Defines the shape and boundaries of the location. This is an object representing a circular shape.

  • Circle
  • Polygon
created_at
string<date-time>
required

Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.

Example:

"2022-02-14T15:12:06.817Z"

updated_at
string<date-time> | null
required

Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.

Example:

"2022-03-14T15:12:06.817Z"

I