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

# List Locations

> List the locations your company owns

export const permission_0 = 'element:read'

<Info>Requires permission: **{permission_0}**</Info>


## OpenAPI

````yaml GET /v1/location
openapi: 3.0.1
info:
  title: Variable API
  description: This is the Variable API
  version: 1.1.0
servers:
  - url: https://app.variable.global/api
security:
  - basicAuth: []
  - bearerAuth: []
  - oAuthNoScopes: []
paths:
  /v1/location:
    get:
      summary: Get a list of locations
      description: >
        List the named sites your company owns. Optionally filter by `type`, or
        by owning `company`

        (your own company or an unclaimed supplier of yours).
      parameters:
        - name: type
          in: query
          description: Filter by site type
          required: false
          schema:
            type: string
            enum:
              - factory
              - warehouse
              - office
              - port
              - other
        - name: company
          in: query
          description: >-
            Filter by owning company `uuid` (your own company or an unclaimed
            supplier of yours)
          required: false
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: A list of locations
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Location'
        '400':
          description: Invalid request — e.g. an invalid `type` filter.
        '401':
          description: ExpiredToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpiredTokenResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    limit:
      name: limit
      in: query
      description: Limit the number of results
      required: false
      schema:
        type: integer
        example: 100
    page:
      name: page
      in: query
      description: The page number
      required: false
      schema:
        type: integer
        example: 1
  schemas:
    ListResponse:
      type: object
      properties:
        count:
          type: integer
          example: 1500
        page:
          type: integer
          example: 1
        pageSize:
          type: integer
          example: 100
        data:
          type: array
          items:
            $ref: '#/components/schemas/IDAndName'
    Location:
      type: object
      description: >
        A named company site (factory / warehouse / office / port / other),
        optionally anchored to a

        geolocation for coordinates. Products, activities, and transport legs
        reference these internally

        as a physical origin / destination / location.
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
          example: Tokyo factory
        type:
          type: string
          enum:
            - factory
            - warehouse
            - office
            - port
            - other
          example: factory
        owner:
          allOf:
            - $ref: '#/components/schemas/IDAndName'
          description: >-
            The company that owns the site — your own company, or an unclaimed
            supplier you registered it for.
        address1:
          type: string
          example: 1-1 Marunouchi
        address2:
          type: string
        postCode:
          type: string
          example: 100-0005
        city:
          type: string
          example: Tokyo
        state:
          type: string
        country:
          type: string
          example: Japan
        geoLocation:
          $ref: '#/components/schemas/ApiGeoLocation'
    ExpiredTokenResponse:
      type: object
      properties:
        message:
          type: string
          example: token expired
    IDAndName:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
          example: Name
    ApiGeoLocation:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: >-
            Present only on a persisted geolocation (the POST response); absent
            on search candidates.
        googleMapsId:
          type: string
          example: ChIJA4UGSG_xNIgRNBuiWqEV-Y0
        name:
          type: string
          description: The geocoder's formatted address.
          example: Syracuse, NY, USA
        countryCode:
          type: string
          example: US
        latitude:
          type: number
          example: 43.0481
        longitude:
          type: number
          example: -76.1474
        locationType:
          type: string
          example: APPROXIMATE
    UUID:
      type: string
      format: uuid
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    oAuthNoScopes:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /auth/token
          scopes: {}

````