Ostrom Products API

Describe how to fetch information related with products

OpenAPI Specification

ostrom-products-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Ostrom Auth Products API
  version: '2023-11-01'
  description: 'The Ostrom API is designed to allow our customer and partners to develop apps that integrates with our smart energy management platform. The API has a RESTful architecture and utilizes OAuth2 authorization.

    '
  license:
    name: Ostrom Commercial License
    url: https://ostrom.de
servers:
- url: https://sandbox.ostrom-api.io
  description: Sandbox environment (test data)
- url: https://production.ostrom-api.io
  description: Production environment (live data)
- url: https://auth.sandbox.ostrom-api.io
  description: Authentication sandbox environment (generate access token - test data)
- url: https://auth.production.ostrom-api.io
  description: Authentication production environment (generate access token - live data)
tags:
- name: Products
  description: Describe how to fetch information related with products
paths:
  /products:
    get:
      operationId: getProductPrices
      tags:
      - Products
      summary: Retrieve product prices
      description: 'Allowed role: `PARTNER`'
      parameters:
      - in: query
        name: zip
        schema:
          type: string
        required: true
        description: The postal code where the tariff will be calculated
      - in: query
        name: numberOfResidents
        schema:
          type: number
        description: The number of people in the household, if not provided the default value will be 1
      - in: query
        name: yearlyConsumption
        schema:
          type: number
        description: The amount of yearly consumption of the household, if not provided the default value will be 1400 kWh
      security:
      - ClientAccessToken: []
      responses:
        '200':
          description: Successful product prices data fetch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProductPriceResponse'
        '400':
          description: The request is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError400'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError401'
        '404':
          description: Entity with the provided id was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError404'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestError429'
components:
  schemas:
    BadRequestError400:
      type: object
      properties:
        type:
          type: string
          description: The type of the error
        detail:
          type: string
          description: A human-readable message providing more details about the error
      example:
        type: bad_request
        detail: invalid fields array...
    UnauthorizedError401:
      type: object
      properties:
        type:
          type: string
          description: The type of the error
        detail:
          type: string
          description: A human-readable message providing more details about the error
      example:
        type: unauthorized
        detail: Unauthorized API access.
    BadRequestError404:
      type: object
      properties:
        type:
          type: string
          description: The type of the error
        detail:
          type: string
          description: A human-readable message providing more details about the error
      example:
        type: not_found
        detail: information about not found object...
    GetProductPriceItemResponse:
      type: object
      properties:
        code:
          type: string
          description: The product code
          example: SIMPLY_DYNAMIC
        netKwhPrice:
          type: number
          description: The kWh product price without VAT in cents
          example: 92.6
        grossKwhPrice:
          type: number
          description: The kWh product price with VAT in cents
          example: 110.2
        netKwhTaxAndLevies:
          type: number
          description: The kWh taxes and levies product price without VAT in cents
          example: 16.2
        grossKwhTaxAndLevies:
          type: number
          description: The kWh taxes and levies product price with VAT in cents
          example: 19.28
        netMonthlyOstromBaseFee:
          type: number
          description: The monthly Ostrom base fee without VAT in EUR
          example: 5.04
        grossMonthlyOstromBaseFee:
          type: number
          description: The monthly Ostrom base fee with VAT in EUR
          example: 6
        netMonthlyGridFees:
          type: number
          description: The monthly grid fees without VAT in EUR
          example: 3.84
        grossMonthlyGridFees:
          type: number
          description: The monthly grid fees with VAT in EUR
          example: 4.57
        netKwhUnitPrice:
          type: number
          description: The unit price without VAT in cents
          example: 25.76
        grossKwhUnitPrice:
          type: number
          description: The unit price with VAT in cents
          example: 30.66
        monthlyDeposit:
          type: number
          description: The monthly deposit amount in EUR
          example: 60
        yearlyComsumption:
          type: number
          description: The yearly consumption in kWh
          example: 2000
    TooManyRequestError429:
      type: object
      properties:
        type:
          type: string
          description: The type of the error
        detail:
          type: string
          description: A human-readable message providing more details about the error
      example:
        type: too_many_requests
        detail: API request limit per minute has been reached. Please try again later.
    GetProductPriceResponse:
      type: object
      properties:
        data:
          type: array
          description: Product price data
          items:
            $ref: '#/components/schemas/GetProductPriceItemResponse'
  securitySchemes:
    ClientAccessToken:
      type: oauth2
      description: 'A `ClientAccessToken` is obtained via the [OAuth 2.0 Client Credentials grant](https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/) and carries authorization to access all functionalities and data in your Ostrom account. Full details at [The ClientAccessToken](/api/reference#getting-an-access-token)

        '
      flows:
        clientCredentials:
          tokenUrl: https://auth.sandbox.ostrom-api.io/oauth2/token
          scopes: {}
    OAuth2BasicAuth:
      type: http
      scheme: basic