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

# List contracts

> List contracts accessible to the authenticated BRP. Supports filtering by status, type, EIC code, delivery period, and active date.

Required scope: `contracts:read`



## OpenAPI

````yaml get /v1/contracts
openapi: 3.0.0
info:
  title: Otark BRP API
  description: >-
    API for Balancing Responsible Parties (BRPs) to manage contracts,
    transactions, nominations, and customers on the Otark platform.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.otark.energy
    description: Production
security: []
tags:
  - name: Contracts
    description: Manage energy contracts (PPA, day-ahead, etc.)
  - name: Transactions
    description: Contractual energy volumes between buyer and seller
  - name: Nominations
    description: Net saldo aggregated by balance group
  - name: Customers
    description: Manage customers assigned to the BRP
paths:
  /v1/contracts:
    get:
      tags:
        - Contracts
      summary: List contracts
      description: >-
        List contracts accessible to the authenticated BRP. Supports filtering
        by status, type, EIC code, delivery period, and active date.


        Required scope: `contracts:read`
      operationId: listContracts
      parameters:
        - name: status
          in: query
          description: Filter by contract status
          schema:
            type: string
            enum:
              - pending
              - in_progress
              - completed
        - name: type
          in: query
          description: Filter by contract type
          schema:
            type: string
            enum:
              - ppa
              - day_ahead
              - intraday
        - name: eic
          in: query
          description: Filter by buyer or seller EIC code
          schema:
            type: string
            example: 11YGREENENERGY-Z
        - $ref: '#/components/parameters/DeliveryStartParam'
        - $ref: '#/components/parameters/DeliveryEndParam'
        - name: active_on
          in: query
          description: Filter contracts active on this date
          schema:
            type: string
            format: date
            example: '2026-01-15'
        - $ref: '#/components/parameters/LimitParam'
        - $ref: '#/components/parameters/AfterParam'
      responses:
        '200':
          description: Contracts list
          headers:
            x-ratelimit-limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            x-ratelimit-remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            x-ratelimit-reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    DeliveryStartParam:
      name: delivery_start
      in: query
      description: 'Filter: delivery start >= this value (ISO 8601)'
      schema:
        type: string
        format: date-time
        example: '2026-01-01T00:00:00Z'
    DeliveryEndParam:
      name: delivery_end
      in: query
      description: 'Filter: delivery end <= this value (ISO 8601)'
      schema:
        type: string
        format: date-time
        example: '2026-03-31T23:45:00Z'
    LimitParam:
      name: limit
      in: query
      description: Maximum number of items per page
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    AfterParam:
      name: after
      in: query
      description: >-
        Cursor for the next page — pass the `next_cursor` value from the
        previous response
      schema:
        type: string
        example: con_a1b2c3d4
  headers:
    X-RateLimit-Limit:
      description: Maximum number of requests allowed per window
      schema:
        type: integer
        example: 300
    X-RateLimit-Remaining:
      description: Remaining requests in the current window
      schema:
        type: integer
        example: 299
    X-RateLimit-Reset:
      description: Seconds until the rate limit window resets
      schema:
        type: integer
        example: 60
  schemas:
    ContractList:
      type: object
      properties:
        contracts:
          type: array
          description: List of contracts
          items:
            $ref: '#/components/schemas/Contract'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - contracts
        - pagination
    Contract:
      type: object
      description: >-
        An energy contract. Contracts are polymorphic — the schema varies by
        `type`.
      properties:
        id:
          type: string
          description: Internal unique contract identifier
          example: con_a1b2c3d4
        external_id:
          type: string
          description: External reference identifier
          example: PPA-2025-0042
        type:
          type: string
          description: Contract type
          enum:
            - ppa
            - day_ahead
            - intraday
          example: ppa
        status:
          type: string
          description: Contract status
          enum:
            - pending
            - in_progress
            - completed
          example: in_progress
        delivery_start:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 delivery start (UTC)
          example: '2026-01-01T00:00:00Z'
        delivery_end:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 delivery end (UTC)
          example: '2026-03-31T23:45:00Z'
        seller:
          $ref: '#/components/schemas/Counterparty'
        buyer:
          $ref: '#/components/schemas/Counterparty'
        ppa_type:
          type: string
          nullable: true
          description: PPA pricing/delivery type (only present when `type` is `ppa`)
          enum:
            - forecasted
            - produced
            - consumed
            - baseload
            - shaped
            - peakload
            - indexed
          example: indexed
        period:
          type: string
          nullable: true
          description: Contract period display name (only present when `type` is `ppa`)
          example: Q1-2026
        delivery_profile:
          type: string
          nullable: true
          description: Delivery profile name (only present when `type` is `ppa`)
          example: ENWEX Solar 2026
        asset:
          description: >-
            The generating asset (only present when `type` is `ppa` and an asset
            is assigned)
          allOf:
            - $ref: '#/components/schemas/Asset'
        created_at:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 creation timestamp
          example: '2024-11-20T10:00:00Z'
      required:
        - id
        - external_id
        - type
        - status
        - delivery_start
        - delivery_end
        - seller
        - buyer
        - created_at
    Pagination:
      type: object
      properties:
        limit:
          type: integer
          description: Maximum items per page
          example: 10
        has_more:
          type: boolean
          description: Whether more records exist after the last returned record
          example: true
        next_cursor:
          type: string
          nullable: true
          description: >-
            Cursor to pass as the `after` query parameter to fetch the next
            page. Null when there are no more pages.
          example: txn_k8m2p4q7r1
      required:
        - limit
        - has_more
        - next_cursor
    Problem:
      type: object
      description: >-
        Error response following [RFC 9457 — Problem Details for HTTP
        APIs](https://www.rfc-editor.org/rfc/rfc9457).
      properties:
        type:
          type: string
          format: uri
          description: Absolute URI identifying the problem class
          example: https://brp.otark.team/errors/balance_group_tso_not_enabled
        title:
          type: string
          description: >-
            Short human-readable label (stable across occurrences of the same
            type)
          example: Balance Group TSO Not Enabled
        status:
          type: integer
          description: HTTP status code
          example: 400
        detail:
          type: string
          description: Human-readable explanation for this specific occurrence
          example: >-
            The requested TSO is not enabled for this balance group. Enable it
            via the balance group settings first.
        instance:
          type: string
          description: URI identifying the specific request
          example: /v1/customers/cust_r8s9t0u1
        errors:
          type: array
          description: Field-level validation errors (present on validation failures)
          items:
            $ref: '#/components/schemas/ProblemFieldError'
      required:
        - type
        - title
        - status
    Counterparty:
      type: object
      description: A counterparty identified by EIC code
      properties:
        name:
          type: string
          description: Company or entity name
          example: GreenCo Energy BV
        eic:
          type: string
          description: EIC code (balance group)
          example: 11YGREENENERGY-Z
        tso:
          type: string
          description: TSO responsible for the balance group
          enum:
            - DE_AMPRION
            - DE_TENNET
            - DE_TRANSNET_BW
            - DE_50HERTZ
          example: DE_TENNET
      required:
        - name
        - eic
        - tso
    Asset:
      type: object
      description: A generating asset
      properties:
        id:
          type: string
          description: Unique asset identifier
          example: ast_w1x2y3z4
        name:
          type: string
          description: Display name of the generating asset
          example: Zonnepark De Wilgen
        nominal_power:
          type: number
          description: Nominal power capacity in MW
          example: 25
        technology:
          type: string
          description: Generation technology
          enum:
            - solar
            - wind_onshore
            - wind_offshore
          example: solar
        tso:
          type: string
          description: TSO responsible for the asset's grid connection
          enum:
            - DE_AMPRION
            - DE_TENNET
            - DE_TRANSNET_BW
            - DE_50HERTZ
          example: DE_TENNET
      required:
        - id
        - name
        - nominal_power
        - technology
        - tso
    ProblemFieldError:
      type: object
      description: A single field-level validation error
      properties:
        field:
          type: string
          description: JSON path of the field that caused the error
          example: balance_group.tso
        code:
          type: string
          description: >-
            Machine-readable error code: `unknown_field`, `read_only_field`,
            `required`, `invalid_type`, `invalid_enum_value`, `invalid_format`,
            `invalid_literal`, `value_too_small`, `value_too_large`, or
            `validation_failed`
          example: invalid_enum_value
        message:
          type: string
          description: Human-readable description of the issue
          example: >-
            Invalid enum value. Expected 'DE_AMPRION' | 'DE_TENNET' |
            'DE_TRANSNET_BW' | 'DE_50HERTZ', received 'INVALID'
      required:
        - code
        - message
  responses:
    BadRequest:
      description: Invalid request — validation error or business rule violation
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://brp.otark.team/errors/validation
            title: Validation Failed
            status: 400
            instance: /v1/customers/cust_r8s9t0u1
            errors:
              - field: balance_group.tso
                code: invalid_enum_value
                message: >-
                  Invalid enum value. Expected 'DE_AMPRION' | 'DE_TENNET' |
                  'DE_TRANSNET_BW' | 'DE_50HERTZ', received 'INVALID'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://brp.otark.team/errors/invalid_api_key
            title: Invalid API Key
            status: 401
    Forbidden:
      description: API key lacks required scopes
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://brp.otark.team/errors/insufficient_scopes
            title: Insufficient API Key Scopes
            status: 403
            detail: >-
              Missing scope: customers:write. Please create a new API key with
              the required scopes.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````