> ## 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 location by ID



## OpenAPI

````yaml /openapi/integrations-api/openapi.yml get /locations/{id}
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/{id}:
    get:
      tags:
        - Locations
      summary: Retrieve location by ID
      parameters:
        - $ref: '#/components/parameters/locationId'
      responses:
        '200':
          $ref: '#/components/responses/locationId'
        '400':
          $ref: '#/components/responses/badRequest'
        '500':
          $ref: '#/components/responses/badImplementation'
components:
  parameters:
    locationId:
      in: path
      name: id
      description: location ID to retrieve
      required: true
      schema:
        type: integer
        example: 1
  responses:
    locationId:
      description: Location data of specific location
      content:
        application/json:
          schema:
            type: object
            required:
              - id
              - name
              - streetAddress
              - zipCode
              - city
              - country
              - operatorId
              - companyId
              - type
              - isPublic
              - coordinate
              - fuseCapacity
              - chargeBoxes
              - 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:
            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
    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

````