> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Location

> Returns a location object.



## OpenAPI

````yaml /openapi/locations.json get /v1/locations/{locationId}
openapi: 3.0.1
info:
  title: Voucherify API - Locations
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/locations/{locationId}:
    get:
      tags:
        - Locations
      summary: Get Location
      description: Returns a location object.
      operationId: get-location
      parameters:
        - schema:
            $ref: '#/components/schemas/ParameterLocationId'
          name: locationId
          in: path
          required: true
          description: The unique location ID.
      responses:
        '200':
          description: Returns a location object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationsGetResponseBody'
              examples:
                Circle Example:
                  value:
                    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
                Polygon Example:
                  value:
                    id: loc_RcYz537sV07e1t5aG5tIH9FD
                    object: location
                    name: Poland
                    shape:
                      type: polygon
                      format: geojson
                      geojson:
                        type: Polygon
                        coordinates:
                          - - - 18.553923
                              - 50.559107
                            - - 18.528805
                              - 51.087437
                            - - 19.591667
                              - 50.832424
                            - - 19.425109
                              - 50.497984
                            - - 19.375814
                              - 50.330652
                            - - 19.398107
                              - 50.111652
                            - - 18.73906
                              - 49.981498
                            - - 18.272477
                              - 50.088707
                            - - 18.553923
                              - 50.559107
                    created_at: '2022-07-14T15:21:55.085Z'
                    updated_at: null
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - locations
components:
  schemas:
    ParameterLocationId:
      type: string
      example: loc_NoMGXmHO9OUs7iz9mGWpamma
    LocationsGetResponseBody:
      title: Locations Get Response Body
      description: >-
        Response schema for listing locations using **GET**
        `/v1/locations/{locationId}`.
      allOf:
        - $ref: '#/components/schemas/Location'
    Location:
      title: Location object
      type: object
      description: This is an object representing a location.
      properties:
        id:
          type: string
          description: Unique location ID, assigned by the Voucherify API.
          example: loc_NoMGXmHO9OUs7iz9mGWpamma
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about a `location`.
          default: location
          enum:
            - location
        name:
          type: string
          description: Location name.
        shape:
          type: object
          description: Defines the shape and boundaries of the location.
          oneOf:
            - $ref: '#/components/schemas/LocationShapeCircle'
            - $ref: '#/components/schemas/LocationShapePolygon'
        created_at:
          type: string
          example: '2022-02-14T15:12:06.817Z'
          description: >-
            Timestamp representing the date and time when the location was
            created. The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          example: '2022-03-14T15:12:06.817Z'
          nullable: true
          description: >-
            Timestamp representing the date and time when the location was
            updated. The value is shown in the ISO 8601 format.
          format: date-time
      required:
        - id
        - object
        - name
        - shape
        - created_at
        - updated_at
    LocationShapeCircle:
      title: Circle
      type: object
      description: This is an object representing a circular shape.
      properties:
        type:
          type: string
          description: The type of shape being defined is a `circle`.
          enum:
            - circle
        format:
          type: string
          description: The location is defined in terms of a `distance` object.
          enum:
            - distance
        distance:
          type: object
          title: Distance
          description: Defines the parameters for the circle.
          properties:
            center:
              type: string
              description: >-
                Center of the circle identified by GPS coordinates in decimal
                degrees.
              example: geo:40.79372699823857,-74.15092132694554
            radius:
              type: string
              description: Defines the radius of the circle.
      required:
        - type
        - format
        - distance
    LocationShapePolygon:
      title: Polygon
      type: object
      description: This is an object representing a polygon.
      properties:
        type:
          type: string
          description: The type of shape being defined is a `polygon`.
          enum:
            - polygon
        format:
          type: string
          description: The location is defined in terms of a `geojson` object.
          enum:
            - geojson
        geojson:
          oneOf:
            - $ref: '#/components/schemas/GeojsonPolygon'
            - $ref: '#/components/schemas/GeojsonMultiPolygon'
      required:
        - type
        - format
        - geojson
    GeojsonPolygon:
      type: object
      title: Geojson Polygon
      description: Defines the parameters for the polygon.
      properties:
        type:
          type: string
          description: Type of geojson coordinates, i.e. `Polygon`.
          enum:
            - Polygon
        coordinates:
          $ref: '#/components/schemas/PolygonCoordinates'
      required:
        - type
        - coordinates
    GeojsonMultiPolygon:
      type: object
      title: Geojson Multi Polygon
      description: Defines the parameters for the polygon.
      properties:
        type:
          type: string
          description: Type of geojson coordinates, i.e. `MultiPolygon`.
          enum:
            - MultiPolygon
        coordinates:
          type: array
          items:
            $ref: '#/components/schemas/PolygonCoordinates'
      required:
        - type
        - coordinates
    PolygonCoordinates:
      title: PolygonCoordinates
      type: array
      items:
        type: array
        items:
          type: integer
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````