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

# Retrieve a list of locations



## OpenAPI

````yaml /openapi/integrations-api/openapi.yml get /locations
openapi: 3.0.0
info:
  title: Spirii Legacy API
  description: >-
    API for integration to Spirii CPO backend for charge point owners and charge
    point operators with access to whitelabel user data.
  version: 1.1.25
servers:
  - url: https://api.spirii.com/
    description: Production Environment
security: []
paths:
  /locations:
    get:
      tags:
        - Locations
      summary: Retrieve a list of locations
      parameters:
        - $ref: '#/components/parameters/appUserIdQuery'
        - $ref: '#/components/parameters/orderId'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/excludeDeleted'
      responses:
        '200':
          $ref: '#/components/responses/locationList'
        '400':
          $ref: '#/components/responses/badRequest'
        '500':
          $ref: '#/components/responses/badImplementation'
components:
  parameters:
    appUserIdQuery:
      in: query
      name: appUserId
      description: Only retrieve informations associated with an appUserId
      schema:
        type: integer
        example: 1
    orderId:
      in: query
      name: orderId
      description: Only retrieve locations associated with a specific orderId
      schema:
        type: integer
        example: 10
    offset:
      in: query
      name: offset
      description: The number of items to skip before starting to collect the result set
      schema:
        type: integer
        example: 250
    limit:
      in: query
      name: limit
      description: Number of record to collect
      schema:
        type: integer
        maximum: 2000
        default: 250
        example: 250
    excludeDeleted:
      in: query
      name: excludeDeleted
      schema:
        type: boolean
        default: false
  responses:
    locationList:
      description: Location Data
      content:
        application/json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                description: Location data
                type: array
                items:
                  type: object
                  required:
                    - id
                    - name
                    - streetAddress
                    - zipCode
                    - city
                    - country
                    - operatorId
                    - companyId
                    - type
                    - isPublic
                    - coordinate
                    - appUsers
                    - orders
                    - pricing
                  properties:
                    id:
                      $ref: '#/components/schemas/id'
                    name:
                      $ref: '#/components/schemas/name'
                    streetAddress:
                      $ref: '#/components/schemas/streetAddress'
                    zipCode:
                      $ref: '#/components/schemas/zipCode'
                    city:
                      $ref: '#/components/schemas/city'
                    country:
                      $ref: '#/components/schemas/country'
                    operatorId:
                      $ref: '#/components/schemas/operatorId'
                    companyId:
                      $ref: '#/components/schemas/companyId'
                    type:
                      $ref: '#/components/schemas/type'
                    isPublic:
                      $ref: '#/components/schemas/isPublic'
                    coordinate:
                      $ref: '#/components/schemas/coordinate'
                    fuseCapacity:
                      $ref: '#/components/schemas/fuseCapacity'
                    chargeBoxes:
                      $ref: '#/components/schemas/chargeBoxes'
                    appUsers:
                      $ref: '#/components/schemas/appUsers'
                    orders:
                      $ref: '#/components/schemas/orders'
                    pricing:
                      $ref: '#/components/schemas/pricing'
          example:
            data:
              - id: 1158
                name: ERWII
                streetAddress: Kokbjerg 30
                zipCode: '6000'
                city: Kolding
                country: Denmark
                operatorId: 1
                companyId: 7
                type: Parking lot
                isPublic: true
                coordinate:
                  lat: 55.53578
                  lon: 9.486323
                fuseCapacity: 32
                chargeBoxes:
                  - id: 1
                    cpSerialNumber: CPSN1
                    CBID: DK.SPI.Z1
                    firstUsageAt: '2021-01-29 06:45:22'
                    evses:
                      - DK.SPI.Z1*1
                      - DK.SPI.Z1*2
                  - id: 2
                    cpSerialNumber: CPSN2
                    CBID: DK.SPI.Z2
                    firstUsageAt: '2021-01-29 06:45:22'
                    evses:
                      - DK.SPI.Z2*1
                      - DK.SPI.Z2*2
                appUsers: []
                orders: []
                pricing:
                  perKwh: 3
                  currency: DKK
                  vat: 0.25
              - id: 1174
                name: EWII (building)
                streetAddress: Kokbjerg 30
                zipCode: '6000'
                city: Kolding
                country: Denmark
                operatorId: 1
                companyId: 7
                type: Parking lot
                isPublic: true
                coordinate:
                  lat: 55.535107
                  lon: 9.486873
                fuseCapacity: 50
                evses:
                  - DK.SPI.Z135*1
                  - DK.SPI.Z136*1
                appUsers: []
                orders: []
                pricing:
                  perKwh: 3
                  currency: DKK
                  vat: 0.25
              - id: 1175
                name: EWII (Public parking)
                streetAddress: Kokbjerg 30
                zipCode: '6000'
                city: Kolding
                country: Denmark
                operatorId: 1
                companyId: 7
                type: Parking lot
                isPublic: true
                coordinate:
                  lat: 55.536073
                  lon: 9.487332
                fuseCapacity: 20
                evses:
                  - DK.SPI.Z134*1
                appUsers: []
                orders: []
                pricing:
                  perKwh: 3
                  currency: DKK
                  vat: 0.25
    badRequest:
      description: Bad Request, invalid request or missing request parameter
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: >-
                      No fields to update. Please provide at least one of the
                      valid fields
          example:
            error:
              message: Querystring parameter `id` is not allowed
              statusCode: 400
              code: QueryParamNotAllowed
    badImplementation:
      description: Something went wroing, try again later
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: Something went wroing, try again later
          example:
            error:
              message: Something went wroing, try again later
              statusCode: 500
  schemas:
    id:
      description: id
      type: integer
      example: 1
    name:
      description: name
      type: string
      example: Kokbjerg
    streetAddress:
      description: street
      type: string
      example: Kokbjerg 30
    zipCode:
      description: zip code
      type: string
      example: '6000'
    city:
      description: city
      type: string
      example: Kolding
    country:
      description: country
      type: string
      example: Denmark
    operatorId:
      description: operator id
      type: integer
      example: 1
    companyId:
      description: company id
      type: integer
      example: 1
      nullable: true
    type:
      description: location type
      nullable: true
      type: string
      example: Parking lot
    isPublic:
      description: Public status identifier
      type: boolean
      example: true
    coordinate:
      type: object
      required:
        - lat
        - lon
      properties:
        lat:
          description: latitude
          type: number
          example: 55.53578
        lon:
          description: longitude
          type: number
          example: 9.486323
    fuseCapacity:
      description: fuse capacity
      type: integer
      example: 32
    chargeBoxes:
      type: array
      description: ChargeBoxes
      items:
        type: object
        description: ChargeBox
        required:
          - id
          - cpSerialNumber
          - CBID
          - firstUsageAt
          - evses
        properties:
          id:
            description: id
            type: integer
            example: 1
          cpSerialNumber:
            description: Serial number
            type: string
            example: ZSEN482
            nullable: true
          CBID:
            description: ChargeBox ID
            type: string
            example: DK.SPI.Z482
          evses:
            $ref: '#/components/schemas/evses'
    appUsers:
      type: array
      items:
        description: users id
        oneOf:
          - type: string
          - type: integer
    orders:
      type: array
      items:
        description: orders id
        example: 1
        oneOf:
          - type: string
          - type: integer
    pricing:
      type: object
      required:
        - perKwh
        - currency
        - vat
      properties:
        perKwh:
          $ref: '#/components/schemas/perKwh'
        currency:
          $ref: '#/components/schemas/currency'
        vat:
          $ref: '#/components/schemas/vat'
    evses:
      type: array
      items:
        type: string
        description: evse id
        example: DK.SPI.Z376*1
        nullable: true
    perKwh:
      description: price per kwh
      type: number
      example: 3
      nullable: true
    currency:
      description: pricing currency
      type: string
      example: DKK
      nullable: true
    vat:
      description: vat
      type: number
      example: 0.25
      nullable: true

````