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

# Retrieve a location status

> <Info>This endpoint supports Locations with up to one each of `commodity_import`, `commodity_export`, `non_commodity_import`, and `non_commodity_export` tariff elements, covering all use cases currently supported by Connect. If your implementation requires more (typically complex industrial cases), contact support for assistance.</Info>

Retrieves current status of a location.



## OpenAPI

````yaml api-reference/zero/flatpeak-api-spec-zero.json GET /locations/{id}/status
openapi: 3.0.3
info:
  description: Flatpeak API
  version: 2024-08-24.zero
  title: Flatpeak API
  termsOfService: https://flatpeak.com/legal
  contact:
    name: Technical Support
    email: support@flatpeak.com
    url: https://flatpeak.com/contact
  license:
    name: Apache 2.0
    url: https://flatpeak.com/legal
servers:
  - url: https://api.flatpeak.com
    description: Location
security: []
tags:
  - name: Consumption
    description: Consumption operations
  - name: Customers
    description: Customer operations
  - name: Devices
    description: Device operations
  - name: Meters
    description: Meter readings operations
  - name: Events
    description: Events operations
  - name: Login
    description: Bearer auth token operations
  - name: Connect
    description: Connect operations
  - name: Locations
    description: Location operations
  - name: Rates
    description: Rates operations
  - name: Costs
    description: Consumption cost calculations
  - name: Schedules
    description: Consumption schedules
  - name: Tariffs
    description: Tariff operations
  - name: Slots
    description: Slots operations
externalDocs:
  description: Location documentation
  url: https://docs.flatpeak.com
paths:
  /locations/{id}/status:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Flatpeak `location_id`
    get:
      tags:
        - Locations
      summary: Retrieve a location status
      description: >-
        <Info>This endpoint supports Locations with up to one each of
        `commodity_import`, `commodity_export`, `non_commodity_import`, and
        `non_commodity_export` tariff elements, covering all use cases currently
        supported by Connect. If your implementation requires more (typically
        complex industrial cases), contact support for assistance.</Info>


        Retrieves current status of a location.
      operationId: get-location-status
      responses:
        '200':
          $ref: '#/components/responses/LocationStatus'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      security:
        - bearerAuth: []
