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

# Timeseries: Allocations

> List the volumes allocated to the requested accounting points.

Note that the markets often send multiple values per Imbalance Settlement Period (ISP) for each accounting point, starting with lower quality levels and then moving to higher quality levels. This endpoint returns *all* values received, including the timestamp when the value was known.

The reason for this is twofold: It makes fitting models to the data easier, and it allows you to consider the data quality when you do controlling and analysis.

For fitting models, you'll want to use the "known_at" attribute to filter out values that would not be known to the model when it's expected to run. For instance, if you're fitting a model to estimate imbalance at 10AM every day, you'd exclude values known only after 10AM, as otherwise the model ends up trained on "data from the future".

For controlling and analysis, seeing all available quality levels lets you make decisions on your level of trust in the data - you may be happy for an analysis to be based on early `estimated` or `provisional` values, while controlling pipelines may rather wait. The API leaves the decision of which value to use up to you.



## OpenAPI

````yaml /openapi.json get /market-access/v1alpha1/timeseries/allocations
openapi: 3.1.0
info:
  title: Engrate API
  version: 1.0.0
servers:
  - url: https://api.engrate.io
security:
  - apiKeyAuth: []
paths:
  /market-access/v1alpha1/timeseries/allocations:
    get:
      tags:
        - timeseries
      summary: 'Timeseries: Allocations'
      description: >-
        List the volumes allocated to the requested accounting points.


        Note that the markets often send multiple values per Imbalance
        Settlement Period (ISP) for each accounting point, starting with lower
        quality levels and then moving to higher quality levels. This endpoint
        returns *all* values received, including the timestamp when the value
        was known.


        The reason for this is twofold: It makes fitting models to the data
        easier, and it allows you to consider the data quality when you do
        controlling and analysis.


        For fitting models, you'll want to use the "known_at" attribute to
        filter out values that would not be known to the model when it's
        expected to run. For instance, if you're fitting a model to estimate
        imbalance at 10AM every day, you'd exclude values known only after 10AM,
        as otherwise the model ends up trained on "data from the future".


        For controlling and analysis, seeing all available quality levels lets
        you make decisions on your level of trust in the data - you may be happy
        for an analysis to be based on early `estimated` or `provisional`
        values, while controlling pipelines may rather wait. The API leaves the
        decision of which value to use up to you.
      operationId: list_allocations_market_access_v1alpha1_timeseries_allocations_get
      parameters:
        - description: Inclusive lower bound on the settlement period start (RFC 3339).
          in: query
          name: isp_from
          required: true
          schema:
            description: Inclusive lower bound on the settlement period start (RFC 3339).
            format: date-time
            title: Isp From
            type: string
        - description: Exclusive upper bound on the settlement period start (RFC 3339).
          in: query
          name: isp_until
          required: true
          schema:
            description: Exclusive upper bound on the settlement period start (RFC 3339).
            format: date-time
            title: Isp Until
            type: string
        - description: Accounting points to read, repeated per point.
          in: query
          name: accounting_point_id
          required: true
          schema:
            description: Accounting points to read, repeated per point.
            items:
              format: uuid
              type: string
            maxItems: 500
            minItems: 1
            title: Accounting Point Id
            type: array
        - description: Flow directions to read. Omit to read both.
          in: query
          name: flow_direction
          required: false
          schema:
            anyOf:
              - items:
                  $ref: '#/components/schemas/EnergyDirection'
                type: array
              - type: 'null'
            description: Flow directions to read. Omit to read both.
            title: Flow Direction
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllocationsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    EnergyDirection:
      enum:
        - consumption
        - production
      title: EnergyDirection
      type: string
    AllocationsResponse:
      properties:
        values:
          items:
            $ref: '#/components/schemas/AllocationRecord'
          title: Values
          type: array
      required:
        - values
      title: AllocationsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AllocationRecord:
      description: >-
        A volume allocated to some Accounting Point for one Imbalance Settlement
        Period (ISP).
      properties:
        accounting_point_id:
          format: uuid
          title: Accounting Point Id
          type: string
        flow_direction:
          $ref: '#/components/schemas/EnergyDirection'
        isp_resolution_minutes:
          title: Isp Resolution Minutes
          type: integer
        isp_time:
          format: date-time
          title: Isp Time
          type: string
        known_at:
          format: date-time
          title: Known At
          type: string
        quality:
          $ref: '#/components/schemas/AllocationQuality'
        volume_wh:
          title: Volume Wh
          type: integer
      required:
        - accounting_point_id
        - flow_direction
        - isp_resolution_minutes
        - isp_time
        - known_at
        - quality
        - volume_wh
      title: AllocationRecord
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AllocationQuality:
      description: >-
        How the volume was arrived at, in ascending order of trust. When one
        settlement period carries several records, prefer the highest quality.


        ### Available allocation qualities


        - **provisional** — A placeholder the sender intends to replace.


        - **estimated** — Substituted because no reading was available:
        profiled, interpolated, or copied from a comparable period. Expect it to
        be superseded.


        - **calculated** — Derived by a defined computation rather than read


        - **measured** — Read off the meter.
      enum:
        - provisional
        - estimated
        - calculated
        - measured
      examples:
        - measured
      title: AllocationQuality
      type: string
  securitySchemes:
    apiKeyAuth:
      in: header
      name: Authorization
      type: apiKey

````