openapi: 3.1.0
info:
  title: api-datawarehousereader
  contact: {}
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: "5.7"
servers:
- url: http://localhost:53033
  description: Generated server url
tags:
- name: Measurement
  description: Measurement operations
- name: Installed base
  description: Installed base operations
- name: Agreement
  description: Agreement operations
- name: Customer
  description: Customer operations
- name: Invoice
  description: Invoice operations
paths:
  /{municipalityId}/measurements/{category}/{aggregateOn}:
    get:
      tags:
      - Measurement
      summary: Get measurement information
      description: Resource returns measurement data matching provided search parameters
      operationId: getMeasurements
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: category
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/Category"
      - name: aggregateOn
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/Aggregation"
      - name: partyId
        in: query
        description: PartyId (e.g. a personId or an organizationId)
        required: false
        schema:
          type: string
          description: PartyId (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
      - name: facilityIds
        in: query
        description: Facility id (one or more)
        required: false
        schema:
          type: array
          description: Facility id (one or more)
          examples:
          - 735999109151401011
          items:
            type: string
            description: Facility id (one or more)
            examples:
            - "735999109151401011"
      - name: fromDateTime
        in: query
        description: "Date and time for oldest measurement point to return. Format\
          \ is yyyy-MM-dd'T'HH:mm:ss.SSSXXX, for example '2000-10-31T01:30:00.000-05:00'"
        required: false
        schema:
          type: string
          format: date-time
          description: "Date and time for oldest measurement point to return. Format\
            \ is yyyy-MM-dd'T'HH:mm:ss.SSSXXX, for example '2000-10-31T01:30:00.000-05:00'"
      - name: toDateTime
        in: query
        description: "Date and time for youngest measurement point to return. Format\
          \ is yyyy-MM-dd'T'HH:mm:ss.SSSXXX, for example '2000-10-31T01:30:00.000-05:00'"
        required: false
        schema:
          type: string
          format: date-time
          description: "Date and time for youngest measurement point to return. Format\
            \ is yyyy-MM-dd'T'HH:mm:ss.SSSXXX, for example '2000-10-31T01:30:00.000-05:00'"
      - name: display
        in: query
        description: Display mode for aggregated series
        required: false
        schema:
          $ref: "#/components/schemas/Display"
          description: Display mode for aggregated series
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Measurement"
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Measurement"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/invoices:
    get:
      tags:
      - Invoice
      summary: Get basic invoice information
      description: Resource returns all invoices matching provided search parameters
      operationId: getInvoices
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: customerNumber
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Customer numbers
            examples:
            - "39195"
      - name: customerType
        in: query
        required: false
        schema:
          $ref: "#/components/schemas/CustomerType"
      - name: facilityIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Facility ids
            examples:
            - "735999109151401011"
      - name: invoiceNumber
        in: query
        description: Invoice number
        required: false
        schema:
          type: integer
          format: int64
          description: Invoice number
          examples:
          - 767915994
      - name: invoiceDateFrom
        in: query
        description: Earliest invoice date. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Earliest invoice date. Format is YYYY-MM-DD.
          examples:
          - 2022-01-01
      - name: invoiceDateTo
        in: query
        description: Latest invoice date. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Latest invoice date. Format is YYYY-MM-DD.
          examples:
          - 2022-01-31
      - name: invoiceName
        in: query
        description: Invoice name
        required: false
        schema:
          type: string
          description: Invoice name
          examples:
          - 765801493.pdf
      - name: invoiceType
        in: query
        description: Invoice type
        required: false
        schema:
          type: string
          description: Invoice type
          examples:
          - Faktura
      - name: invoiceStatus
        in: query
        description: Invoice status
        required: false
        schema:
          type: string
          description: Invoice status
          examples:
          - Skickad
      - name: ocrNumber
        in: query
        description: OCR number
        required: false
        schema:
          type: integer
          format: int64
          description: OCR number
          examples:
          - 767915994
      - name: dueDateFrom
        in: query
        description: Earliest due date. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Earliest due date. Format is YYYY-MM-DD.
          examples:
          - 2022-01-01
      - name: dueDateTo
        in: query
        description: Latest due date. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Latest due date. Format is YYYY-MM-DD.
          examples:
          - 2022-01-31
      - name: organizationGroup
        in: query
        description: Organization group
        required: false
        schema:
          type: string
          description: Organization group
          examples:
          - stadsbacken
      - name: organizationNumbers
        in: query
        description: Organization number of invoice issuer
        required: false
        schema:
          type: array
          description: Organization number of invoice issuer
          examples:
          - 5565027223
          items:
            type: string
            description: Organization number of invoice issuer
            examples:
            - "5565027223"
      - name: administration
        in: query
        description: Administration
        required: false
        schema:
          type: string
          description: Administration
          examples:
          - Sundsvall Elnät
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InvoiceResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/invoices/{organizationNumber}/{invoiceNumber}/details:
    get:
      tags:
      - Invoice
      summary: Get invoice details for invoice matching issuer of provided organization
        number and having invoice number matching provided invoice number
      operationId: getInvoiceDetails
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: organizationNumber
        in: path
        description: Organization number of invoice issuer
        required: true
        schema:
          type: string
        example: 5565027223
      - name: invoiceNumber
        in: path
        description: Invoice number
        required: true
        schema:
          type: integer
          format: int64
        example: 805137494
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/InvoiceDetail"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/invoices/customers:
    get:
      tags:
      - Invoice
      summary: Get invoices for one or more customers
      description: "Resource returns invoices matching the provided customer numbers,\
        \ optionally filtered by organization, facility id, invoice status and invoice\
        \ period"
      operationId: getInvoicesForCustomer
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: customerNumbers
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
            description: Customer numbers
            examples:
            - "123456"
          minItems: 1
      - name: organizationIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Organization id of invoice issuer
            examples:
            - "5565027223"
      - name: facilityIds
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Facility ids to filter by. A row matches if any of its facility
              ids contains a requested value
            examples:
            - "123456789012345670"
      - name: status
        in: query
        description: Invoice status
        required: false
        schema:
          type: string
          description: Invoice status
          examples:
          - Betalad
      - name: periodFrom
        in: query
        description: Earliest invoice period start. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Earliest invoice period start. Format is YYYY-MM-DD.
          examples:
          - 2025-01-01
      - name: periodTo
        in: query
        description: Latest invoice period end. Format is YYYY-MM-DD.
        required: false
        schema:
          type: string
          format: date
          description: Latest invoice period end. Format is YYYY-MM-DD.
          examples:
          - 2025-12-31
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Column to sort by
            examples:
            - periodFrom
            - periodTo
            - InvoiceDate
            - DueDate
            - InvoiceNumber
            - TotalAmount
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomerInvoiceResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/installedbase:
    get:
      tags:
      - Installed base
      summary: Get installed base information
      description: Resource returns all installed bases matching provided search parameters
      operationId: getInstalledBase
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: company
        in: query
        description: Company
        required: false
        schema:
          type: string
          description: Company
          examples:
          - Sundsvall Energi AB
      - name: customerNumber
        in: query
        description: Customer number
        required: false
        schema:
          type: string
          description: Customer number
          examples:
          - "104327"
      - name: type
        in: query
        description: Type
        required: false
        schema:
          type: string
          description: Type
          examples:
          - Fjärrvärme
      - name: facilityId
        in: query
        description: Facility id
        required: false
        schema:
          type: string
          description: Facility id
          examples:
          - "735999109270751042"
      - name: careOf
        in: query
        description: Care of address
        required: false
        schema:
          type: string
          description: Care of address
          examples:
          - Agatha Malm
      - name: street
        in: query
        description: Street
        required: false
        schema:
          type: string
          description: Street
          examples:
          - Storgatan 9
      - name: postCode
        in: query
        description: Postal code
        required: false
        schema:
          type: string
          description: Postal code
          examples:
          - "85230"
      - name: city
        in: query
        description: City
        required: false
        schema:
          type: string
          description: City
          examples:
          - Sundsvall
      - name: propertyDesignation
        in: query
        description: Property designation
        required: false
        schema:
          type: string
          description: Property designation
          examples:
          - Södermalm 1:27
      - name: lastModifiedDateFrom
        in: query
        description: Earliest date when item was last modified
        required: false
        schema:
          type: string
          format: date
          description: Earliest date when item was last modified
          examples:
          - 2022-12-31
      - name: lastModifiedDateTom
        in: query
        description: Latest date when item was last modified
        required: false
        schema:
          type: string
          format: date
          description: Latest date when item was last modified
          examples:
          - 2022-12-31
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InstalledBaseResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
      deprecated: true
  /{municipalityId}/installedbase/{partyId}:
    get:
      tags:
      - Installed base
      summary: Get installed base information by party id
      description: Resource returns installed bases for the given party id
      operationId: getInstalledBaseByPartyId
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: partyId
        in: path
        description: Party id (UUID)
        required: true
        schema:
          type: string
        example: 898B3634-A2F9-483C-8808-37F3F25CF24E
      - name: organizationIds
        in: query
        description: Comma-separated list of organization ids
        required: false
        schema:
          type: string
          description: Comma-separated list of organization ids
          examples:
          - "123456789,123456987"
      - name: date
        in: query
        description: Filter date
        required: false
        schema:
          type: string
          format: date
          description: Filter date
          examples:
          - 2025-06-01
      - name: sortBy
        in: query
        description: Column to sort by
        required: false
        schema:
          type: string
          description: Column to sort by
          examples:
          - Company
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InstalledBaseResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/installations:
    get:
      tags:
      - Installations
      summary: Get installation details
      description: Resource returns all installations matching provided search parameters
      operationId: getInstallationDetails
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: installed
        in: query
        description: Is the installation installed
        required: false
        schema:
          type: boolean
          description: Is the installation installed
          examples:
          - "true"
      - name: lastModifiedDateFrom
        in: query
        description: Earliest date when item was last modified
        required: false
        schema:
          type: string
          format: date
          description: Earliest date when item was last modified
          examples:
          - 2022-12-31
      - name: lastModifiedDateTo
        in: query
        description: Latest date when item was last modified
        required: false
        schema:
          type: string
          format: date
          description: Latest date when item was last modified
          examples:
          - 2022-12-31
      - name: category
        in: query
        description: Category
        required: false
        schema:
          $ref: "#/components/schemas/Category"
          description: Category
          examples:
          - ELECTRICITY
      - name: facilityId
        in: query
        description: Facility id
        required: false
        schema:
          type: string
          description: Facility id
          examples:
          - "735999109151401011"
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InstallationDetailsResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/customer/engagements:
    get:
      tags:
      - Customer
      summary: Get basic customer information
      description: Resource returns all customer engagements matching provided search
        parameters
      operationId: getCustomerEngagements
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: partyId
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: PartyId (e.g. a personId or an organizationId)
            examples:
            - 81471222-5798-11e9-ae24-57fa13b361e1
      - name: customerNumber
        in: query
        description: Customer number
        required: false
        schema:
          type: string
          description: Customer number
          examples:
          - "10007"
      - name: organizationNumber
        in: query
        description: Organization number for counterpart of engagement
        required: false
        schema:
          type: string
          description: Organization number for counterpart of engagement
          examples:
          - "5565027223"
      - name: organizationName
        in: query
        description: Organization name for counterpart of engagement
        required: false
        schema:
          type: string
          description: Organization name for counterpart of engagement
          examples:
          - Sundsvall Elnät
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomerEngagementResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/customer/details:
    get:
      tags:
      - Customer
      summary: Get detailed customer information
      description: Resource returns all customer details matching provided search
        parameters
      operationId: getCustomerDetails
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: partyId
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: PartyId (e.g. a personId or an organizationId)
            examples:
            - 81471222-5798-11e9-ae24-57fa13b361e1
      - name: customerEngagementOrgId
        in: query
        description: Organization id for customer engagements
        required: true
        schema:
          type: string
          description: Organization id for customer engagements
          examples:
          - "5565027225"
      - name: fromDateTime
        in: query
        description: Date and time for when to search for changes from. Format is
          yyyy-MM-dd'T'HH:mm:ss.SSSXXX. If omitted changes within the last year will
          be returned.
        required: false
        schema:
          type: string
          format: date-time
          description: Date and time for when to search for changes from. Format is
            yyyy-MM-dd'T'HH:mm:ss.SSSXXX. If omitted changes within the last year
            will be returned.
          examples:
          - 2000-10-31T01:30:00.000-05:00
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CustomerDetailsResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /{municipalityId}/agreements:
    get:
      tags:
      - Agreement
      summary: Get agreements
      description: Resource returns all agreements matching provided search parameters
      operationId: getAgreements
      parameters:
      - name: municipalityId
        in: path
        description: Municipality id
        required: true
        schema:
          type: string
        example: 2281
      - name: partyId
        in: query
        description: PartyId (e.g. a personId or an organizationId)
        required: false
        schema:
          type: string
          description: PartyId (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
      - name: customerNumber
        in: query
        description: Customer number
        required: false
        schema:
          type:
          - string
          - "null"
          description: Customer number
          examples:
          - "10007"
      - name: facilityId
        in: query
        description: Facility Id
        required: false
        schema:
          type:
          - string
          - "null"
          description: Facility Id
          examples:
          - "1223334"
      - name: category
        in: query
        required: false
        schema:
          type: array
          items:
            $ref: "#/components/schemas/Category"
      - name: billingId
        in: query
        description: Billing Id
        required: false
        schema:
          type:
          - string
          - "null"
          description: Billing Id
          examples:
          - "222333"
      - name: agreementId
        in: query
        description: Agreement Id
        required: false
        schema:
          type:
          - string
          - "null"
          description: Agreement Id
          examples:
          - "333444"
      - name: description
        in: query
        description: Description
        required: false
        schema:
          type:
          - string
          - "null"
          description: Description
          examples:
          - Avtalet avser fjärrvärme
      - name: mainAgreement
        in: query
        description: Shows if agreement is a main-agreement or not
        required: false
        schema:
          type:
          - boolean
          - "null"
          description: Shows if agreement is a main-agreement or not
          examples:
          - "true"
      - name: binding
        in: query
        description: Shows if agreement include binding or not
        required: false
        schema:
          type:
          - boolean
          - "null"
          description: Shows if agreement include binding or not
          examples:
          - "false"
      - name: bindingRule
        in: query
        description: Rule of binding if exists
        required: false
        schema:
          type:
          - string
          - "null"
          description: Rule of binding if exists
          examples:
          - 10 mån binding
      - name: placementStatus
        in: query
        description: Placement status for agreement
        required: false
        schema:
          type:
          - string
          - "null"
          description: Placement status for agreement
          examples:
          - Tillkopplad
      - name: netAreaId
        in: query
        description: Net area id for agreement
        required: false
        schema:
          type:
          - string
          - "null"
          description: Net area id for agreement
          examples:
          - SUV
      - name: siteAddress
        in: query
        description: Site address connected to the agreement
        required: false
        schema:
          type:
          - string
          - "null"
          description: Site address connected to the agreement
          examples:
          - Första gatan 2
      - name: production
        in: query
        description: Signal if the agreement is a production agreement or not (can
          be null if not applicable)
        required: false
        schema:
          type:
          - boolean
          - "null"
          description: Signal if the agreement is a production agreement or not (can
            be null if not applicable)
          examples:
          - "true"
      - name: fromDate
        in: query
        description: From-date in validity of agreement
        required: false
        schema:
          type:
          - string
          - "null"
          format: date
          description: From-date in validity of agreement
      - name: toDate
        in: query
        description: To-date in validity of agreement
        required: false
        schema:
          type:
          - string
          - "null"
          format: date
          description: To-date in validity of agreement
      - name: active
        in: query
        description: Shows if agreement is active ('fromDate' <= today and 'toDate'
          => today). Null shows both active and inactive
        required: false
        schema:
          type:
          - boolean
          - "null"
          description: Shows if agreement is active ('fromDate' <= today and 'toDate'
            => today). Null shows both active and inactive
          examples:
          - "true"
      - name: sortBy
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: The properties to sort on
            examples:
            - propertyName
      - name: sortDirection
        in: query
        description: The sort order direction
        required: false
        schema:
          $ref: "#/components/schemas/Direction"
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 1
          description: Page number
          examples:
          - 1
          minimum: 1
      - name: limit
        in: query
        description: Result size per page. Maximum allowed value is dynamically configured
        required: false
        schema:
          type: integer
          format: int32
          description: Result size per page. Maximum allowed value is dynamically
            configured
          examples:
          - 15
          minimum: 1
      responses:
        "200":
          description: OK - Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgreementResponse"
        "400":
          description: Bad request
          content:
            application/problem+json:
              schema:
                oneOf:
                - $ref: "#/components/schemas/Problem"
                - $ref: "#/components/schemas/ConstraintViolationProblem"
        "500":
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Problem"
  /api-docs:
    get:
      tags:
      - API
      summary: OpenAPI
      operationId: getApiDocs
      responses:
        "200":
          description: OK
          content:
            application/yaml:
              schema:
                type: string
      x-auth-type: None
      x-throttling-tier: Unlimited
      x-wso2-mutual-ssl: Optional
components:
  schemas:
    Problem:
      type: object
      properties:
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        type:
          type: string
          format: uri
        status:
          type: integer
          format: int32
    ConstraintViolationProblem:
      type: object
      properties:
        type:
          type: string
          format: uri
        status:
          type: integer
          format: int32
        violations:
          type: array
          items:
            $ref: "#/components/schemas/Violation"
        title:
          type: string
        detail:
          type: string
        causeAsProblem:
          $ref: "#/components/schemas/ThrowableProblem"
        instance:
          type: string
          format: uri
    ThrowableProblem:
      type: object
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
        instance:
          type: string
          format: uri
        causeAsProblem: {}
    Violation:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
    Category:
      type: string
      description: Category
      enum:
      - COMMUNICATION
      - DISTRICT_COOLING
      - DISTRICT_HEATING
      - ELECTRICITY
      - ELECTRICITY_TRADE
      - WASTE_MANAGEMENT
      - WATER
    Aggregation:
      type: string
      description: Data point aggregation granularity
      enum:
      - QUARTER
      - HOUR
      - DAY
      - MONTH
    Display:
      type: string
      description: Display mode for aggregated series
      enum:
      - AGGREGATE
      - ONLYAGGREGATED
    Measurement:
      type: object
      description: Measurement model
      properties:
        uuid:
          type: string
          description: Unique identifier for the measurement
          examples:
          - 550e8400-e29b-41d4-a716-446655440000
          readOnly: true
        customerOrgId:
          type: string
          description: Customer organization identifier
          examples:
          - "5534567890"
          readOnly: true
        facilityId:
          type: string
          description: Facility identifier
          examples:
          - "735999109151401011"
          readOnly: true
        feedType:
          type: string
          description: Type of feed
          examples:
          - Energy
          readOnly: true
        unit:
          type: string
          description: Measurement unit
          examples:
          - kWh
          readOnly: true
        usage:
          type: number
          description: Usage value
          examples:
          - 1500
          readOnly: true
        interpolation:
          type: integer
          format: int32
          description: Interpolation value indicating data quality
          examples:
          - 0
          readOnly: true
        dateAndTime:
          type: string
          format: date-time
          description: Date and time of the measurement
          examples:
          - 2024-01-15T10:30:00Z
          readOnly: true
    CustomerType:
      type: string
      description: Customer type
      enum:
      - Enterprise
      - Private
      examples:
      - Enterprise
    Direction:
      type: string
      description: The sort order direction
      enum:
      - ASC
      - DESC
      examples:
      - ASC
    Invoice:
      type: object
      description: Invoice model
      properties:
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "39195"
          readOnly: true
        customerType:
          $ref: "#/components/schemas/CustomerType"
          readOnly: true
        facilityIds:
          type: array
          description: List of facility ids
          examples:
          - 735999109151404321
          - 735999109151401234
          items:
            type: string
          readOnly: true
          uniqueItems: true
        invoiceDescriptions:
          type: array
          description: List of descriptions
          examples:
          - Fjärrvärme
          - Elnät
          items:
            type: string
          readOnly: true
          uniqueItems: true
        invoiceNumber:
          type: integer
          format: int64
          description: Invoice number
          examples:
          - 767915994
          readOnly: true
        invoiceDate:
          type: string
          format: date
          description: Invoice date
          examples:
          - 2022-01-15
          readOnly: true
        invoiceName:
          type: string
          description: invoice name
          examples:
          - 765801493.pdf
          readOnly: true
        invoiceType:
          type: string
          description: Invoice type
          examples:
          - Faktura
          readOnly: true
        invoiceStatus:
          type: string
          description: Invoice status
          examples:
          - Skickad
          readOnly: true
        ocrNumber:
          type: integer
          format: int64
          description: Ocr number
          examples:
          - 767915994
          readOnly: true
        dueDate:
          type: string
          format: date
          description: Due date
          examples:
          - 2022-01-31
          readOnly: true
        totalAmount:
          type: number
          description: Total amount
          examples:
          - 1116.0
          readOnly: true
        amountVatIncluded:
          type: number
          description: Amount included VAT
          examples:
          - 1115.62
          readOnly: true
        amountVatExcluded:
          type: number
          description: Amount excluded VAT
          examples:
          - 892.5
          readOnly: true
        vatEligibleAmount:
          type: number
          description: Amount eligible for VAT
          examples:
          - 892.5
          readOnly: true
        rounding:
          type: number
          description: Rounding
          examples:
          - 0.38
          readOnly: true
        vat:
          type: number
          description: VAT
          examples:
          - 892.5
          readOnly: true
        reversedVat:
          type: boolean
          description: Reversed VAT
          examples:
          - "false"
          readOnly: true
        currency:
          type: string
          description: Currency
          examples:
          - sek
          readOnly: true
        organizationGroup:
          type: string
          description: Organization group
          examples:
          - stadsbacken
          readOnly: true
        organizationNumber:
          type: string
          description: Organization number of invoice issuer
          examples:
          - "5565027223"
          readOnly: true
        administration:
          type: string
          description: Adminstration
          examples:
          - Sundsvall Elnät
          readOnly: true
        street:
          type: string
          description: Street
          examples:
          - Storgatan 44
          readOnly: true
        postCode:
          type: string
          description: Postal code
          examples:
          - "85230"
          readOnly: true
        city:
          type: string
          description: City
          examples:
          - Sundsvall
          readOnly: true
        careOf:
          type: string
          description: Care of address
          examples:
          - Agatha Malm
          readOnly: true
        pdfAvailable:
          type: boolean
          description: Is pdf-version of invoice available
          examples:
          - "false"
          readOnly: true
    InvoiceResponse:
      type: object
      description: Invoice response model
      properties:
        invoices:
          type: array
          items:
            $ref: "#/components/schemas/Invoice"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    PagingAndSortingMetaData:
      type: object
      description: PagingAndSortingMetaData model
      properties:
        page:
          type: integer
          format: int32
          description: Current page
          examples:
          - 5
          readOnly: true
        limit:
          type: integer
          format: int32
          description: Displayed objects per page
          examples:
          - 20
          readOnly: true
        count:
          type: integer
          format: int32
          description: Displayed objects on current page
          examples:
          - 13
          readOnly: true
        totalRecords:
          type: integer
          format: int64
          description: Total amount of hits based on provided search parameters
          examples:
          - 98
          readOnly: true
        totalPages:
          type: integer
          format: int32
          description: Total amount of pages based on provided search parameters
          examples:
          - 23
          readOnly: true
        sortBy:
          type: array
          items:
            type: string
            description: The properties to sort by
            examples:
            - property
            readOnly: true
        sortDirection:
          $ref: "#/components/schemas/Direction"
          description: The sort order direction
          examples:
          - ASC
    InvoiceDetail:
      type: object
      description: Invoice detail model
      properties:
        invoiceNumber:
          type: integer
          format: int64
          description: Invoice number
          examples:
          - 767915994
          readOnly: true
        amount:
          type: number
          description: Amount
          examples:
          - 66.97
          readOnly: true
        amountVatExcluded:
          type: number
          description: Amount excluded VAT
          examples:
          - 53.57
          readOnly: true
        vat:
          type: number
          description: VAT
          examples:
          - 13.4
          readOnly: true
        vatRate:
          type: number
          format: double
          description: VAT rate
          examples:
          - 25.0
          readOnly: true
        quantity:
          type: number
          format: double
          description: Quantity
          examples:
          - 154.39
          readOnly: true
        unit:
          type: string
          description: Unit
          examples:
          - kWh
          readOnly: true
        unitPrice:
          type: number
          description: Price per unit
          examples:
          - 0.347
          readOnly: true
        periodFrom:
          type: string
          description: Period from
          examples:
          - 2022-01-01
          readOnly: true
        periodTo:
          type: string
          description: Period to
          examples:
          - 2022-01-31
          readOnly: true
        description:
          type: string
          description: Description
          examples:
          - This is a description
          readOnly: true
        productCode:
          type: integer
          format: int32
          description: Product code
          examples:
          - 1404
          readOnly: true
        productName:
          type: string
          description: Product name
          examples:
          - Elöverföring
          readOnly: true
        organizationNumber:
          type: string
          description: Organization number of invoice issuer
          examples:
          - "5565027223"
          readOnly: true
        administration:
          type: string
          description: Administration
          examples:
          - Name of the administration
          readOnly: true
        facilityId:
          type: string
          description: Facility id
          examples:
          - "735999109151401011"
          readOnly: true
    CustomerInvoice:
      type: object
      description: Customer invoice model
      properties:
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "123456"
          readOnly: true
        customerType:
          $ref: "#/components/schemas/CustomerType"
          readOnly: true
        facilityIds:
          type: array
          description: List of facility ids
          examples:
          - 123456789012345670
          items:
            type: string
          readOnly: true
        invoiceNumber:
          type: integer
          format: int64
          description: Invoice number
          examples:
          - 123456789
          readOnly: true
        invoiceId:
          type: integer
          format: int64
          description: Invoice id
          examples:
          - 1062916396
          readOnly: true
        jointInvoiceId:
          type: integer
          format: int64
          description: Joint invoice id
          examples:
          - 123
          readOnly: true
        invoiceDate:
          type: string
          format: date
          description: Invoice date
          examples:
          - 2025-10-08
          readOnly: true
        invoiceName:
          type: string
          description: Invoice name
          examples:
          - 123456789.pdf
          readOnly: true
        invoiceType:
          type: string
          description: Invoice type
          examples:
          - Faktura
          readOnly: true
        invoiceDescription:
          type: string
          description: Invoice description
          examples:
          - El
          readOnly: true
        invoiceStatus:
          type: string
          description: Invoice status
          examples:
          - Betalad
          readOnly: true
        ocrNumber:
          type: integer
          format: int64
          description: OCR number
          examples:
          - 295334999
          readOnly: true
        dueDate:
          type: string
          format: date
          description: Due date
          examples:
          - 2025-10-28
          readOnly: true
        periodFrom:
          type: string
          format: date
          description: Invoice period start
          examples:
          - 2025-09-01
          readOnly: true
        periodTo:
          type: string
          format: date
          description: Invoice period end
          examples:
          - 2025-09-30
          readOnly: true
        totalAmount:
          type: number
          description: Total amount
          examples:
          - 1234.0
          readOnly: true
        amountVatIncluded:
          type: number
          description: Amount included VAT
          examples:
          - 1233.51
          readOnly: true
        amountVatExcluded:
          type: number
          description: Amount excluded VAT
          examples:
          - 986.81
          readOnly: true
        vatEligibleAmount:
          type: number
          description: Amount eligible for VAT
          examples:
          - 986.81
          readOnly: true
        rounding:
          type: number
          description: Rounding
          examples:
          - 0.49
          readOnly: true
        organizationGroup:
          type: string
          description: Organization group
          examples:
          - stadsbacken
          readOnly: true
        organizationNumber:
          type: string
          description: Organization number of invoice issuer
          examples:
          - "5565027223"
          readOnly: true
        administration:
          type: string
          description: Administration
          examples:
          - Sundsvall Elnät
          readOnly: true
        street:
          type: string
          description: Street
          examples:
          - Ankeborgsvägen 11
          readOnly: true
        postCode:
          type: string
          description: Postal code
          examples:
          - "87654"
          readOnly: true
        city:
          type: string
          description: City
          examples:
          - Sundsvall
          readOnly: true
        careOf:
          type: string
          description: Care of address
          examples:
          - Anka Kalle
          readOnly: true
        invoiceReference:
          type: string
          description: Invoice reference
          readOnly: true
        pdfAvailable:
          type: boolean
          description: Is pdf-version of invoice available
          examples:
          - "true"
          readOnly: true
        details:
          type: array
          items:
            $ref: "#/components/schemas/InvoiceDetail"
            readOnly: true
    CustomerInvoiceResponse:
      type: object
      description: Customer invoice response model
      properties:
        invoices:
          type: array
          items:
            $ref: "#/components/schemas/CustomerInvoice"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    InstalledBaseItem:
      type: object
      description: Installed base item model
      properties:
        company:
          type: string
          description: Company
          examples:
          - Sundsvall Energi AB
          readOnly: true
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "104327"
          readOnly: true
        type:
          type: string
          description: Type
          examples:
          - Fjärrvärme
          readOnly: true
        facilityId:
          type: string
          description: Facility id
          examples:
          - "735999109270751042"
          readOnly: true
        placementId:
          type: integer
          format: int32
          description: Placement id
          examples:
          - 5263
          readOnly: true
        careOf:
          type: string
          description: Care of address
          examples:
          - Agatha Malm
          readOnly: true
        street:
          type: string
          description: Street
          examples:
          - Storgatan 9
          readOnly: true
        postCode:
          type: string
          description: Postal code
          examples:
          - "85230"
          readOnly: true
        city:
          type: string
          description: City
          examples:
          - Sundsvall
          readOnly: true
        propertyDesignation:
          type: string
          description: Property designation
          examples:
          - Södermalm 1:27
          readOnly: true
        dateFrom:
          type: string
          format: date
          description: From date
          examples:
          - 2019-01-01
          readOnly: true
        dateTo:
          type: string
          format: date
          description: To date
          examples:
          - 2022-12-31
          readOnly: true
        dateLastModified:
          type: string
          format: date
          description: Date when object was last modified (or null if never modified)
          examples:
          - 2022-12-31
          readOnly: true
        metaData:
          type: array
          items:
            $ref: "#/components/schemas/InstalledBaseItemMetaData"
            readOnly: true
          maxItems: 1000
    InstalledBaseItemMetaData:
      type: object
      description: Installed base item metadata model
      properties:
        key:
          type: string
          description: Key
          examples:
          - netarea
          readOnly: true
        value:
          type: string
          description: Value
          examples:
          - Sundsvall tätort
          readOnly: true
        type:
          type: string
          description: Type
          examples:
          - location
          readOnly: true
        displayName:
          type: string
          description: Displayname
          examples:
          - Nätområde
          readOnly: true
    InstalledBaseResponse:
      type: object
      description: Installed base response model
      properties:
        installedBase:
          type: array
          items:
            $ref: "#/components/schemas/InstalledBaseItem"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    InstallationDetails:
      type: object
      description: Installation details model
      properties:
        company:
          type: string
          description: Company
          examples:
          - Sundsvall Energi AB
          readOnly: true
        type:
          type: string
          description: Type
          examples:
          - Fjärrvärme
          readOnly: true
        facilityId:
          type: string
          description: Facility id
          examples:
          - "735999109270751042"
          readOnly: true
        placementId:
          type: integer
          format: int32
          description: Placement id
          examples:
          - 5263
          readOnly: true
        careOf:
          type: string
          description: Care of address
          examples:
          - Agatha Malm
          readOnly: true
        street:
          type: string
          description: Street
          examples:
          - Storgatan 9
          readOnly: true
        postCode:
          type: string
          description: Post code
          examples:
          - "85230"
          readOnly: true
        city:
          type: string
          description: City
          examples:
          - Sundsvall
          readOnly: true
        propertyDesignation:
          type: string
          description: Property designation
          examples:
          - Södermalm 1:27
          readOnly: true
        dateFrom:
          type: string
          format: date
          description: From date
          examples:
          - 2019-01-01
          readOnly: true
        dateTo:
          type: string
          format: date
          description: To date
          examples:
          - 2022-12-31
          readOnly: true
        dateLastModified:
          type: string
          format: date
          description: Date when object was last modified (or null if never modified)
          examples:
          - 2022-12-31
          readOnly: true
        metaData:
          type: array
          items:
            $ref: "#/components/schemas/InstallationMetaData"
            readOnly: true
          maxItems: 1000
    InstallationDetailsResponse:
      type: object
      properties:
        installationDetails:
          type: array
          items:
            $ref: "#/components/schemas/InstallationDetails"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    InstallationMetaData:
      type: object
      description: Installation metadata model
      properties:
        key:
          type: string
          description: Key
          examples:
          - netarea
          readOnly: true
        value:
          type: string
          description: Value
          examples:
          - Sundsvall tätort
          readOnly: true
        type:
          type: string
          description: Type
          examples:
          - location
          readOnly: true
        displayName:
          type: string
          description: Displayname
          examples:
          - Nätområde
          readOnly: true
    CustomerEngagement:
      type: object
      description: Customer engagement model
      properties:
        partyId:
          type: string
          description: PartyId (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
          readOnly: true
        customerType:
          $ref: "#/components/schemas/CustomerType"
          readOnly: true
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "10007"
          readOnly: true
        organizationNumber:
          type: string
          description: Organization number for counterpart of engagement
          examples:
          - "5565027223"
          readOnly: true
        organizationName:
          type: string
          description: Organization name for counterpart of engagement
          examples:
          - Sundsvall Elnät
          readOnly: true
        active:
          type: boolean
          description: "Indicates customer status, if not active then the moveInDate\
            \ holds information on when the customer will be activated"
          examples:
          - "true"
          readOnly: true
        moveInDate:
          type: string
          format: date
          description: The prospective customer's move-in date
          readOnly: true
    CustomerEngagementResponse:
      type: object
      description: Customer engagement response model
      properties:
        customerEngagements:
          type: array
          items:
            $ref: "#/components/schemas/CustomerEngagement"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    CustomerDetails:
      type: object
      description: Customer details model
      properties:
        customerEngagementOrgId:
          type: string
          description: Company with which the customer has an engagement (organization
            number)
          examples:
          - "5591962591"
          readOnly: true
        customerEngagementOrgName:
          type: string
          description: Name of the company the customer has an engagement with
          examples:
          - Sundsvall Elnät
          readOnly: true
        partyId:
          type: string
          description: PartyId (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
          readOnly: true
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "39195"
          readOnly: true
        customerName:
          type: string
          description: Customer name
          examples:
          - Sven Svensson
          readOnly: true
        street:
          type: string
          description: Street
          examples:
          - Storgatan 44
          readOnly: true
        postalCode:
          type: string
          description: Postal code
          examples:
          - "85230"
          readOnly: true
        city:
          type: string
          description: City
          examples:
          - Sundsvall
          readOnly: true
        careOf:
          type: string
          description: Care of address
          examples:
          - Agatha Malm
          readOnly: true
        phoneNumbers:
          type: array
          items:
            type: string
            description: List of phoneNumbers
            examples:
            - 076-1234567
            readOnly: true
        emails:
          type: array
          items:
            type: string
            description: List of emailAddresses
            examples:
            - test@test.se
            readOnly: true
        customerCategoryID:
          type: integer
          format: int32
          description: Customer category ID
          examples:
          - 1
          readOnly: true
        customerCategoryDescription:
          type: string
          description: Customer category description
          examples:
          - Privat
          readOnly: true
        customerChangedFlg:
          type: boolean
          description: Indicates if customer details have changed since the search
            date
          examples:
          - PRIVATE
          readOnly: true
        installedChangedFlg:
          type: boolean
          description: Indicates if placement and/or equipment details have changed
            since the search date
          examples:
          - "true"
          readOnly: true
        active:
          type: boolean
          description: "Indicates customer status, if not active then the moveInDate\
            \ holds information on when the customer will be activated"
          examples:
          - "true"
          readOnly: true
        moveInDate:
          type: string
          format: date
          description: The prospective customer's move-in date
          readOnly: true
    CustomerDetailsResponse:
      type: object
      description: Customer details response model
      properties:
        customerDetails:
          type: array
          items:
            $ref: "#/components/schemas/CustomerDetails"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
    Agreement:
      type: object
      description: Agreement model
      properties:
        partyId:
          type: string
          description: PartyId (e.g. a personId or an organizationId)
          examples:
          - 81471222-5798-11e9-ae24-57fa13b361e1
          readOnly: true
        customerNumber:
          type: string
          description: Customer number
          examples:
          - "10007"
          readOnly: true
        facilityId:
          type: string
          description: Facility Id
          examples:
          - "1223334"
          readOnly: true
        category:
          $ref: "#/components/schemas/Category"
          readOnly: true
        billingId:
          type: string
          description: Billing Id
          examples:
          - "222333"
          readOnly: true
        agreementId:
          type: string
          description: Agreement Id
          examples:
          - "333444"
          readOnly: true
        description:
          type: string
          description: Description
          examples:
          - Avtalet avser fjärrvärme
          readOnly: true
        mainAgreement:
          type: boolean
          description: Shows if agreement is a main-agreement or not
          examples:
          - "true"
          readOnly: true
        binding:
          type: boolean
          description: Shows if agreement include binding or not
          examples:
          - "false"
          readOnly: true
        bindingRule:
          type: string
          description: Rule of binding if exists
          examples:
          - 10 mån binding
          readOnly: true
        placementStatus:
          type: string
          description: Placement status for agreement
          examples:
          - Tillkopplad
          readOnly: true
        netAreaId:
          type: string
          description: Net area id for agreement
          examples:
          - SUV
          readOnly: true
        siteAddress:
          type: string
          description: Site address connected to the agreement
          examples:
          - Första gatan 2
          readOnly: true
        production:
          type: boolean
          description: Signal if the agreement is a production agreement or not (can
            be null if not applicable)
          examples:
          - "true"
          readOnly: true
        fromDate:
          type: string
          format: date
          description: From-date in validity of agreement
          readOnly: true
        toDate:
          type: string
          format: date
          description: To-date in validity of agreement
          readOnly: true
        active:
          type: boolean
          description: Shows if agreement is active ('fromDate' <= today and 'toDate'
            => today)
          examples:
          - "true"
          readOnly: true
    AgreementResponse:
      type: object
      description: Agreement response model
      properties:
        agreements:
          type: array
          items:
            $ref: "#/components/schemas/Agreement"
            readOnly: true
        _meta:
          $ref: "#/components/schemas/PagingAndSortingMetaData"
          readOnly: true
  securitySchemes: {}