components:
  responses:
    '403':
      description: 403 bad credentials
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Bad credentials
            properties:
              message:
                type: string
                example: Bad credentials
          examples: {}
    '404':
      description: 404 response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Not Found
            properties:
              message:
                type: string
                example: Not Found
          examples: {}
    '500':
      description: 500 error
      content:
        application/json:
          schema:
            type: object
            x-examples:
              '':
                message: Internal Server Error
            properties:
              message:
                type: string
                example: Internal Server Error
          examples: {}
    LocationStatus:
      description: Example response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LocationStatus'
  schemas:
    LocationStatus:
      type: object
      x-examples:
        Example:
          id: loc_641b90b758fb8e6293716e40
          object: location_status
          reference_id: LOC1234567890
          customer_id: cus_65e421d1daa4a24082b4f590
          live_mode: true
          timezone: Europe/London
          currency_code: EUR
          postal_address:
            address_line1: 1-3
            address_line2: Strand
            city: London
            state: Greater London
            post_code: WC2N 5EH
            country_code: GB
          geo_location:
            lat: 50.12345
            lng: -1.23456
          rates:
            import:
              yesterday:
                - valid_from: '2022-12-28T00:00:00Z'
                  valid_to: '2022-12-29T00:00:00Z'
                  tariff:
                    rate: 4.998
                    confidence: 1
              today:
                - valid_from: '2022-12-29T00:00:00Z'
                  valid_to: '2022-12-30T00:00:00Z'
                  tariff:
                    rate: 4.998
                    confidence: 1
              tomorrow:
                - valid_from: '2022-12-30T00:00:00Z'
                  valid_to: '2022-12-31T00:00:00Z'
                  tariff:
                    rate: 4.998
                    confidence: 1
            export: null
          tariff_status:
            commodity_import:
              status: CONNECTED
              connection_type: DIRECT
              provider:
                id: prv_63a6087272921ef075a8fd3e
                display_name: Octopus Energy
                logo_url: https://s.flatpeak.com/83b06a60e38c2.png
              tariff_name: Flexible Go 2023
            commodity_export:
              status: NOT_CONNECTED
              connection_type: ''
              provider:
                id: ''
                display_name: ''
                logo_url: ''
              tariff_name: ''
            non_commodity_import:
              elements: []
              status: NOT_CONNECTED
          time_created: '2023-11-07T05:31:56Z'
          account_id: acc_661677911f2197045e6cf1b1
      properties:
        id:
          type: string
          description: Flatpeak unique location ID
          example: loc_641b90b758fb8e6293716e40
        object:
          type: string
          description: Represents the object’s type. I.e. location_status.
          example: location_status
        live_mode:
          type: boolean
          description: >-
            Has the value true if the object exists in live mode or the value
            false if the object exists in test mode.
          default: true
        tariff_status:
          type: object
          description: Tariff status object.
          properties:
            commodity_import:
              type: object
              description: Status of commodity import tariff.
              properties:
                status:
                  type: string
                  description: >-
                    Status of tariff element. Possible values are CONNECTED,
                    NOT_CONNECTED or ERROR.
                  example: CONNECTED
                connection_type:
                  type: string
                  description: >-
                    Represents tariff connection type. Set automatically by
                    Flatpeak depending on how the tariff was created.
                  example: DIRECT
                provider:
                  type: object
                  description: Information about the provider of the tariff element.
                  properties:
                    id:
                      type: string
                      description: Flatpeak ID of the provider this tariff belongs to.
                      example: prv_63a6087272921ef075a8fd3e
                    display_name:
                      type: string
                      description: Provider display name.
                      example: Octopus Energy
                    logo_url:
                      type: string
                      description: Image URL for the logo of the provider.
                      example: https://s.flatpeak.com/83b06a60e38c2.png
                tariff:
                  type: object
                  x-stoplight:
                    id: ptd15s772g9oe
                  description: Information about the tariff element.
                  properties:
                    id:
                      type: string
                      x-stoplight:
                        id: 6ycp65n614sqv
                      description: Unique tariff element ID.
                      example: trf_66ba584eb6923d7c3b942ef6
                    display_name:
                      type: string
                      x-stoplight:
                        id: pzj2ujwqgv1tk
                      description: Tariff display name.
                      example: Flexible Go 2023
                    structure_type:
                      type: string
                      x-stoplight:
                        id: 6ycp65n614sqv
                      description: >-
                        `FIXED` - a flat rate tariff; `TIME_OF_DAY` - a tariff
                        that varies based on specific times of day or other
                        cyclical factors (e.g., day of the week, month, or
                        season); `MARKET` - a tariff based on the market rate;
                        `DYNAMIC` - a continuously changing tariff that is not
                        directly tied to the market rate.
                      example: FIXED
                    contract_end_date:
                      type: string
                      x-stoplight:
                        id: cnwmyn0schnjw
                      format: date-time
                      example: '2024-01-01T00:00:00Z'
                      description: >-
                        Indicates end date of the energy supply contract between
                        customer and provider.
            commodity_export:
              type: object
              description: Status of commodity export tariff.
              properties:
                status:
                  type: string
                  description: >-
                    Status of tariff element. Possible values are CONNECTED,
                    NOT_CONNECTED or ERROR.
                  example: 'CONNECTED '
                connection_type:
                  type: string
                  description: >-
                    Represents tariff connection type. Set automatically by
                    Flatpeak depending on how tariff was created.
                  example: MANUAL
                provider:
                  type: object
                  description: Information about the provider of the tariff element.
                  properties:
                    id:
                      type: string
                      description: Flatpeak ID of the provider this tariff belongs to.
                      example: prv_63374fb151ea87296cd39ced
                    display_name:
                      type: string
                      description: Provider display name.
                      example: E.ON Next
                    logo_url:
                      type: string
                      description: Image URL for the logo of the provider.
                      example: https://s.flatpeak.com/83b06a60e38c2.png
                tariff:
                  type: object
                  x-stoplight:
                    id: r4w16eoi52jcs
                  description: Information about the tariff element.
                  properties:
                    id:
                      type: string
                      x-stoplight:
                        id: o81nml3qglnm4
                      description: Unique tariff element ID.
                      example: trf_66ba584eb6923d7c3b942ef6
                    display_name:
                      type: string
                      x-stoplight:
                        id: dsyzxi2hvomvb
                      description: Tariff display name.
                      example: Export 2023
                    structure_type:
                      type: string
                      x-stoplight:
                        id: dsyzxi2hvomvb
                      description: >-
                        `FIXED` - a flat rate tariff; `TIME_OF_DAY` - a tariff
                        that varies based on specific times of day or other
                        cyclical factors (e.g., day of the week, month, or
                        season); `MARKET` - a tariff based on the market rate;
                        `DYNAMIC` - a continuously changing tariff that is not
                        directly tied to the market rate.
                      example: TIME_OF_DAY
                    contract_end_date:
                      type: string
                      x-stoplight:
                        id: is0832ne2l48u
                      format: date-time
                      example: '2024-01-01T00:00:00Z'
                      description: >-
                        Indicates end date of the energy supply contract between
                        customer and provider.
            non_commodity_import:
              type: object
              description: Status of non-commodity import tariff.
              properties:
                status:
                  type: string
                  example: ERROR
                  description: >-
                    Status of tariff element. Possible values are CONNECTED,
                    NOT_CONNECTED or ERROR.
                connection_type:
                  type: string
                  x-stoplight:
                    id: 2x0p3oam2h22l
                  example: DIRECT
                  description: >-
                    Represents tariff connection type. Set automatically by
                    Flatpeak depending on how the tariff was created.
                provider:
                  type: object
                  x-stoplight:
                    id: 3fy56bsm4p2qh
                  description: Information about the provider of the tariff element.
                  properties:
                    id:
                      type: string
                      x-stoplight:
                        id: 9a61rlh4nv6fk
                      example: prv_63a6087272921ef075a8fd3e
                      description: Flatpeak ID of the provider this tariff belongs to.
                    display_name:
                      type: string
                      x-stoplight:
                        id: xnafu72ypr1oh
                      example: Octopus Energy
                      description: Provider display name.
                    logo_url:
                      type: string
                      x-stoplight:
                        id: acwl8t4qa3tv5
                      example: https://s.flatpeak.com/83b06a60e38c2.png
                      description: Image URL for the logo of the provider.
                tariff:
                  type: object
                  x-stoplight:
                    id: 2vxss1yznuyup
                  description: Information about the tariff element.
                  properties:
                    id:
                      type: string
                      x-stoplight:
                        id: 3jrvgu19amg91
                      example: trf_6728b0e6b6e6106dd5a88f8d
                      description: Unique tariff element ID.
                    display_name:
                      type: string
                      x-stoplight:
                        id: juumjj0bc0o8g
                      example: Network Fee
                      description: Tariff display name.
                    structure_type:
                      type: string
                      x-stoplight:
                        id: 3jrvgu19amg91
                      example: FIXED
                      description: >-
                        `FIXED` - a flat rate tariff; `TIME_OF_DAY` - a tariff
                        that varies based on specific times of day or other
                        cyclical factors (e.g., day of the week, month, or
                        season); `MARKET` - a tariff based on the market rate;
                        `DYNAMIC` - a continuously changing tariff that is not
                        directly tied to the market rate.
                    contract_end_date:
                      type: string
                      x-stoplight:
                        id: f31zco3daip0e
                      format: date-time
                      example: '2024-01-01T00:00:00Z'
                      description: >-
                        Indicates end date of the energy supply contract between
                        customer and provider.
            non_commodity_export:
              type: object
              x-stoplight:
                id: oe4h5g4xbevhd
              description: >-
                Status of non-commodity export tariff which is disabled as there
                are no known cases of this tariff type.
              properties:
                status:
                  type: string
                  x-stoplight:
                    id: w8k8ykv841e0e
                  example: NOT_SUPPORTED
                  description: Status of tariff element which is currently `NOT_SUPPORTED`.
            local:
              type: object
              x-stoplight:
                id: e1dzsessaszyt
              description: Status of local generation tariff which is in beta.
              properties:
                status:
                  type: string
                  x-stoplight:
                    id: a3xc60w5llu4o
                  example: NOT_SUPPORTED
                  description: Status of tariff element which is currently `NOT_SUPPORTED`.
        time_created:
          type: string
          format: date-time
          description: Indicates time when this location was created.
          example: '2023-11-07T05:31:56Z'
        account_id:
          type: string
          description: Flatpeak account ID.
          example: acc_661677911f2197045e6cf1b1
      required:
        - id
        - object
        - live_mode
        - time_created
        - account_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with `bearer_token` you obtained from
        [/login](/api-reference/zero/login/create-a-bearer-token) endpoint.

````