KPN

KPN FIAM Eneco Data Products API

FIAM – Eneco Data Products

OpenAPI Specification

kpn-fiam-eneco-data-products-openapi.yml Raw ↑
---
openapi: "3.0.3"
info:
  title: "FIAM – Eneco Data Products"
  description: "Eneco DataShare APIs"
  contact:
    name: "Eneco Integration Team"
    url: "https://developer.enecogroup.com"
    email: "FM_BTO_Integration_Team@eneco.com"
  version: "1.0.1"
servers:
- url: "https://api-acc.enecogroup.com/"
- url: "https://api.enecogroup.com/"
paths:
  /datashare/v1/{businessUnit}/{label}/dataconsumer/{dataOwnerId}/{productType}/usages:
    get:
      tags:
      - "DataConsumer"
      summary: "Get usages for data consumers"
      description: "Get usages for data consumers by validating contract via KPN FIAM"
      operationId: "Get usages for data consumers"
      parameters:
      - name: "businessUnit"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/BusinessUnitBinding"
      - name: "label"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/LabelBinding"
      - name: "dataOwnerId"
        in: "path"
        required: true
        schema:
          type: "string"
          format: "uuid"
      - name: "productType"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/ProductTypeBinding"
      - name: "endDate"
        in: "query"
        explode: false
        schema:
          type: "string"
          format: "date-time"
      - name: "x-request-id"
        in: "header"
        description: "Unique identifier of incoming call for tracing purposes"
        schema:
          type: "string"
          format: "uuid"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsagesResponse"
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "429":
          description: "Too Many Requests"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: "Internal Server Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        default:
          description: "Unexpected Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /datashare/v1/{businessUnit}/{label}/dataconsumer/{dataOwnerId}/{productType}/metadata:
    get:
      tags:
      - "DataConsumer"
      summary: "Get metadata of data owner for data consumers"
      description: "Get metadata of data owner for data consumers by validating contract\
        \ via KPN"
      operationId: "Get metadata of data owner for data consumers"
      parameters:
      - name: "businessUnit"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/BusinessUnitBinding"
      - name: "label"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/LabelBinding"
      - name: "dataOwnerId"
        in: "path"
        required: true
        schema:
          type: "string"
          format: "uuid"
      - name: "productType"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/ProductTypeBinding"
      - name: "x-request-id"
        in: "header"
        description: "Unique identifier of incoming call for tracing purposes"
        schema:
          type: "string"
          format: "uuid"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsagesResponse"
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "429":
          description: "Too Many Requests"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: "Internal Server Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        default:
          description: "Unexpected Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /datashare/v1/{businessUnit}/{label}/dataconsumer/demo/{dataOwnerId}/{productType}/consumers:
    get:
      tags:
      - "DataConsumerDemo"
      summary: "Get demo data consumers"
      description: "Get all data consumers for a given customer for demo purposes.\
        \ The response is decorated with consent information for the given customer"
      operationId: "GetDemoDataConsumers"
      parameters:
      - name: "businessUnit"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/BusinessUnitBinding"
      - name: "label"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/LabelBinding"
      - name: "dataOwnerId"
        in: "path"
        required: true
        schema:
          type: "string"
          format: "uuid"
      - name: "productType"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/ProductTypeBinding"
      - name: "x-request-id"
        in: "header"
        description: "Unique identifier of incoming call for tracing purposes"
        schema:
          type: "string"
          format: "uuid"
      responses:
        "200":
          description: "OK"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DemoResponseDtoOfDemoConsumersResponse"
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: "Too Many Requests"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: "Internal Server Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        default:
          description: "Unexpected Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /datashare/v1/{businessUnit}/{label}/dataconsumer/demo/{dataOwnerId}/{productType}/setConsent:
    post:
      tags:
      - "DataConsumerDemo"
      summary: "Set demo consent"
      description: "Set consent for the given customer for demo purposes. This will\
        \ create or delete a contract in KPN FIAM depending on the consent value"
      operationId: "SetDemoConsent"
      parameters:
      - name: "businessUnit"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/BusinessUnitBinding"
      - name: "label"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/LabelBinding"
      - name: "dataOwnerId"
        in: "path"
        required: true
        schema:
          type: "string"
          format: "uuid"
      - name: "productType"
        in: "path"
        required: true
        schema:
          $ref: "#/components/schemas/ProductTypeBinding"
      - name: "x-request-id"
        in: "header"
        description: "Unique identifier of incoming call for tracing purposes"
        schema:
          type: "string"
          format: "uuid"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SetDemoConsentRequest"
        required: true
      responses:
        "400":
          description: "Bad Request"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "401":
          description: "Unauthorized"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: "Not Found"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "415":
          description: "Unsupported Media Type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: "Too Many Requests"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: "Internal Server Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        default:
          description: "Unexpected Error"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    BusinessUnitBinding:
      enum:
      - "nl"
      - "be"
      - "uk"
      type: "object"
      properties:
        value:
          $ref: "#/components/schemas/BusinessUnit"
    LabelBinding:
      enum:
      - "default"
      - "eneco"
      - "oxxio"
      - "woonenergie"
      type: "object"
      properties:
        value:
          $ref: "#/components/schemas/Label"
    ProductTypeBinding:
      enum:
      - "heat"
      type: "object"
      properties:
        value:
          $ref: "#/components/schemas/ProductType"
    UsagesResponse:
      required:
      - "startDate"
      - "endDate"
      - "usageChannels"
      type: "object"
      properties:
        startDate:
          type: "string"
          format: "date-time"
        endDate:
          type: "string"
          format: "date-time"
        usageChannels:
          type: "array"
          items:
            $ref: "#/components/schemas/UsageChannel"
    ProblemDetails:
      type: "object"
      properties:
        type:
          type: "string"
          nullable: true
        title:
          type: "string"
          nullable: true
        status:
          pattern: "^-?(?:0|[1-9]\\d*)$"
          format: "int32"
          nullable: true
        detail:
          type: "string"
          nullable: true
        instance:
          type: "string"
          nullable: true
    ErrorResponse:
      type: "object"
      properties:
        errors:
          type: "array"
          items:
            type: "object"
            properties:
              code:
                type: "string"
              message:
                type: "string"
    DemoResponseDtoOfDemoConsumersResponse:
      required:
      - "data"
      type: "object"
      properties:
        data:
          type: "object"
          oneOf:
          - $ref: "#/components/schemas/DemoConsumersResponse"
          nullable: true
    SetDemoConsentRequest:
      required:
      - "consumerId"
      - "isConsent"
      type: "object"
      properties:
        consumerId:
          type: "string"
        isConsent:
          type: "boolean"
    BusinessUnit:
      enum:
      - "nl"
      - "be"
      - "uk"
    Label:
      enum:
      - "default"
      - "eneco"
      - "oxxio"
      - "woonenergie"
    ProductType:
      enum:
      - "heat"
    UsageChannel:
      required:
      - "channelId"
      - "unit"
      - "usageRecords"
      type: "object"
      properties:
        channelId:
          type: "string"
        unit:
          $ref: "#/components/schemas/Units"
        usageRecords:
          type: "array"
          items:
            $ref: "#/components/schemas/UsageRecord"
    DemoConsumersResponse:
      required:
      - "consumers"
      type: "object"
      properties:
        consumers:
          type: "array"
          items:
            $ref: "#/components/schemas/DemoConsumerResponse"
    Units:
      enum:
      - "Centigrade"
      - "KiloWattHour"
      - "CubicMeter"
    UsageRecord:
      required:
      - "amount"
      - "timestamp"
      type: "object"
      properties:
        amount:
          pattern: "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"
          format: "double"
        timestamp:
          type: "string"
          format: "date-time"
    DemoConsumerResponse:
      required:
      - "name"
      - "consumerId"
      - "isConsent"
      type: "object"
      properties:
        name:
          type: "string"
        consumerId:
          type: "string"
        isConsent:
          type: "boolean"
  securitySchemes:
    apikey:
      type: "apiKey"
      description: "Apigee API key"
      name: "apikey"
      in: "header"
security:
- apikey: []