openapi: 3.2.0 info: title: Virtual Calculations API version: 1.0.0 description: 'The Virtual Calculations API lets market participants manage shared-production virtual calculations on behalf of end customers, and read versions of virtual calculations of any template type.' servers: - url: https://api.elhub.no description: Server tags: - name: Virtual Calculations paths: /settlement/v0/virtual-calculations/{udcId}: get: operationId: getVirtualCalculation tags: - Virtual Calculations summary: Get virtual calculation by id description: 'Retrieves a single virtual calculation by its UDC id. Use the `include` query parameter to side-load related `versions` and/or `party` resources. **Path:** `GET /settlement/v0/virtual-calculations/{udcId}`' parameters: - name: udcId in: path description: The UUID of the virtual calculation. required: true schema: type: string example: 9348adce-4574-4009-9af9-5b11ddc0259f - name: SenderGLN in: header description: GLN identifying the party making the request. required: true schema: type: string example: '7080000000001' - name: OnBehalfOfGLN in: header description: GLN of the grid owner the request is made on behalf of. Required when the token was issued with the `elhub:serviceprovider` scope, ignored otherwise. schema: type: string example: '7080000000002' - name: include in: query description: 'Comma-separated list of related resources to include. Supported values: `versions`, `party`.' schema: type: string example: versions,party responses: '200': description: A JSON:API document containing the requested virtual calculation, with optional included `versions` and/or `party` resources. content: application/vnd.api+json: schema: $ref: '#/components/schemas/VirtualCalculationGetResponse' examples: default: summary: A single virtual calculation value: data: type: VirtualCalculation id: 9348adce-4574-4009-9af9-5b11ddc0259f attributes: udcId: 9348adce-4574-4009-9af9-5b11ddc0259f name: Solpark Vest description: Shared production for Solpark Vest residents managingParty: '7080000000001' partyType: GridOwner '400': description: 'Invalid request: malformed query parameter or missing required headers.' content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: MISSING_SENDER_GLN_HEADER: summary: Required header 'SenderGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_SENDER_GLN_HEADER title: MISSING_SENDER_GLN_HEADER detail: Required header 'SenderGLN' is missing. MISSING_ON_BEHALF_OF_GLN_HEADER: summary: Required header 'OnBehalfOfGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_ON_BEHALF_OF_GLN_HEADER title: MISSING_ON_BEHALF_OF_GLN_HEADER detail: Required header 'OnBehalfOfGLN' is missing. 400 Bad Request: summary: Did not understand the request value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: 400 Bad Request title: 400 Bad Request detail: Did not understand the request '404': description: The requested virtual calculation was not found. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: VIRTUAL_CALCULATION_NOT_FOUND: summary: Cannot find Virtual Calculation with id {udcId} value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '404' code: VIRTUAL_CALCULATION_NOT_FOUND title: VIRTUAL_CALCULATION_NOT_FOUND detail: Cannot find Virtual Calculation with id {udcId} '401': description: Missing or invalid authentication credentials. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Unauthorized: summary: Authentication failed. The provided token may be expired, invalid, or missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: Unauthorized title: Unauthorized detail: Authentication failed. The provided token may be expired, invalid, or missing. FAILED_AUTHORIZATION_EXCEPTION: summary: Missing or invalid authentication credentials. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: FAILED_AUTHORIZATION_EXCEPTION title: FAILED_AUTHORIZATION_EXCEPTION detail: Missing or invalid authentication credentials. '403': description: The token does not grant access to the requested resource (failed scope check or PDP denial). content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Forbidden: summary: The authenticated caller does not have sufficient access to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: Forbidden title: Forbidden detail: The authenticated caller does not have sufficient access to perform this action. INVALID_TOKEN_SCOPE: summary: The token scope is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_SCOPE title: INVALID_TOKEN_SCOPE detail: The token scope is not authorized to perform this action. INVALID_TOKEN_TYPE: summary: The token type used is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_TYPE title: INVALID_TOKEN_TYPE detail: The token type used is not authorized to perform this action. UNVERIFIED_SENDER: summary: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNVERIFIED_SENDER title: UNVERIFIED_SENDER detail: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. UNAUTHORIZED_METERING_POINTS: summary: The authenticated caller is not authorized to access one or more of the specified metering points. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNAUTHORIZED_METERING_POINTS title: UNAUTHORIZED_METERING_POINTS detail: The authenticated caller is not authorized to access one or more of the specified metering points. '429': description: Per-client rate limit exceeded. Retry after the period indicated by the `Retry-After` header. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: '429': summary: Too many requests. Wait for {retryAfter} seconds. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '429' code: '429' title: Too Many Requests detail: Too many requests. Wait for {retryAfter} seconds. '500': description: An unexpected error occurred while processing the request. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: 500 Internal Server Error: summary: An unexpected error occurred while processing the request. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '500' code: 500 Internal Server Error title: 500 Internal Server Error detail: An unexpected error occurred while processing the request. security: - maskinporten: [] /settlement/v0/virtual-calculations: post: operationId: createVirtualCalculation tags: - Virtual Calculations summary: Create a virtual calculation description: 'Creates a new virtual calculation owned by the calling party (`SenderGLN`). The request body `data.type` must be `VirtualCalculation`. The response is the created resource with HTTP 201 Created. **No version is created** — add versions via `POST /settlement/v0/virtual-calculations/{udcId}/versions`. **Path:** `POST /settlement/v0/virtual-calculations`' parameters: - name: SenderGLN in: header description: GLN identifying the party making the request. required: true schema: type: string example: '7080000000001' - name: OnBehalfOfGLN in: header description: GLN of the grid owner the request is made on behalf of. Required when the token was issued with the `elhub:serviceprovider` scope, ignored otherwise. schema: type: string example: '7080000000002' requestBody: description: 'A JSON:API document with the new virtual calculation attributes. Required: `name` (max 50 chars), `partyType`. Optional: `description` (max 100 chars).' content: application/vnd.api+json: schema: $ref: '#/components/schemas/VirtualCalculationPostRequestDto' examples: default: summary: Create a virtual calculation value: data: type: VirtualCalculation attributes: name: Solpark Vest description: Shared production for Solpark Vest residents partyType: GridOwner required: true responses: '201': description: The newly created virtual calculation as a JSON:API document. content: application/vnd.api+json: schema: $ref: '#/components/schemas/VirtualCalculationGetResponse' examples: default: summary: A newly created virtual calculation value: data: type: VirtualCalculation id: 9348adce-4574-4009-9af9-5b11ddc0259f attributes: udcId: 9348adce-4574-4009-9af9-5b11ddc0259f name: Solpark Vest description: Shared production for Solpark Vest residents managingParty: '7080000000001' partyType: GridOwner '400': description: 'Invalid request: wrong JSON:API type, missing required headers, or malformed body.' content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: MISSING_SENDER_GLN_HEADER: summary: Required header 'SenderGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_SENDER_GLN_HEADER title: MISSING_SENDER_GLN_HEADER detail: Required header 'SenderGLN' is missing. MISSING_ON_BEHALF_OF_GLN_HEADER: summary: Required header 'OnBehalfOfGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_ON_BEHALF_OF_GLN_HEADER title: MISSING_ON_BEHALF_OF_GLN_HEADER detail: Required header 'OnBehalfOfGLN' is missing. INVALID_DATA_TYPE: summary: 'Invalid type: {type}, expected: {expectedType}' value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: INVALID_DATA_TYPE title: INVALID_DATA_TYPE detail: 'Invalid type: {type}, expected: {expectedType}' DESERIALIZATION_ERROR: summary: The request body could not be deserialized. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: DESERIALIZATION_ERROR title: DeserializationError detail: The request body could not be deserialized. '415': description: Unsupported request content type. Only JSON:API request bodies are accepted. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: UNSUPPORTED_MEDIA_TYPE: summary: The request content type must be application/vnd.api+json. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '415' code: UNSUPPORTED_MEDIA_TYPE title: UNSUPPORTED_MEDIA_TYPE detail: The request content type must be application/vnd.api+json. '401': description: Missing or invalid authentication credentials. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Unauthorized: summary: Authentication failed. The provided token may be expired, invalid, or missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: Unauthorized title: Unauthorized detail: Authentication failed. The provided token may be expired, invalid, or missing. FAILED_AUTHORIZATION_EXCEPTION: summary: Missing or invalid authentication credentials. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: FAILED_AUTHORIZATION_EXCEPTION title: FAILED_AUTHORIZATION_EXCEPTION detail: Missing or invalid authentication credentials. '403': description: The token does not grant access to the requested resource (failed scope check or PDP denial). content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Forbidden: summary: The authenticated caller does not have sufficient access to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: Forbidden title: Forbidden detail: The authenticated caller does not have sufficient access to perform this action. INVALID_TOKEN_SCOPE: summary: The token scope is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_SCOPE title: INVALID_TOKEN_SCOPE detail: The token scope is not authorized to perform this action. INVALID_TOKEN_TYPE: summary: The token type used is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_TYPE title: INVALID_TOKEN_TYPE detail: The token type used is not authorized to perform this action. UNVERIFIED_SENDER: summary: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNVERIFIED_SENDER title: UNVERIFIED_SENDER detail: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. UNAUTHORIZED_METERING_POINTS: summary: The authenticated caller is not authorized to access one or more of the specified metering points. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNAUTHORIZED_METERING_POINTS title: UNAUTHORIZED_METERING_POINTS detail: The authenticated caller is not authorized to access one or more of the specified metering points. '429': description: Per-client rate limit exceeded. Retry after the period indicated by the `Retry-After` header. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: '429': summary: Too many requests. Wait for {retryAfter} seconds. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '429' code: '429' title: Too Many Requests detail: Too many requests. Wait for {retryAfter} seconds. '500': description: An unexpected error occurred while processing the request. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: 500 Internal Server Error: summary: An unexpected error occurred while processing the request. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '500' code: 500 Internal Server Error title: 500 Internal Server Error detail: An unexpected error occurred while processing the request. security: - maskinporten: [] get: operationId: listVirtualCalculations tags: - Virtual Calculations summary: List virtual calculations description: 'Retrieves a paginated list of virtual calculations the calling party (`SenderGLN`) is authorized to read. Supports filtering by name, party id, version status, template type and metering point id. Supports pagination via `page[number]` and `page[size]`. Use the `include` query parameter to side-load related `versions` and/or `party` resources. **Path:** `GET /settlement/v0/virtual-calculations`' parameters: - name: SenderGLN in: header description: GLN identifying the party making the request. required: true schema: type: string example: '7080000000001' - name: OnBehalfOfGLN in: header description: GLN of the grid owner the request is made on behalf of. Required when the token was issued with the `elhub:serviceprovider` scope, ignored otherwise. schema: type: string example: '7080000000002' - name: filter[name] in: query description: Filter by virtual calculation name (supports multiple values). schema: type: string example: My Virtual Calculation - name: filter[party-id] in: query description: Filter by managing party id (supports multiple values). schema: type: string example: '3333000000082' - name: filter[version.status] in: query description: 'Filter by version status (supports multiple values): `Draft`, `Active`, `Inactive`, `Terminated`.' schema: type: string example: Active - name: filter[version.template-type] in: query description: 'Filter by version template type (supports multiple values): `NetMetering`, `GrossMetering`, `NetConsLargeCustomer`, `SharedProduction`, `SharedConsumption`.' schema: type: string example: SharedProduction - name: filter[version.metering-point-id] in: query description: Filter by metering point id participating in a version (supports multiple values). schema: type: string example: '571234567890123456' - name: filter[require-version] in: query description: If `true`, only return virtual calculations that have at least one version. schema: type: string example: 'false' - name: page[number] in: query description: Page number for pagination (1-based). schema: type: string example: '1' - name: page[size] in: query description: Number of items per page. schema: type: string example: '20' - name: include in: query description: 'Comma-separated list of related resources to include. Supported values: `versions`, `party`.' schema: type: string example: versions,party responses: '200': description: A JSON:API document containing the page of virtual calculations, with optional included `versions` and/or `party` resources, plus pagination links and meta. content: application/vnd.api+json: schema: $ref: '#/components/schemas/VirtualCalculationListResponse' examples: default: summary: A page of virtual calculations value: data: - type: VirtualCalculation id: 9348adce-4574-4009-9af9-5b11ddc0259f attributes: udcId: 9348adce-4574-4009-9af9-5b11ddc0259f name: Solpark Vest description: Shared production for Solpark Vest residents managingParty: '7080000000001' partyType: GridOwner links: self: /settlement/v0/virtual-calculations?page[number]=1&page[size]=20 next: null prev: null meta: page: number: 1 size: 20 totalPages: 1 totalItems: 1 '400': description: 'Invalid request: malformed query parameter or missing required headers.' content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: MISSING_SENDER_GLN_HEADER: summary: Required header 'SenderGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_SENDER_GLN_HEADER title: MISSING_SENDER_GLN_HEADER detail: Required header 'SenderGLN' is missing. MISSING_ON_BEHALF_OF_GLN_HEADER: summary: Required header 'OnBehalfOfGLN' is missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: MISSING_ON_BEHALF_OF_GLN_HEADER title: MISSING_ON_BEHALF_OF_GLN_HEADER detail: Required header 'OnBehalfOfGLN' is missing. 400 Bad Request: summary: Did not understand the request value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: 400 Bad Request title: 400 Bad Request detail: Did not understand the request INVALID_PAGE: summary: 'invalid page parameter: number: {number} size: {size}' value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '400' code: INVALID_PAGE title: INVALID_PAGE detail: 'invalid page parameter: number: {number} size: {size}' '401': description: Missing or invalid authentication credentials. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Unauthorized: summary: Authentication failed. The provided token may be expired, invalid, or missing. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: Unauthorized title: Unauthorized detail: Authentication failed. The provided token may be expired, invalid, or missing. FAILED_AUTHORIZATION_EXCEPTION: summary: Missing or invalid authentication credentials. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '401' code: FAILED_AUTHORIZATION_EXCEPTION title: FAILED_AUTHORIZATION_EXCEPTION detail: Missing or invalid authentication credentials. '403': description: The token does not grant access to the requested resource (failed scope check or PDP denial). content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: Forbidden: summary: The authenticated caller does not have sufficient access to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: Forbidden title: Forbidden detail: The authenticated caller does not have sufficient access to perform this action. INVALID_TOKEN_SCOPE: summary: The token scope is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_SCOPE title: INVALID_TOKEN_SCOPE detail: The token scope is not authorized to perform this action. INVALID_TOKEN_TYPE: summary: The token type used is not authorized to perform this action. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: INVALID_TOKEN_TYPE title: INVALID_TOKEN_TYPE detail: The token type used is not authorized to perform this action. UNVERIFIED_SENDER: summary: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNVERIFIED_SENDER title: UNVERIFIED_SENDER detail: The combination of token, 'SenderGLN' and/or 'OnBehalfOfGLN' does not identify a market party allowed to act. UNAUTHORIZED_METERING_POINTS: summary: The authenticated caller is not authorized to access one or more of the specified metering points. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '403' code: UNAUTHORIZED_METERING_POINTS title: UNAUTHORIZED_METERING_POINTS detail: The authenticated caller is not authorized to access one or more of the specified metering points. '429': description: Per-client rate limit exceeded. Retry after the period indicated by the `Retry-After` header. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: '429': summary: Too many requests. Wait for {retryAfter} seconds. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '429' code: '429' title: Too Many Requests detail: Too many requests. Wait for {retryAfter} seconds. '500': description: An unexpected error occurred while processing the request. content: application/vnd.api+json: schema: $ref: '#/components/schemas/JsonApiErrorDocument' examples: 500 Internal Server Error: summary: An unexpected error occurred while processing the request. value: errors: - id: 00000000-0000-0000-0000-000000000000 status: '500' code: 500 Internal Server Error title: 500 Internal Server Error detail: An unexpected error occurred while processing the request. security: - maskinporten: [] components: schemas: JsonApiErrorDocument: type: object title: JsonApiErrorDocument required: - errors properties: errors: type: array items: $ref: '#/components/schemas/JsonApiError' OrganisationsResponseDto.Data.Attributes: type: object title: OrganisationsResponseDto.Data.Attributes required: - partyType - partyId - name - status properties: partyType: type: string partyId: type: string name: type: string status: type: string VersionResponseAttributesDto: type: object title: VersionResponseAttributesDto required: - versionNumber - participants - status - template - settlementLevel - resolution - recipientFormulaType - contributorFormulaType - startDate properties: versionNumber: type: integer participants: type: array items: $ref: '#/components/schemas/VersionParticipantResponseDto' status: type: string enum: - Draft - Active template: type: string enum: - NetMetering - GrossMetering - NetConsLargeCustomer - SharedProduction - SharedConsumption settlementLevel: type: string enum: - Contributor - Totalizer - Participant resolution: type: string format: duration recipientFormulaType: type: string enum: - EquallyDistributed - ConsumptionBased - Manual contributorFormulaType: type: string enum: - EquallyDistributed - ProductionBased - Manual - NoDistribution startDate: type: string format: date endDate: type: - string - 'null' format: date VirtualCalculationIncluded: type: object title: VirtualCalculationIncluded oneOf: - $ref: '#/components/schemas/VirtualCalculationIncluded.OrgIncluded' - $ref: '#/components/schemas/VirtualCalculationIncluded.VersionIncluded' discriminator: propertyName: type mapping: Party: '#/components/schemas/VirtualCalculationIncluded.OrgIncluded' Version: '#/components/schemas/VirtualCalculationIncluded.VersionIncluded' VirtualCalculationResourceData: type: object title: VirtualCalculationResourceData required: - type - id - attributes properties: type: type: string id: type: string attributes: $ref: '#/components/schemas/VirtualCalculationResponseAttributes' relationships: $ref: '#/components/schemas/VirtualCalculationRelationships' JsonApiDocumentLinks: type: - object - 'null' title: JsonApiDocumentLinks properties: self: type: - string - 'null' first: type: - string - 'null' prev: type: - string - 'null' next: type: - string - 'null' last: type: - string - 'null' VersionRelationships: type: - object - 'null' title: VersionRelationships required: - virtualCalculation - meteringPoints properties: virtualCalculation: $ref: '#/components/schemas/JsonApiToOneRelationship' meteringPoints: $ref: '#/components/schemas/JsonApiToManyRelationship' JsonElement: type: object title: JsonElement JsonApiToManyRelationship: type: object title: JsonApiToManyRelationship required: - data properties: data: type: array items: $ref: '#/components/schemas/JsonApiResourceIdentifier' JsonApiError: type: object title: JsonApiError properties: id: type: - string - 'null' status: type: - string - 'null' code: type: - string - 'null' title: type: - string - 'null' detail: type: - string - 'null' meta: type: - object - 'null' additionalProperties: $ref: '#/components/schemas/JsonElement' PageMeta.PageInfo: type: object title: PageMeta.PageInfo required: - number - size properties: number: type: integer size: type: integer PageMeta: type: - object - 'null' title: PageMeta required: - page - total properties: page: $ref: '#/components/schemas/PageMeta.PageInfo' total: $ref: '#/components/schemas/PageMeta.TotalInfo' PageMeta.TotalInfo: type: object title: PageMeta.TotalInfo required: - pages - items properties: pages: type: integer items: type: integer VirtualCalculationIncluded.OrgIncluded: type: object title: VirtualCalculationIncluded.OrgIncluded required: - type - id - attributes properties: type: type: string enum: - Party id: type: string attributes: $ref: '#/components/schemas/OrganisationsResponseDto.Data.Attributes' JsonApiToOneRelationship: type: object title: JsonApiToOneRelationship properties: data: $ref: '#/components/schemas/JsonApiResourceIdentifier' JsonApiResourceIdentifier: type: object title: JsonApiResourceIdentifier required: - type - id properties: type: type: string id: type: string VirtualCalculationPostRequestDto: type: object title: VirtualCalculationPostRequestDto required: - data properties: data: $ref: '#/components/schemas/VirtualCalculationPostDataDto' VersionParticipantResponseDto: type: object title: VersionParticipantResponseDto required: - meteringPointId - role - channelType properties: meteringPointId: type: string role: type: string enum: - Contributor - Recipient - Totalizer share: type: - number - 'null' channelType: type: string enum: - EH.ELECTRIC.KWH.1.3 - EH.ELECTRIC.KWH.1.32 - EH.ELECTRIC.KWH.1.4 - EH.ELECTRIC.KWH.1.7 - EH.ELECTRIC.KWH.1.8 - EH.ELECTRIC.KWH.1.9 - EH.ELECTRIC.KWH.1.10 - EH.ELECTRIC.KWH.1.11 - EH.ELECTRIC.KWH.1.12 - EH.ELECTRIC.KWH.11.1 - EH.ELECTRIC.KWH.11.2 - EH.ELECTRIC.KWH.11.3 - EH.ELECTRIC.KWH.11.4 - EH.ELECTRIC.KWH.11.5 - EH.ELECTRIC.KWH.11.6 - EH.ELECTRIC.KWH.11.7 - EH.ELECTRIC.KWH.11.8 VirtualCalculationRelationships: type: - object - 'null' title: VirtualCalculationRelationships required: - party properties: party: $ref: '#/components/schemas/JsonApiToOneRelationship' versions: $ref: '#/components/schemas/JsonApiToManyRelationship' VirtualCalculationPostAttributesDto: type: object title: VirtualCalculationPostAttributesDto required: - name - partyType properties: name: type: string description: type: - string - 'null' partyType: type: string VirtualCalculationResponseAttributes: type: object title: VirtualCalculationResponseAttributes required: - udcId - name - managingParty - partyType properties: udcId: type: string format: uuid name: type: string description: type: - string - 'null' managingParty: type: string partyType: type: string VirtualCalculationIncluded.VersionIncluded: type: object title: VirtualCalculationIncluded.VersionIncluded required: - type - id - attributes properties: type: type: string enum: - Version id: type: string attributes: $ref: '#/components/schemas/VersionResponseAttributesDto' relationships: $ref: '#/components/schemas/VersionRelationships' VirtualCalculationGetResponse: type: object title: VirtualCalculationGetResponse required: - data properties: data: $ref: '#/components/schemas/VirtualCalculationResourceData' included: type: - array - 'null' items: $ref: '#/components/schemas/VirtualCalculationIncluded' links: $ref: '#/components/schemas/JsonApiDocumentLinks' VirtualCalculationPostDataDto: type: object title: VirtualCalculationPostDataDto required: - type - attributes properties: type: type: string attributes: $ref: '#/components/schemas/VirtualCalculationPostAttributesDto' VirtualCalculationListResponse: type: object title: VirtualCalculationListResponse required: - data properties: data: type: array items: $ref: '#/components/schemas/VirtualCalculationResourceData' included: type: - array - 'null' items: $ref: '#/components/schemas/VirtualCalculationIncluded' links: $ref: '#/components/schemas/JsonApiDocumentLinks' meta: $ref: '#/components/schemas/PageMeta' securitySchemes: maskinporten: scheme: bearer bearerFormat: JWT description: 'Maskinporten access token. Obtain a token from Maskinporten using your client credentials, then submit it as `Authorization: Bearer `. See https://docs.digdir.no/docs/Maskinporten/maskinporten_overordnet for details.' type: http