{ "openapi": "3.0.1", "info": { "title": "Eliq Data Management API", "description": "\r\n# API Reference\r\n\r\nThe Eliq data management API is organized around REST. The API accepts JSON-encoded request bodies, returns JSON-encoded responses and uses standard HTTP response codes. The URLs are all resource oriented around Eliq's three main entities; User, Location and Meter\r\n\r\n# Errors\r\n\r\nEliq Integration API uses standard HTTP response codes to indicate success or failure of a request. Codes with 2xx indicate success, 4xx indicate error due to invalid input, and 5xx indicates an error in Eliq Integration API.\r\n\r\n## Status codes\r\n\r\n*Status code* | *Description*\r\n--- | ---\r\n200 - OK | Everything worked as expected.\r\n201 - Created | Resource created.\r\n202 - Accepted | Successful request, and will be handled later. A reference id will be available in the response body.\r\n204 - No Content | Successful request. Used in successful delete requests\r\n400 - Bad Request | Request input data is invalid.\r\n401 - Unauthorized | Access token invalid for the given request. Eg. access token expired.\r\n404 - Not Found | Requested resource not found\r\n500, 502, 503, 504 | Something wrong with Eliq Integration API\r\n\r\n## Error body\r\n\r\nEliq Integration API returns an error response body on failures to provide additional information on the error. Please find the error body and description below.\r\n\r\n```json\r\n{\r\n \"code\":\"< ERROR CODE >\",\r\n \"description\":\"< DESCRIPTION OF ERROR >\",\r\n \"request_id\":\"16a3ae43-ca5f-455e-9aef-f93679bedc8d\"\r\n}\r\n```\r\n\r\n*Field* | *Type* | *Description*\r\n--- | --- | ---\r\ncode | String | Error code. Possible error codes per request can be found in each request section. Error codes do not change, and can be used to tie actions to.\r\ndescription | String | A description of the error for developers\r\nrequest_id | String | Identifier of the request. Passed when in contact with support\r\n\r\n## Request ID\r\n\r\nEach API request has an associated request id. You can find this value in the response headers, under X-Request-Id. The request id can be used in communication with Eliq support.\r\n ", "contact": { "name": "Support", "email": "support_b2b@eliq.com" }, "version": "1.5.2" }, "paths": { "/client-details/available-languages": { "get": { "tags": [ "Client details" ], "summary": "Gets available languages for the users", "operationId": "get-availablelanguages", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } }, "examples": { "Mutiple available languages": { "value": [ "nl-BE", "en-GB", "fr-FR", "de-DE" ] }, "Single available language": { "value": [ "en-GB" ] } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } }, "examples": { "Mutiple available languages": { "value": [ "nl-BE", "en-GB", "fr-FR", "de-DE" ] }, "Single available language": { "value": [ "en-GB" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{entity}/{operation}": { "post": { "tags": [ "Jobs" ], "summary": "Create job based on entity and operation and provided file", "operationId": "create-job", "parameters": [ { "name": "entity", "in": "path", "description": "Name of feature that will handle file.", "required": true, "schema": { "type": "string" }, "example": "user" }, { "name": "operation", "in": "path", "description": "Name of process used to identify if process will be upsert, delete or export data.", "required": true, "schema": { "type": "string" }, "example": "upsert" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEntry" }, "examples": { "Upsert Job": { "value": { "id": "f4e2b270-8099-493a-b733-824ce7e99fa2", "reference": "job-reference-1", "created_at_timestamp": "2026-09-06T22:06:51.2799367Z", "state_updated_at_timestamp": "2026-09-06T22:06:51.2799394Z", "entity": "user", "operation": "upsert", "state": "completed", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" } }, "Export Job": { "value": { "id": "bf5e31a5-4b70-41fb-b0f6-a8372142befc", "reference": "job-reference-2", "created_at_timestamp": "2026-09-06T22:06:51.2800022Z", "state_updated_at_timestamp": "2026-09-06T22:06:51.2800026Z", "entity": "user", "operation": "export", "state": "completed", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "export" } }, "Delete Job": { "value": { "id": "1a55f2f4-38f5-4ed0-99cb-6a389c405d1c", "reference": "job-reference-3", "created_at_timestamp": "2026-09-06T22:06:51.2800188Z", "state_updated_at_timestamp": "2026-09-06T22:06:51.280019Z", "entity": "user", "operation": "delete", "state": "completed", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "No file provided. Make sure the name in content-disposition is set to 'content' and that a filename is set": { "value": { "code": "JOB_FILE_MISSING", "description": "No file provided. Make sure the name in content-disposition is set to 'content' and that a filename is set", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The provided file is too large": { "value": { "code": "JOB_FILE_TOO_LARGE", "description": "The provided file is too large", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "No format provided for the file (file extension). Please refer to documentation for supported file formats": { "value": { "code": "JOB_FILE_FORMAT_MISSING", "description": "No format provided for the file (file extension). Please refer to documentation for supported file formats", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The file format provided is invalid. Please refer to documentation for supported file formats": { "value": { "code": "JOB_FILE_FORMAT_INVALID", "description": "The file format provided is invalid. Please refer to documentation for supported file formats", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "No filename provided (a.k.a. 'reference'). Please refer to documentation for filename limitations": { "value": { "code": "JOB_FILE_NAME_MISSING", "description": "No filename provided (a.k.a. 'reference'). Please refer to documentation for filename limitations", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The name of the file is invalid (a.k.a. 'reference'). Please refer to documentation for filename limitations": { "value": { "code": "JOB_FILE_NAME_INVALID", "description": "The name of the file is invalid (a.k.a. 'reference'). Please refer to documentation for filename limitations", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "A job is already associated with the provided file name (a.k.a. 'reference').": { "value": { "code": "JOB_REFERENCE_ALREADY_EXISTS", "description": "A job is already associated with the provided file name (a.k.a. 'reference').", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The provided entity is invalid. This may be due to that it is not yet supported": { "value": { "code": "JOB_ENTITY_INVALID", "description": "The provided entity is invalid. This may be due to that it is not yet supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The provided operation for entity is invalid. This may be due to that it is not yet supported": { "value": { "code": "JOB_OPERATION_INVALID", "description": "The provided operation for entity is invalid. This may be due to that it is not yet supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}/cancel": { "get": { "tags": [ "Jobs" ], "summary": "Cancel job before it is finished by job id", "operationId": "cancel-job", "parameters": [ { "name": "jobId", "in": "path", "description": "Job Id - Guid", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" } ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Job cancelled": { "value": "69510063-ae87-ef11-8474-000d3a3a3c76" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job is already canceled": { "value": { "code": "JOB_IS_CANCELLED", "description": "Job is already canceled", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Job is already completed": { "value": { "code": "JOB_IS_COMPLETED", "description": "Job is already completed", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Job state cannot be changed": { "value": { "code": "JOB_STATE_CANNOT_BE_CHANGED", "description": "Job state cannot be changed", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Failed to identify job state": { "value": { "code": "FAILED_TO_IDENTIFY_JOB_STATE", "description": "Failed to identify job state", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs": { "get": { "tags": [ "Jobs" ], "summary": "Get jobs based on job state, id or name reference.", "operationId": "get-jobs", "parameters": [ { "name": "after_id", "in": "query", "description": "", "schema": { "type": "string" } }, { "name": "reference", "in": "query", "description": "Reference given to job when creating it", "schema": { "type": "string" }, "example": "file-1" }, { "name": "state", "in": "query", "description": "State of job", "schema": { "type": "string" }, "example": "received" }, { "name": "limit", "in": "query", "description": "Maximum count of jobs to return, (max: 500)", "schema": { "type": "integer", "format": "int32", "default": 100 }, "example": 400 } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobEntry" } }, "examples": { "Get Jobs example": { "value": [ { "id": "69510063-ae87-ef11-8474-000d3a3a3c76", "reference": "job-reference-1", "created_at_timestamp": "2024-01-01T12:00:00Z", "state_updated_at_timestamp": "2024-01-01T13:00:00Z", "entity": "test", "operation": "upsert", "state": "queued", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" }, { "id": "d11191ef-57db-49d4-88b1-db918b674b2b", "reference": "job-reference-2", "created_at_timestamp": "2024-01-01T12:00:00Z", "state_updated_at_timestamp": "2024-01-01T13:00:00Z", "entity": "test", "operation": "upsert", "state": "canceled", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" }, { "id": "2ce5e42f-4e16-41dc-9366-379937f56aa2", "reference": "job-reference-3", "created_at_timestamp": "2024-01-01T12:00:00Z", "state_updated_at_timestamp": "2024-01-01T13:00:00Z", "entity": "test", "operation": "upsert", "state": "completed", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}": { "get": { "tags": [ "Jobs" ], "summary": "Get Job details by job id", "operationId": "get-job", "parameters": [ { "name": "jobId", "in": "path", "description": "Job Id - Guid", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobEntry" }, "examples": { "Get Job example": { "value": { "id": "69510063-ae87-ef11-8474-000d3a3a3c76", "reference": "job-reference-1", "created_at_timestamp": "2024-01-01T12:00:00Z", "state_updated_at_timestamp": "2024-01-01T13:00:00Z", "entity": "test", "operation": "upsert", "state": "completed", "number_of_rows": 10, "number_of_successful_rows": 10, "number_of_failed_rows": 0, "file_format": "ndjson", "type": "import" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The job result is not found. This may be due to that the result has been removed. Please refer to documentation for result lifetime.": { "value": { "code": "JOB_RESULT_NOT_FOUND", "description": "The job result is not found. This may be due to that the result has been removed. Please refer to documentation for result lifetime.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}/failures": { "get": { "tags": [ "Jobs" ], "summary": "Get errors and details from job.", "operationId": "get-job-failures", "parameters": [ { "name": "jobId", "in": "path", "description": "Job Id - Guid", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" }, { "name": "after_row_number", "in": "query", "description": "", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "", "schema": { "type": "integer", "format": "int32", "default": 100 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobFailedRow" } }, "examples": { "Get Job Failures example": { "value": [ { "row_number": 1, "error_code": "Error message 1", "error_description": "Error details 1" } ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}/content": { "get": { "tags": [ "Jobs" ], "summary": "Get Job content - the .ndjson file provided as the input when the Job was created.", "operationId": "get-job-content", "parameters": [ { "name": "jobId", "in": "path", "description": "Job Id - Guid", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" } ], "responses": { "200": { "description": "OK", "content": { "application/x-ndjson": { "schema": { "type": "string" }, "examples": { "Energy High Resolution Upsert": { "value": "{\"meter_id\":\"example-electricity-meter\",\"values\":[{\"interval_start\":\"2025-09-01T00:00:00Z\",\"energy_wh\":638},{\"interval_start\":\"2025-09-01T01:00:00Z\",\"energy_wh\":757}]}" }, "Location Upsert": { "value": "{\"user_id\":\"example-user-id-1\",\"id\":\"example-location-id-1\",\"address\":{\"country_code\":\"SE\",\"postal_code\":\"41537\",\"street_address\":\"Address\",\"city\":\"Gothenburg\"}}" } } } } }, "404": { "description": "Not Found", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}/result": { "get": { "tags": [ "Jobs" ], "summary": "Get Job result. Export include result object containing exported details.", "operationId": "get-job-result", "parameters": [ { "name": "jobId", "in": "path", "description": "Job Id - Guid", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" } ], "responses": { "200": { "description": "OK", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/JobResultRow" }, "examples": { "Energy Period Export": { "value": { "is_successful": true, "result": [ { "client_id": 123456789, "device_ref": "test_device_extRef", "from": "2024-10-01", "to": "2024-10-03", "energy_wh": 100.0, "is_estimated": false, "registers": [ { "id": "1", "energy_wh": 10.0 }, { "id": "2", "energy_wh": 90.0 } ] } ], "input": { "id": 1 } } }, "Energy High Resolution Export": { "value": { "is_successful": true, "result": [ { "interval_start": "2024-10-01T10:00:00Z", "energy_wh": 100.0, "is_estimated": false } ], "input": { "id": 1 } } } } } } }, "404": { "description": "Not Found", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "The job has not yet finished.": { "value": { "code": "JOB_NOT_YET_FINISHED", "description": "The job has not yet finished.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The type of the job does not support retrieval of results.": { "value": { "code": "JOB_TYPE_DOES_NOT_SUPPORT_RESULT", "description": "The type of the job does not support retrieval of results.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/jobs/{jobId}/result/{page}": { "get": { "tags": [ "Jobs" ], "summary": "Get Job result. Export include result object containing exported details.", "operationId": "get-job-result-page", "parameters": [ { "name": "jobId", "in": "path", "description": "", "required": true, "schema": { "type": "string" }, "example": "69510063-ae87-ef11-8474-000d3a3a3c76" }, { "name": "page", "in": "path", "description": "", "required": true, "schema": { "type": "integer", "format": "int32" }, "example": 1 } ], "responses": { "200": { "description": "OK", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/JobResultRow" }, "examples": { "Energy Period Export": { "value": { "is_successful": true, "result": [ { "client_id": 123456789, "device_ref": "test_device_extRef", "from": "2024-10-01", "to": "2024-10-03", "energy_wh": 100.0, "is_estimated": false, "registers": [ { "id": "1", "energy_wh": 10.0 }, { "id": "2", "energy_wh": 90.0 } ] } ], "input": { "id": 1 } } }, "Energy High Resolution Export": { "value": { "is_successful": true, "result": [ { "interval_start": "2024-10-01T10:00:00Z", "energy_wh": 100.0, "is_estimated": false } ], "input": { "id": 1 } } } } } } }, "404": { "description": "Not Found", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/x-ndjson": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "The job has not yet finished.": { "value": { "code": "JOB_NOT_YET_FINISHED", "description": "The job has not yet finished.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The type of the job does not support retrieval of results.": { "value": { "code": "JOB_TYPE_DOES_NOT_SUPPORT_RESULT", "description": "The type of the job does not support retrieval of results.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/priceformulas": { "get": { "tags": [ "Location price formulas" ], "summary": "Get location price formulas", "operationId": "get-locations-locationId-priceformulas", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } }, { "name": "fuel", "in": "query", "description": "Fuel of meter (elec, gas or district_heating) from the provided location. Optional", "schema": { "type": "string" } }, { "name": "direction", "in": "query", "description": "Type of meter (import, export). Optional", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationPriceFormula" } }, "examples": { "Location price formulas": { "value": [ { "fuel": "elec", "source": "client", "direction": "import", "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Daily charge", "type": "charge", "charge": { "resolution": "day", "charge": 1.0 } }, { "name": "Block unit rate", "type": "unit_rate", "unit_rate": { "type": "block", "block": { "resolution": "day", "register_id": "Register ID 1", "unit_rate": 1.0, "from_kwh": 0, "to_kwh": 2 } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ] } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "post": { "tags": [ "Location price formulas" ], "summary": "Create or updates a location price formula", "description": "Note! A contract for a location is unique by the from date. Adding a price formula for a location with the same from date as an already\r\nexisting price formula will overwrite the existing price formula.", "operationId": "post-locations-locationId-priceformulas", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Price formula object to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationPriceFormula" }, "examples": { "Location price formulas": { "value": { "fuel": "elec", "source": "client", "name": "Tariff", "direction": "import", "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Daily charge", "type": "charge", "charge": { "resolution": "day", "charge": 1.0 } }, { "name": "Block unit rate", "type": "unit_rate", "unit_rate": { "type": "block", "block": { "resolution": "day", "register_id": "Register ID 1", "unit_rate": 1.0, "from_kwh": 0, "to_kwh": 2 } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ] } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationPriceFormula" }, "examples": { "Location price formulas": { "value": { "fuel": "elec", "source": "client", "name": "Tariff", "direction": "import", "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Daily charge", "type": "charge", "charge": { "resolution": "day", "charge": 1.0 } }, { "name": "Block unit rate", "type": "unit_rate", "unit_rate": { "type": "block", "block": { "resolution": "day", "register_id": "Register ID 1", "unit_rate": 1.0, "from_kwh": 0, "to_kwh": 2 } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.": { "value": { "code": "PRICE_FORMULA_FROM_DATE_MISSING", "description": "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'fuel' must not be null": { "value": { "code": "PRICE_FORMULA_FUEL_MISSING", "description": "Parameter 'fuel' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'direction' must not be null": { "value": { "code": "PRICE_FORMULA_DIRECTION_MISSING", "description": "Parameter 'direction' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'to' must not be null or empty. This may be caused by incorrect format of input.": { "value": { "code": "PRICE_FORMULA_TO_DATE_MISSING", "description": "Parameter 'to' must not be null or empty. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate' must be null for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_INVALID", "description": "Parameter 'elements[].unit_rate' must be null for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge' must be null for 'elements[].type = unit_rate'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_INVALID", "description": "Parameter 'elements[].charge' must be null for 'elements[].type = unit_rate'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate' must not be null or empty for 'elements[].type = unit_rate'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_MISSING", "description": "Parameter 'elements[].unit_rate' must not be null or empty for 'elements[].type = unit_rate'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge' must not be null or empty for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_MISSING", "description": "Parameter 'elements[].charge' must not be null or empty for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,nordpool,block]' must be null for 'elements[].unit_rate.type = fixed'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_FIXED_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,nordpool,block]' must be null for 'elements[].unit_rate.type = fixed'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,fix,block]' must be null for 'elements[].unit_rate.type = nordpool'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_NORDPOOL_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,fix,block]' must be null for 'elements[].unit_rate.type = nordpool'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[block,fix,norpool]' must be null for 'elements[].unit_rate.type = tou'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_TOU_INVALID", "description": "Parameters 'elements[].unit_rate.[block,fix,norpool]' must be null for 'elements[].unit_rate.type = tou'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,fix,norpool]' must be null for 'elements[].unit_rate.type = block'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_BLOCK_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,fix,norpool]' must be null for 'elements[].unit_rate.type = block'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block' must not be null for 'elements[].unit_rate.type = block'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_MISSING", "description": "Parameters 'elements[].unit_rate.block' must not be null for 'elements[].unit_rate.type = block'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.register_id' must not be null or empty for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_REGISTER_ID_MISSING", "description": "Parameters 'elements[].unit_rate.block.register_id' must not be null or empty for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.block.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_kwh' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_FROM_KWH_MISSING", "description": "Parameters 'elements[].unit_rate.block.from_kwh' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.fixed' must not be null for 'elements[].unit_rate.type = fixed'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_FIXED_MISSING", "description": "Parameters 'elements[].unit_rate.fixed' must not be null for 'elements[].unit_rate.type = fixed'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = fixed'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_FIXED_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = fixed'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool' must not be null for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool' must not be null for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.region' must not be null for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_REGION_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool.region' must not be null for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.multiplier' must not be equal or less than 0 for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_MULTIPLIER_INVALID", "description": "Parameters 'elements[].unit_rate.nordpool.multiplier' must not be equal or less than 0 for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou' must not be null for 'elements[].unit_rate.type = tou'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_MISSING", "description": "Parameters 'elements[].unit_rate.tou' must not be null for 'elements[].unit_rate.type = tou'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.register_id' must not be null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_REGISTER_ID_MISSING", "description": "Parameters 'elements[].unit_rate.tou.register_id' must not be null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null, or equal to 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null, or equal to 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[]' must not be empty or null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_TOU_INTERVALS_MISSING", "description": "Parameters 'elements[].unit_rate.tou.intervals[]' must not be empty or null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'currency_code' must not be null or empty": { "value": { "code": "PRICE_FORMULA_CURRENCY_CODE_MISSING", "description": "Parameter 'currency_code' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'element[].name' must not be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_NAME_MISSING", "description": "Parameter 'element[].name' must not be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_FROM_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_TO_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_FROM_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_TO_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.to_kwh' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_TO_KWH_MISSING", "description": "Parameters 'elements[].unit_rate.block.to_kwh' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.region' is invalid for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_REGION_INVALID", "description": "Parameters 'elements[].unit_rate.nordpool.region' is invalid for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.charge' must not be null for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_VALUE_MISSING", "description": "Parameter 'elements[].charge.charge' must not be null for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Location price formulas" ], "summary": "Delete specific location price formula", "description": "Delete price formula with start date", "operationId": "delete-locations-locationId-priceformulas", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } }, { "name": "fuel", "in": "query", "description": "Fuel of meter (elec, gas or district_heating) from the provided location", "schema": { "type": "string" } }, { "name": "direction", "in": "query", "description": "Type of meter (import, export)", "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "Start date of the price formula", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.": { "value": { "code": "PRICE_FORMULA_FROM_DATE_MISSING", "description": "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'fuel' must not be null": { "value": { "code": "PRICE_FORMULA_FUEL_MISSING", "description": "Parameter 'fuel' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'direction' must not be null": { "value": { "code": "PRICE_FORMULA_DIRECTION_MISSING", "description": "Parameter 'direction' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula for the given 'meter_id' and 'from' date was not found.": { "value": { "code": "PRICE_FORMULA_NOT_FOUND", "description": "Price formula for the given 'meter_id' and 'from' date was not found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/priceformulas/all": { "delete": { "tags": [ "Location price formulas" ], "summary": "Delete location all price formulas", "operationId": "delete-locations-all-priceformulas", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula for the given 'meter_id' and 'from' date was not found.": { "value": { "code": "PRICE_FORMULA_NOT_FOUND", "description": "Price formula for the given 'meter_id' and 'from' date was not found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/profile/type": { "post": { "tags": [ "Location profile" ], "summary": "Set location profile type", "operationId": "set-locations-locationId-profile-type", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Location profile type object to set", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } }, "application/json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } }, "text/json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Location profile" ], "summary": "Get location profile type", "operationId": "get-locations-locationId-profile-type", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationProfileType" }, "examples": { "Location profile": { "value": { "type": "residential" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/profile": { "post": { "tags": [ "Location profile" ], "summary": "Set location profile values", "operationId": "set-locations-locationId-profile-values", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Location profile objects to create", "content": { "application/json-patch+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileValueRequest" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileValueRequest" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileValueRequest" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileValueRequest" } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileValueResponse" } }, "examples": { "Location profile": { "value": [ { "id": "00000000-0000-0000-0000-000000000000", "key": "house_type", "value": "apartment", "from": "2024-09-01T00:00:00" }, { "id": "00000000-0000-0000-0000-000000000000", "key": "living_area", "value": 450, "from": "2024-09-01T00:00:00" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key missing": { "value": { "code": "PROPERTY_KEY_MISSING", "description": "Property key missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property value missing": { "value": { "code": "PROPERTY_VALUE_MISSING", "description": "Property value missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key 'propertyKey' not found": { "value": { "code": "PROPERTY_KEY_INVALID", "description": "Property key 'propertyKey' not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid input for property 'propertyKey'": { "value": { "code": "PROPERTY_VALUE_INVALID", "description": "Invalid input for property 'propertyKey'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Key date values must be unique for a single location.": { "value": { "code": "KEY_DATE_VALUE_ALREADY_EXISTS", "description": "Key date values must be unique for a single location. Key 'propertyKey' with From 'propertyKeyFrom' already exists for the location", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Location profile" ], "summary": "Get location profile", "operationId": "get-locations-locationId-profile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationProfileSettings" }, "examples": { "Location profile": { "value": { "settings": [ { "key": "house_type", "data_type": "single_select", "possible_values": [ { "value": "apartment", "developer_description": "Apartment" }, { "value": "house_detached", "developer_description": "House - detached" }, { "value": "holiday_home", "developer_description": "Holiday home / summer house" }, { "value": "semi_detached", "developer_description": "House - semi detached" } ], "dependent_properties": [], "developer_description": "Type of dwelling", "tags": [ "required_for_euc_to_work", "required_for_sh_to_work" ], "group": "" }, { "key": "living_area", "data_type": "number", "limits": { "min": 0.0, "max": 1000.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Size of heated living space in square meters", "tags": [ "required_for_sh_to_work" ], "group": "" }, { "key": "persons", "data_type": "number", "limits": { "min": 0.0, "max": 10.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Number of people living in the home", "group": "" }, { "key": "heating_type_primary", "data_type": "single_select", "possible_values": [ { "value": "district_heating", "developer_description": "District heating" }, { "value": "radiators", "developer_description": "Electric radiators" }, { "value": "air_air_pump", "developer_description": "Air-air heat pump" }, { "value": "air_water_pump", "developer_description": "Air-water heat pump" } ], "dependent_properties": [], "developer_description": "Type of dwelling", "tags": [ "required_for_euc_to_work", "required_for_sh_to_work" ], "group": "" }, { "key": "gas_stoves", "data_type": "number", "limits": { "min": 0.0, "max": 5.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Number of gas hobs", "group": "cooking" } ], "groups": [ "cooking" ] } }, "Location profile with selected values": { "value": { "settings": [ { "key": "house_type", "data_type": "single_select", "selected_values": [ { "id": "00000000-0000-0000-0000-000000000000", "value": "semi_detached" } ], "possible_values": [ { "value": "apartment", "developer_description": "Apartment" }, { "value": "house_detached", "developer_description": "House - detached" }, { "value": "holiday_home", "developer_description": "Holiday home / summer house" }, { "value": "semi_detached", "developer_description": "House - semi detached" } ], "dependent_properties": [], "developer_description": "Type of dwelling", "tags": [ "required_for_euc_to_work", "required_for_sh_to_work" ], "group": "" }, { "key": "living_area", "data_type": "number", "selected_values": [ { "id": "00000000-0000-0000-0000-000000000000", "value": 125 } ], "limits": { "min": 0.0, "max": 1000.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Size of heated living space in square meters", "tags": [ "required_for_sh_to_work" ], "group": "" }, { "key": "persons", "data_type": "number", "selected_values": [ { "id": "00000000-0000-0000-0000-000000000000", "value": 5, "from": "2024-07-01T00:00:00" }, { "id": "00000000-0000-0000-0000-000000000000", "value": 4, "from": "2023-01-10T00:00:00" }, { "id": "00000000-0000-0000-0000-000000000000", "value": 3 } ], "limits": { "min": 0.0, "max": 10.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Number of people living in the home", "group": "" }, { "key": "heating_type_primary", "data_type": "single_select", "selected_values": [ { "id": "00000000-0000-0000-0000-000000000000", "value": "air_air_pump" } ], "possible_values": [ { "value": "district_heating", "developer_description": "District heating" }, { "value": "radiators", "developer_description": "Electric radiators" }, { "value": "air_air_pump", "developer_description": "Air-air heat pump" }, { "value": "air_water_pump", "developer_description": "Air-water heat pump" } ], "dependent_properties": [], "developer_description": "Type of dwelling", "tags": [ "required_for_euc_to_work", "required_for_sh_to_work" ], "group": "" }, { "key": "gas_stoves", "data_type": "number", "limits": { "min": 0.0, "max": 5.0, "step": 1.0 }, "dependent_properties": [], "developer_description": "Number of gas hobs", "group": "cooking" } ], "groups": [ "cooking" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/profile/{id}": { "patch": { "tags": [ "Location profile" ], "summary": "Patch location profile value", "operationId": "patch-locations-locationId-profile-value", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "Identifier for location profile value", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "description": "Location profile object to patch", "content": { "application/json-patch+json": { "schema": { "$ref": "#/components/schemas/PatchLocationProfileRequestModel" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PatchLocationProfileRequestModel" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PatchLocationProfileRequestModel" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PatchLocationProfileRequestModel" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationProfileValueResponse" }, "examples": { "Location profile": { "value": { "id": "00000000-0000-0000-0000-000000000000", "key": "house_type", "value": "apartment", "from": "2024-09-01T00:00:00" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key missing": { "value": { "code": "PROPERTY_KEY_MISSING", "description": "Property key missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property value missing": { "value": { "code": "PROPERTY_VALUE_MISSING", "description": "Property value missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key 'propertyKey' not found": { "value": { "code": "PROPERTY_KEY_INVALID", "description": "Property key 'propertyKey' not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid input for property 'propertyKey'": { "value": { "code": "PROPERTY_VALUE_INVALID", "description": "Invalid input for property 'propertyKey'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Key date values must be unique for a single location.": { "value": { "code": "KEY_DATE_VALUE_ALREADY_EXISTS", "description": "Key date values must be unique for a single location. Key 'propertyKey' with From 'propertyKeyFrom' already exists for the location", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Location profile" ], "summary": "Delete location profile", "operationId": "delete-locations-locationId-profile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing profile value with given id": { "value": { "code": "PROFILE_VALUE_NOT_FOUND", "description": "Location profile value not found for given id", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{id}": { "put": { "tags": [ "Location" ], "summary": "Creates or updates location", "operationId": "put-locations-locationId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Location object to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" }, "examples": { "Location request example with geo": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } } }, "Minimal location request example": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" }, "examples": { "Full location example with geo": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } } }, "Minimal location": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "User with given 'user_id' could not be found": { "value": { "code": "LOCATION_USER_NOT_FOUND", "description": "User with given 'user_id' could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "A location with the same id already exists for another user. A location cannot be moved between users.": { "value": { "code": "LOCATION_CANNOT_BE_MOVED", "description": "A location with the same id already exists for another user. A location cannot be moved between users.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'address.country_code' is invalid": { "value": { "code": "LOCATION_ADDRESS_COUNTRY_CODE_INVALID", "description": "Parameter 'address.country_code' is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'user_id' must not be null or empty": { "value": { "code": "LOCATION_USER_ID_MISSING", "description": "Parameter 'user_id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'address' must not be null": { "value": { "code": "LOCATION_ADDRESS_MISSING", "description": "Parameter 'address' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'address.postal_code' or 'address.city' must be provided if 'geo' is not provided": { "value": { "code": "LOCATION_ADDRESS_POSTAL_CODE_OR_CITY_MISSING", "description": "Parameter 'address.postal_code' or 'address.city' must be provided if 'geo' is not provided", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'address.country_code' must not be null or empty": { "value": { "code": "LOCATION_ADDRESS_COUNTRY_CODE_MISSING", "description": "Parameter 'address.country_code' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'geo.latitude' must not be null": { "value": { "code": "LOCATION_GEO_LATITUDE_MISSING", "description": "Parameter 'geo.latitude' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'geo.latitude' is invalid. It must be in the range between -90 and 90": { "value": { "code": "LOCATION_GEO_LATITUDE_INVALID", "description": "Parameter 'geo.latitude' is invalid. It must be in the range between -90 and 90", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'geo.longitude' must not be null": { "value": { "code": "LOCATION_GEO_LONGITUDE_MISSING", "description": "Parameter 'geo.longitude' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'geo.longitude' is invalid. It must be in the range between -180 and 180": { "value": { "code": "LOCATION_GEO_LONGITUDE_INVALID", "description": "Parameter 'geo.longitude' is invalid. It must be in the range between -180 and 180", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Spot price region with given 'spot_price_region_id' could not be found.": { "value": { "code": "LOCATION_SPOT_PRICE_REGION_NOT_FOUND", "description": "Spot price region with given 'spot_price_region_id' could not be found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Too many requests to add the same location were created, please try again later.": { "value": { "code": "EXCESSIVE_REQUESTS_FOR_THE_SAME_LOCATION", "description": "Too many requests to add the same location were created, please try again later.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location profile type must not be null, and can only be 'residential' or 'business'": { "value": { "code": "LOCATION_PROFILE_TYPE_INVALID_OR_MISSING", "description": "Location profile type must not be null, and can only be 'residential' or 'business'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Can not change profile type for a configured profile with existing values": { "value": { "code": "EXISTING_PROFILE_VALUES_FOUND", "description": "Can not change profile type for a configured profile with existing values", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location profile type is not configured": { "value": { "code": "PROFILE_TYPE_NOT_CONFIGURED", "description": "Location profile type is not configured", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Location" ], "summary": "Deletes location", "operationId": "delete-locations-locationId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Location" ], "summary": "Gets location", "operationId": "get-locations-locationId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" }, "examples": { "Full location example with geo": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } } }, "Minimal location": { "value": { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations": { "get": { "tags": [ "Location" ], "summary": "Gets multiple locations", "description": "Locations are fetched in batches of maximum 1000 locations, and returned in created date order.\r\nUsing parameters after_id and limit can be used to iterate over the full location base.\r\nParameter created_after can also be used to fetch locations after a certain date.", "operationId": "get-locations", "parameters": [ { "name": "after_id", "in": "query", "description": "Unique identifier of location, fetch locations created after location with given id", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of locations to get", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "created_after", "in": "query", "description": "Locations created after the provided date", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Location" } }, "examples": { "Get locations example": { "value": [ { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name 1", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } }, { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c475", "eliq_id": 7654321, "name": "Location name 2", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65f", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 19", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{id}/meters": { "get": { "tags": [ "Location" ], "summary": "Gets location meters", "operationId": "get-locations-locationId-meters", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Meter" } }, "examples": { "Get location meters example": { "value": [ { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": "37771a4f91e611fd80e5f08c0bdb0c8b", "location_id": "df530bba-da48-44c6-8f53-8dcb1909a65", "model": "Eliq Energy Meter", "fuel": "elec", "type": "import", "supply_start_date": "2020-01-01", "supply_end_date": "2021-01-01", "created_at_timestamp": "2021-01-01T00:00:00Z" }, { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c475", "eliq_id": "37771a4f91e611fd80e5f08c0bdb0c8b", "location_id": "df530bba-da48-44c6-8f53-8dcb1909a66", "model": "Eliq Energy Meter", "fuel": "gas", "type": "import", "supply_start_date": "2020-01-01", "supply_end_date": "2021-01-01", "created_at_timestamp": "2021-01-01T00:00:00Z" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/locations/{locationId}/homeprofile": { "get": { "tags": [ "Location home profile" ], "summary": "Get a location home profile", "operationId": "get-locations-locationId-homeprofile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HomeProfileProperty" } }, "examples": { "Location home profile": { "value": [ { "key": "house_type", "value": "house", "value_type": "String" }, { "key": "heating_type_primary", "value": "district_heating", "value_type": "String" }, { "key": "rooms", "value": 2, "value_type": "Int64" } ] }, "Location home profile not created": { "value": [] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'locationId' must not be null or empty": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } }, "deprecated": true }, "put": { "tags": [ "Location home profile" ], "summary": "Create a home profile for location", "description": "The home profile will be overwritten with the inputted values. Please make sure to provide the complete home profile before updating.\r\nAvailable home profile keys and values can be provided by Eliq, not yet available in the Data Management API. This can also be retrieved in Eliq Insights API", "operationId": "put-locations-locationId-homeprofile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Home profile object to create", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HomeProfileProperty" } }, "examples": { "Location home profile": { "value": [ { "key": "house_type", "value": "house", "value_type": "String" }, { "key": "heating_type_primary", "value": "district_heating", "value_type": "String" }, { "key": "rooms", "value": 2, "value_type": "Int64" } ] }, "Location home profile not created": { "value": [] } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HomeProfileProperty" } }, "examples": { "Location home profile": { "value": [ { "key": "house_type", "value": "house", "value_type": "String" }, { "key": "heating_type_primary", "value": "district_heating", "value_type": "String" }, { "key": "rooms", "value": 2, "value_type": "Int64" } ] } } } } }, "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HomeProfileProperty" } }, "examples": { "Location home profile": { "value": [ { "key": "house_type", "value": "house", "value_type": "String" }, { "key": "heating_type_primary", "value": "district_heating", "value_type": "String" }, { "key": "rooms", "value": 2, "value_type": "Int64" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Home profile must not be null": { "value": { "code": "HOME_PROFILE_MISSING", "description": "Home profile must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Input not supported for multiple_select. Only a list of strings is allowed and all selected values must be valid options.": { "value": { "code": "HOME_PROFILE_VALUE_INVALID", "description": "Input not supported for multiple_select. Only a list of strings is allowed and all selected values must be valid options.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Input not supported for single_select. Only a string value is allowed and it must be a valid option": { "value": { "code": "HOME_PROFILE_VALUE_INVALID", "description": "Input not supported for single_select. Only a string value is allowed and it must be a valid option", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Input not supported for number. Only a number is allowed and it must fall within the limits.": { "value": { "code": "HOME_PROFILE_VALUE_INVALID", "description": "Input not supported for number. Only a number is allowed and it must fall within the limits.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Data type {unknown_type} does not exist. Only number, single_select and multiple_select is allowed": { "value": { "code": "HOME_PROFILE_VALUE_INVALID", "description": "Data type {unknown_type} does not exist. Only number, single_select and multiple_select is allowed", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property value missing for property at index {invalidPropertyIndex} with key '{invalidProperty.Key}', check if all properties has key and value": { "value": { "code": "HOME_PROFILE_VALUE_MISSING", "description": "Property value missing for property at index {invalidPropertyIndex} with key '{invalidProperty.Key}', check if all properties has key and value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "No such property found: '{property.Key}'": { "value": { "code": "HOME_PROFILE_KEY_INVALID", "description": "No such property found: '{property.Key}'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key missing": { "value": { "code": "HOME_PROFILE_KEY_MISSING", "description": "Property key missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Property key missing for property at index {invalidPropertyIndex} with value '{invalidProperty.Value}', check if all properties has key and value": { "value": { "code": "HOME_PROFILE_KEY_MISSING", "description": "Property key missing for property at index {invalidPropertyIndex} with value '{invalidProperty.Value}', check if all properties has key and value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } }, "deprecated": true }, "delete": { "tags": [ "Location home profile" ], "summary": "Delete all location home profile elements", "operationId": "delete-locations-locationId-homeprofile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Home profile must not be null": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } }, "deprecated": true }, "post": { "tags": [ "Location home profile" ], "summary": "Update a property of location home profile", "operationId": "post-locations-locationId-homeprofile", "parameters": [ { "name": "locationId", "in": "path", "description": "Unique identifier of location", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Home profile property to update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HomeProfileProperty" } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OkObjectResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Home profile must not be null": { "value": { "code": "LOCATION_ID_MISSING", "description": "Parameter 'locationId' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing value": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } }, "deprecated": true } }, "/meters/{meterId}/priceformulas": { "get": { "tags": [ "Meter Price Formulas" ], "summary": "Get price formulas for a meter by meter external reference.", "operationId": "get-meter-meterid-price-formulas", "parameters": [ { "name": "meterId", "in": "path", "description": "External meter id", "required": true, "schema": { "type": "string" }, "example": "abc123" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PriceFormula" } }, "examples": { "Price formulas": { "value": [ { "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Time of use", "type": "unit_rate", "unit_rate": { "type": "tou", "tou": { "register_id": "1", "unit_rate": 1.0, "intervals": [ { "from_minute": 0, "to_minute": 60 } ] } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ], "energy_unit": "kwh" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.": { "value": { "code": "PRICE_FORMULA_METER_NOT_FOUND", "description": "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "post": { "tags": [ "Meter Price Formulas" ], "summary": "Add or update a price formula for a meter by meter external reference.", "operationId": "add-or-update-meter-price-formulas", "parameters": [ { "name": "meterId", "in": "path", "description": "External meter id", "required": true, "schema": { "type": "string" }, "example": "abc123" } ], "requestBody": { "description": "Price formula cbject containing all needed details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceFormula" }, "examples": { "Price formula": { "value": { "name": "Tariff", "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Time of use", "type": "unit_rate", "unit_rate": { "type": "tou", "tou": { "register_id": "1", "unit_rate": 1.0, "intervals": [ { "from_minute": 0, "to_minute": 60 } ] } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ], "energy_unit": "kwh" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceFormula" }, "examples": { "Price formula": { "value": { "name": "Tariff", "from": "2024-01-01", "to": "2024-12-31", "currency_code": "SEK", "elements": [ { "name": "Time of use", "type": "unit_rate", "unit_rate": { "type": "tou", "tou": { "register_id": "1", "unit_rate": 1.0, "intervals": [ { "from_minute": 0, "to_minute": 60 } ] } } }, { "name": "Fixed unit rate", "type": "unit_rate", "unit_rate": { "type": "fixed", "fixed": { "unit_rate": 1.0 } } } ], "energy_unit": "kwh" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements' must not be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENTS_MISSING", "description": "Parameter 'elements' must not be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.": { "value": { "code": "PRICE_FORMULA_FROM_DATE_MISSING", "description": "Parameter 'from' must not be null or empty. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'to' must not be null or empty. This may be caused by incorrect format of input.": { "value": { "code": "PRICE_FORMULA_TO_DATE_MISSING", "description": "Parameter 'to' must not be null or empty. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' must not be in the same date or after parameter 'to'.": { "value": { "code": "PRICE_FORMULA_FROM_DATE_INVALID", "description": "Parameter 'from' must not be in the same date or after parameter 'to'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula cannot be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate' must be null for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_INVALID", "description": "Parameter 'elements[].unit_rate' must be null for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge' must be null for 'elements[].type = unit_rate'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_INVALID", "description": "Parameter 'elements[].charge' must be null for 'elements[].type = unit_rate'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate' must not be null or empty for 'elements[].type = unit_rate'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_MISSING", "description": "Parameter 'elements[].unit_rate' must not be null or empty for 'elements[].type = unit_rate'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge' must not be null or empty for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_MISSING", "description": "Parameter 'elements[].charge' must not be null or empty for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,nordpool,block]' must be null for 'elements[].unit_rate.type = fixed'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_FIXED_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,nordpool,block]' must be null for 'elements[].unit_rate.type = fixed'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,fix,block]' must be null for 'elements[].unit_rate.type = nordpool'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_NORDPOOL_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,fix,block]' must be null for 'elements[].unit_rate.type = nordpool'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,fix,norpool]' must be null for 'elements[].unit_rate.type = block'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_BLOCK_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,fix,norpool]' must be null for 'elements[].unit_rate.type = block'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[block,fix,norpool]' must be null for 'elements[].unit_rate.type = tou'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_TOU_INVALID", "description": "Parameters 'elements[].unit_rate.[block,fix,norpool]' must be null for 'elements[].unit_rate.type = tou'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block' must not be null for 'elements[].unit_rate.type = block'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_MISSING", "description": "Parameters 'elements[].unit_rate.block' must not be null for 'elements[].unit_rate.type = block'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.register_id' must not be null or empty for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_REGISTER_ID_MISSING", "description": "Parameters 'elements[].unit_rate.block.register_id' must not be null or empty for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.block.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_kwh' cannot be equal or bigger 'elements[].unit_rate.block.to_kwh' for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_FROM_KWH_INVALID", "description": "Parameters 'elements[].unit_rate.block.from_kwh' cannot be equal or bigger 'elements[].unit_rate.block.to_kwh' for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.fixed' must not be null for 'elements[].unit_rate.type = fixed'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_FIXED_MISSING", "description": "Parameters 'elements[].unit_rate.fixed' must not be null for 'elements[].unit_rate.type = fixed'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = fixed'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_FIXED_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be equal to 0 for 'elements[].unit_rate.type = fixed'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool' must not be null for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool' must not be null for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.region' must not be null for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_REGION_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool.region' must not be null for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.multiplier' must not be equal or less than 0 for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_MULTIPLIER_INVALID", "description": "Parameters 'elements[].unit_rate.nordpool.multiplier' must not be equal or less than 0 for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou' must not be null for 'elements[].unit_rate.type = tou'": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_MISSING", "description": "Parameters 'elements[].unit_rate.tou' must not be null for 'elements[].unit_rate.type = tou'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.register_id' must not be null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_REGISTER_ID_MISSING", "description": "Parameters 'elements[].unit_rate.tou.register_id' must not be null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null, or equal to 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_VALUE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null, or equal to 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[]' must not be empty or null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_TOU_INTERVALS_MISSING", "description": "Parameters 'elements[].unit_rate.tou.intervals[]' must not be empty or null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'currency_code' must not be null or empty": { "value": { "code": "PRICE_FORMULA_CURRENCY_CODE_MISSING", "description": "Parameter 'currency_code' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'element[].name' must not be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_NAME_MISSING", "description": "Parameter 'element[].name' must not be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_FROM_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_TO_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be more than 1440 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_FROM_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_TO_MINUTE_INVALID", "description": "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be less than 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be null or less than 0 for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_FROM_MINUTE_MISSING", "description": "Parameters 'elements[].unit_rate.tou.intervals[].from_minute' cannot be null or less than 0 for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_INTERVALS_TO_MINUTE_MISSING", "description": "Parameters 'elements[].unit_rate.tou.intervals[].to_minute' cannot be null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_kwh' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_FROM_KWH_MISSING", "description": "Parameters 'elements[].unit_rate.block.from_kwh' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.to_kwh' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_TO_KWH_MISSING", "description": "Parameters 'elements[].unit_rate.block.to_kwh' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.region' is invalid for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_REGION_INVALID", "description": "Parameters 'elements[].unit_rate.nordpool.region' is invalid for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.charge' must not be null for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_VALUE_MISSING", "description": "Parameter 'elements[].charge.charge' must not be null for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be null": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_FIXED_VALUE_MISSING", "description": "Parameters 'elements[].unit_rate.fixed.unit_rate' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null for 'elements[].unit_rate.type = tou'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TOU_VALUE_MISSING", "description": "Parameters 'elements[].unit_rate.tou.unit_rate' must not be null for 'elements[].unit_rate.type = tou'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'currency_code' invalid": { "value": { "code": "PRICE_FORMULA_CURRENCY_CODE_INVALID", "description": "Parameter 'currency_code' invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.weekdays' must not be empty'": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_WEEKDAYS_VALUES_MISSING", "description": "Parameters 'elements[].unit_rate.weekdays' must not be empty'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.weekdays' values must only contain valid weekdays like 'Monday', 'Tuesday', 'Wednesday', etc.'": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_WEEKDAYS_VALUES_INVALID", "description": "Parameters 'elements[].unit_rate.weekdays' values must only contain valid weekdays like 'Monday', 'Tuesday', 'Wednesday', etc.'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.weekdays' values must not contain any duplicates'": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_WEEKDAYS_VALUES_CONTAINS_DUPLICATES", "description": "Parameters 'elements[].unit_rate.weekdays' values must not contain any duplicates'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'fuel' must not be null": { "value": { "code": "PRICE_FORMULA_FUEL_MISSING", "description": "Parameter 'fuel' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'fuel' invalid": { "value": { "code": "PRICE_FORMULA_FUEL_INVALID", "description": "Parameter 'fuel' invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'direction' must not be null": { "value": { "code": "PRICE_FORMULA_DIRECTION_MISSING", "description": "Parameter 'direction' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'direction' invalid": { "value": { "code": "PRICE_FORMULA_DIRECTION_INVALID", "description": "Parameter 'direction' invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Found multiple price formulas starting from the same 'from' date.": { "value": { "code": "PRICE_FORMULA_DUPLICATES_FOUND", "description": "Found multiple price formulas starting from the same 'from' date.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' cannot overlap with already existing price formula.": { "value": { "code": "PRICE_FORMULA_FROM_DATE_IS_OVERLAP_EXISTING_PRICE_FORMULA", "description": "Parameter 'from' cannot overlap with already existing price formula.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'to' cannot overlap with already existing price formula.": { "value": { "code": "PRICE_FORMULA_TO_DATE_IS_OVERLAP_EXISTING_PRICE_FORMULA", "description": "Parameter 'to' cannot overlap with already existing price formula.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' cannot be outside device supply date range (start -> end dates).": { "value": { "code": "PRICE_FORMULA_FROM_DATE_OUTSIDE_DEVICE_SUPPLY_DATE_RANGE", "description": "Parameter 'from' cannot be outside device supply date range (start -> end dates).", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].type' is invalid. Must be one of: ['charge', 'unit_rate']": { "value": { "code": "PRICE_FORMULA_ELEMENT_TYPE_INVALID", "description": "Parameters 'elements[].type' is invalid. Must be one of: ['charge', 'unit_rate']", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].type' cannot be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_TYPE_MISSING", "description": "Parameters 'elements[].type' cannot be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.type' cannot be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TYPE_MISSING", "description": "Parameters 'elements[].unit_rate.type' cannot be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.type' is invalid. Must be one of: ['fixed', 'tou', 'nordpool', 'block']": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_TYPE_INVALID", "description": "Parameters 'elements[].unit_rate.type' is invalid. Must be one of: ['fixed', 'tou', 'nordpool', 'block']", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.resolution' is invalid. Only valid values are 'day' and 'year' for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_BLOCK_RESOLUTION_TYPE_INVALID", "description": "Parameters 'elements[].unit_rate.block.resolution' is invalid. Only valid values are 'day' and 'year' for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.resolution' is invalid. Only valid value is 'hour'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_NORDPOOL_RESOLUTION_TYPE_INVALID", "description": "Parameters 'elements[].unit_rate.nordpool.resolution' is invalid. Only valid value is 'hour'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.resolution' cannot be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_NORDPOOL_RESOLUTION_TYPE_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool.resolution' cannot be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.resolution' is invalid. Must be one of ['day', 'month'].": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_RESOLUTION_INVALID", "description": "Parameter 'elements[].charge.resolution' is invalid. Must be one of ['day', 'month'].", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.resolution' must not be null or empty for 'elements[].type = charge'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_CHARGE_RESOLUTION_MISSING", "description": "Parameter 'elements[].charge.resolution' must not be null or empty for 'elements[].type = charge'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.resolution' cannot be null or empty for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_BLOCK_RESOLUTION_TYPE_MISSING", "description": "Parameters 'elements[].unit_rate.block.resolution' cannot be null or empty for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid parameter source. Only 'client' or 'user' is valid.": { "value": { "code": "INVALID_PRICE_FORMULA_SOURCE", "description": "Invalid parameter source. Only 'client' or 'user' is valid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'energy_unit' invalid. Only 'kwh' or 'm3' is valid.": { "value": { "code": "INVALID_PRICE_FORMULA_ENERGY_UNIT", "description": "Parameter 'energy_unit' invalid. Only 'kwh' or 'm3' is valid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula already added by source 'client'. Cannot add price formula by source 'user' if price formula by source 'Client' is already added.": { "value": { "code": "PRICE_FORMULA_ALREADY_ADDED_BY_SOURCE_CLIENT", "description": "Price formula already added by source 'client'. Cannot add price formula by source 'user' if price formula by source 'Client' is already added.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'meter_id' must not be null or empty.": { "value": { "code": "PRICE_FORMULA_DEVICE_ID_MISSING", "description": "Parameter 'meter_id' must not be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'element' must not be null or empty.": { "value": { "code": "PRICE_FORMULA_ELEMENT_MISSING", "description": "Parameter 'element' must not be null or empty.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.[tou,fix,block,nordpool]' must be null for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_VALUE_FOR_TYPE_SPOT_PRICE_INVALID", "description": "Parameters 'elements[].unit_rate.[tou,fix,block,nordpool]' must be null for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_m3' is invalid for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_FROM_M3_INVALID", "description": "Parameters 'elements[].unit_rate.block.from_m3' is invalid for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_m3' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_FROM_M3_MISSING", "description": "Parameters 'elements[].unit_rate.block.from_m3' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.to_m3' cannot be null for 'elements[].unit_rate.type = block'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_BLOCK_TO_M3_MISSING", "description": "Parameters 'elements[].unit_rate.block.to_m3' cannot be null for 'elements[].unit_rate.type = block'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.nordpool.resolution' must not be null for 'elements[].unit_rate.type = nordpool'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_NORDPOOL_RESOLUTION_MISSING", "description": "Parameters 'elements[].unit_rate.nordpool.resolution' must not be null for 'elements[].unit_rate.type = nordpool'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.tou.intervals[]' cannot be provided together with skip intervals.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_VALUE_TOU_INTERVALS_INCLUDED_WITH_SKIP_INTERVALS", "description": "Parameters 'elements[].unit_rate.tou.intervals[]' cannot be provided together with skip intervals.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location for the price formula is invalid.": { "value": { "code": "PRICE_FORMULA_LOCATION_INVALID", "description": "Location for the price formula is invalid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_kwh/to_kwh' not allowed when energy unit is m3.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_BLOCK_FROM_TO_KWH_NOT_ALLOWED_ENERGY_UNIT_M3", "description": "Parameters 'elements[].unit_rate.block.from_kwh/to_kwh' not allowed when energy unit is m3.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.block.from_m3/to_m3' not allowed when energy unit is kwh.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_BLOCK_FROM_TO_M3_NOT_ALLOWED_ENERGY_UNIT_KWH", "description": "Parameters 'elements[].unit_rate.block.from_m3/to_m3' not allowed when energy unit is kwh.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.capacity_tariff' must not be null.": { "value": { "code": "PRICE_FORMULA_CHARGE_CAPACITY_TARIFF_MISSING", "description": "Parameter 'elements[].charge.capacity_tariff' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.capacity_tariff.calculation_type' must not be null.": { "value": { "code": "PRICE_FORMULA_CHARGE_CAPACITY_TARIFF_CALCULATION_TYPE_MISSING", "description": "Parameter 'elements[].charge.capacity_tariff.calculation_type' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula has a date range gap with the previous price formula.": { "value": { "code": "PRICE_FORMULA_HAVE_DATE_RANGE_GAP_WITH_PREVIOUS_PRICE_FORMULA", "description": "Price formula has a date range gap with the previous price formula.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Price formula has a date range gap with the next price formula.": { "value": { "code": "PRICE_FORMULA_HAVE_DATE_RANGE_GAP_WITH_NEXT_PRICE_FORMULA", "description": "Price formula has a date range gap with the next price formula.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.spot_price' must not be null for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_SPOT_PRICE_MISSING", "description": "Parameters 'elements[].unit_rate.spot_price' must not be null for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.spot_price.region' must not be null for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_SPOT_PRICE_REGION_MISSING", "description": "Parameters 'elements[].unit_rate.spot_price.region' must not be null for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.spot_price.region' is invalid for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_SPOT_PRICE_REGION_INVALID", "description": "Parameters 'elements[].unit_rate.spot_price.region' is invalid for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameters 'elements[].unit_rate.spot_price.resolution' must not be null for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_UNIT_RATE_SPOT_PRICE_RESOLUTION_MISSING", "description": "Parameters 'elements[].unit_rate.spot_price.resolution' must not be null for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.multiplier' must not be less than 0 for 'elements[].unit_rate.type = spot_price'.": { "value": { "code": "PRICE_FORMULA_ELEMENT_UNIT_RATE_SPOT_PRICE_MULTIPLIER_INVALID", "description": "Parameter 'elements[].unit_rate.spot_price.multiplier' must not be less than 0 for 'elements[].unit_rate.type = spot_price'.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'capacity_tariff.calculation_type' must not be null.": { "value": { "code": "MISSING_PRICE_FORMULA_CAPACITY_TARIFF_CALCULATION_TYPE", "description": "Parameter 'capacity_tariff.calculation_type' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.type' must not be null.": { "value": { "code": "PRICE_FORMULA_CHARGE_TYPE_MISSING", "description": "Parameter 'elements[].charge.type' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].charge.type' is invalid.": { "value": { "code": "INVALID_PRICE_FORMULA_CHARGE_TYPE", "description": "Parameter 'elements[].charge.type' is invalid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.provider' must not be null.": { "value": { "code": "MISSING_PRICE_FORMULA_SPOT_PRICE_PROVIDER", "description": "Parameter 'elements[].unit_rate.spot_price.provider' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.resolution' must not be null.": { "value": { "code": "MISSING_PRICE_FORMULA_SPOT_PRICE_RESOLUTION", "description": "Parameter 'elements[].unit_rate.spot_price.resolution' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.region' must not be null.": { "value": { "code": "MISSING_PRICE_FORMULA_SPOT_PRICE_REGION", "description": "Parameter 'elements[].unit_rate.spot_price.region' must not be null.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.resolution' is invalid.": { "value": { "code": "INVALID_PRICE_FORMULA_SPOT_PRICE_RESOLUTION", "description": "Parameter 'elements[].unit_rate.spot_price.resolution' is invalid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'elements[].unit_rate.spot_price.provider' is invalid.": { "value": { "code": "INVALID_PRICE_FORMULA_SPOT_PRICE_PROVIDER", "description": "Parameter 'elements[].unit_rate.spot_price.provider' is invalid.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{meterId}/priceformulas/{fromDate}": { "delete": { "tags": [ "Meter Price Formulas" ], "summary": "Delete a price formulas for a meter by meter external reference and older than specified date.", "operationId": "delete-meter-from-date-price-formulas", "parameters": [ { "name": "meterId", "in": "path", "description": "External meter id", "required": true, "schema": { "type": "string" }, "example": "abc123" }, { "name": "fromDate", "in": "path", "description": "Starting date from when price formulas should be deleted", "required": true, "schema": { "type": "string" }, "example": "2022-01-01" } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.": { "value": { "code": "PRICE_FORMULA_METER_NOT_FOUND", "description": "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Price formula for the given 'meter_id' and 'from' date was not found.": { "value": { "code": "PRICE_FORMULA_NOT_FOUND", "description": "Price formula for the given 'meter_id' and 'from' date was not found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{meterId}/priceformulas/all": { "delete": { "tags": [ "Meter Price Formulas" ], "summary": "Delete all price formulas for a meter specified by meter external reference.", "operationId": "delete-meter-all-price-formulas", "parameters": [ { "name": "meterId", "in": "path", "description": "External meter id", "required": true, "schema": { "type": "string" }, "example": "abc123" } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.": { "value": { "code": "PRICE_FORMULA_METER_NOT_FOUND", "description": "Meter with the given 'meter_id' could not be found. Meter was either deleted or not imported.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Price formula for the given 'meter_id' and 'from' date was not found.": { "value": { "code": "PRICE_FORMULA_NOT_FOUND", "description": "Price formula for the given 'meter_id' and 'from' date was not found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given id could not be found": { "value": { "code": "LOCATION_NOT_FOUND", "description": "Location with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}": { "put": { "tags": [ "Meter" ], "summary": "Creates or updates a meter.", "operationId": "put-meter-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "The meter entity to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meter" }, "examples": { "Meter request example": { "value": { "id": "Meter_ID", "location_id": "Meter_Location_ID", "name": "Meter_Name", "model": "Meter_Model", "fuel": "elec", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meter" }, "examples": { "Meter": { "value": { "id": "Meter_ID", "eliq_id": "000001_MeterID", "location_id": "Meter_Location_ID", "name": "Meter_Name", "model": "Meter_Model", "fuel": "elec", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" } } } } } }, "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meter" }, "examples": { "Meter": { "value": { "id": "Meter_ID", "eliq_id": "000001_MeterID", "location_id": "Meter_Location_ID", "name": "Meter_Name", "model": "Meter_Model", "fuel": "elec", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' does not match 'id' provided in the URI": { "value": { "code": "METER_ID_MISMATCH", "description": "Parameter 'id' does not match 'id' provided in the URI", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'supply_start_date' must not be null or empty. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "METER_SUPPLY_START_DATE_MISSING", "description": "Parameter 'supply_start_date' must not be null or empty. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'location_id' must not be null or empty": { "value": { "code": "METER_LOCATION_ID_MISSING", "description": "Parameter 'location_id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'fuel' must not be null or empty": { "value": { "code": "METER_FUEL_MISSING", "description": "Parameter 'fuel' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter associated with provided id does not support meter reads.": { "value": { "code": "METER_MODEL_DOES_NOT_SUPPORT_READS", "description": "Meter associated with provided id does not support meter reads.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid meter model": { "value": { "code": "METER_MODEL_INVALID", "description": "Invalid meter model", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'model' must not be null or empty": { "value": { "code": "METER_MODEL_MISSING", "description": "Parameter 'model' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid meter fuel. Must be one of 'elec', 'gas' or 'district_heating'": { "value": { "code": "METER_FUEL_INVALID", "description": "Invalid meter fuel. Must be one of 'elec', 'gas' or 'district_heating'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'type' must not be null or empty": { "value": { "code": "METER_TYPE_MISSING", "description": "Parameter 'type' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid meter type. Must be one of 'import', 'export', 'consumption' or 'production'": { "value": { "code": "METER_TYPE_INVALID", "description": "Invalid meter type. Must be one of 'import', 'export', 'consumption' or 'production'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Category percentage is invalid": { "value": { "code": "CATEGORY_PERCENTAGE_IS_INVALID", "description": "Category percentage is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Category percentage should be null": { "value": { "code": "CATEGORY_PERCENTAGE_CLIENT_SHOULD_BE_NULL", "description": "Category percentage should be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Gas cannot be exported": { "value": { "code": "GAS_CANNOT_BE_EXPORTED", "description": "Gas cannot be exported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Duplicate Meter, Fuel: Elec, Direction: Export, already exist": { "value": { "code": "ELEC_EXPORT_DUPLICATE_FOUND", "description": "Duplicate Meter, Fuel: Elec, Direction: Export, already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Duplicate Meter, Fuel: Elec, Direction: Import, already exist": { "value": { "code": "ELEC_IMPORT_DUPLICATE_FOUND", "description": "Duplicate Meter, Fuel: Elec, Direction: Import, already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Duplicate Meter, Direction: Export, already exist": { "value": { "code": "EXPORT_DUPLICATE_FOUND", "description": "Duplicate Meter, Direction: Export, already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Duplicate Meter, Direction: Import, already exist": { "value": { "code": "IMPORT_DUPLICATE_FOUND", "description": "Duplicate Meter, Direction: Import, already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "A meter with the same id already exists for another location. A meter cannot be moved between users.": { "value": { "code": "METER_CANNOT_BE_MOVED", "description": "A meter with the same id already exists for another location. A meter cannot be moved between users.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Fuel type for Meter cannot be updated": { "value": { "code": "METER_FUEL_CANNOT_BE_UPDATED", "description": "Fuel type for Meter cannot be updated", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Direction type for Meter cannot be updated": { "value": { "code": "METER_TYPE_CANNOT_BE_UPDATED", "description": "Direction type for Meter cannot be updated", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Category is invalid": { "value": { "code": "CATEGORY_CLIENT_IS_INVALID", "description": "Category is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Location with given 'location_id' could not be found": { "value": { "code": "METER_LOCATION_NOT_FOUND", "description": "Location with given 'location_id' could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Too many requests to add the same meter were created, please try again later.": { "value": { "code": "EXCESSIVE_REQUESTS_FOR_THE_SAME_METER", "description": "Too many requests to add the same meter were created, please try again later.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Direction type must be 'import' for district heating meters": { "value": { "code": "METER_TYPE_MUST_BE_IMPORT_FOR_DISTRICT_HEATING", "description": "Direction type must be 'import' for district heating meters", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter" ], "summary": "Gets a meter by provided meter external reference.", "operationId": "get-meter-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Meter" }, "examples": { "Meter": { "value": { "id": "Meter_ID", "eliq_id": "000001_MeterID", "location_id": "Meter_Location_ID", "name": "Meter_Name", "model": "Meter_Model", "fuel": "elec", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter" ], "summary": "Deletes a meter by provided meter external reference.", "operationId": "delete-meter-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters": { "get": { "tags": [ "Meter" ], "summary": "Gets a list of meters based on the provided query parameters.", "operationId": "get-meters", "parameters": [ { "name": "after_id", "in": "query", "description": "Indicates that the meter search should start after a specific meter external reference", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "The amount of meters to retrieve", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "created_after", "in": "query", "description": "Enables a search of meters which have been created after the provided date", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Meter" } }, "examples": { "Meters": { "value": [ { "id": "Meter_ID", "eliq_id": "000001_MeterID", "location_id": "Meter_Location_ID", "name": "Meter_Name", "model": "Meter_Model", "fuel": "elec", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" }, { "id": "Meter_ID_2", "eliq_id": "000002_MeterID", "location_id": "Meter_Location_ID_2", "name": "Meter_Name", "model": "Meter_Model", "fuel": "gas", "type": "import", "is_sub_meter": false, "category": "Meter_Category", "category_percentage": 100, "supply_start_date": "2024-01-01", "supply_end_date": "2024-12-31", "created_at_timestamp": "2024-01-01T12:00:00Z" } ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/energy/day": { "post": { "tags": [ "Meter Energy Day" ], "summary": "Creates or updates daily energy data for a meter.", "operationId": "post-daily-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Daily energy object to create or update", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyDailyData" } }, "examples": { "Energy daily data": { "value": [ { "date": "2024-01-01", "energy_wh": 1000.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 1000.0 } ] }, { "date": "2024-01-02", "energy_wh": 950.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 950.0 } ] }, { "date": "2024-01-03", "energy_wh": 820.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 820.0 } ] }, { "date": "2024-01-04", "energy_wh": 120.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 120.0 } ] }, { "date": "2024-01-05", "energy_wh": 1250.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 1250.0 } ] } ] } } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'energy_wh' or 'energy_m3'": { "value": { "code": "ENERGY_ELEMENT_ENERGY_WH_AND_ENERGY_M3_MISSING", "description": "Element in sequence must have either parameter 'energy_wh' or 'energy_m3'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'energy_wh' or 'energy_m3' but not both": { "value": { "code": "ENERGY_ELEMENT_BOTH_ENERGY_WH_AND_ENERGY_M3_SET", "description": "Element in sequence must have either parameter 'energy_wh' or 'energy_m3' but not both", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence has 'energy_m3' but the meter's fuel does not support it. 'energy_wh' is supported": { "value": { "code": "ENERGY_ELEMENT_ENERGY_M3_ON_UNSUPPORTED_FUEL_METER", "description": "Element in sequence has 'energy_m3' but the meter's fuel does not support it. 'energy_wh' is supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum limit of element per request exceeded. Please refer to documentation for more information": { "value": { "code": "ENERGY_SEQUENCE_LENGTH_LIMIT_EXCEEDED", "description": "Maximum limit of element per request exceeded. Please refer to documentation for more information", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Energy elements in sequence must be unique": { "value": { "code": "ENERGY_SEQUENCE_CONTAINS_DUPLICATE_ELEMENTS", "description": "Energy elements in sequence must be unique", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence missing parameter 'date'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "ENERGY_ELEMENT_DATE_MISSING", "description": "Element in sequence missing parameter 'date'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'energy_wh' must not be negative": { "value": { "code": "ENERGY_ELEMENT_ENERGY_WH_INVALID", "description": "Parameter 'energy_wh' must not be negative", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].id' must not be null or empty": { "value": { "code": "ENERGY_ELEMENT_REGISTER_ID_MISSING", "description": "Parameter 'registers[].id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Registers in 'registers[]' must be unique": { "value": { "code": "ENERGY_ELEMENT_CONTAINS_DUPLICATE_REGISTERS", "description": "Registers in 'registers[]' must be unique", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].energy_wh' must not be null": { "value": { "code": "ENERGY_ELEMENT_REGISTER_ENERGY_WH_MISSING", "description": "Parameter 'registers[].energy_wh' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'registers[].energy_wh' or 'registers[].energy_m3'": { "value": { "code": "ENERGY_ELEMENT_REGISTER_ENERGY_WH_AND_ENERGY_M3_MISSING", "description": "Element in sequence must have either parameter 'registers[].energy_wh' or 'registers[].energy_m3'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'registers[].energy_wh' or 'registers[].energy_m3' but not both": { "value": { "code": "ENERGY_ELEMENT_REGISTER_BOTH_ENERGY_WH_AND_ENERGY_M3_SET", "description": "Element in sequence must have either parameter 'registers[].energy_wh' or 'registers[].energy_m3' but not both", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].energy_wh' must not be negative": { "value": { "code": "ENERGY_ELEMENT_REGISTER_ENERGY_WH_INVALID", "description": "Parameter 'registers[].energy_wh' must not be negative", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers' elements 'energy_wh' sum have to be identical to parameter 'energy_wh'": { "value": { "code": "REGISTERS_ENERGY_WH_SUM_NOT_MATCH_DATA_ENERGY_WH", "description": "Parameter 'registers' elements 'energy_wh' sum have to be identical to parameter 'energy_wh'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'date' cannot be outside range of meter SupplyStartDate -> SupplyEndDate range": { "value": { "code": "ENERGY_DAILY_DATE_IS_OUTSIDE_METER_SUPPLY_DATE_RANGE", "description": "Parameter 'date' cannot be outside range of meter SupplyStartDate -> SupplyEndDate range", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter Energy Day" ], "summary": "Deletes the daily energy data for a meter.", "operationId": "delete-daily-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Energy Day" ], "summary": "Gets the stored daily energy data for a meter within a specified timespan.", "operationId": "get-daily-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyDailyData" } }, "examples": { "Energy daily data": { "value": [ { "date": "2024-01-01", "energy_wh": 1000.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 1000.0 } ] }, { "date": "2024-01-02", "energy_wh": 950.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 950.0 } ] }, { "date": "2024-01-03", "energy_wh": 820.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 820.0 } ] }, { "date": "2024-01-04", "energy_wh": 120.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 120.0 } ] }, { "date": "2024-01-05", "energy_wh": 1250.0, "is_estimated": false, "registers": [ { "id": "Register_ID", "energy_wh": 1250.0 } ] } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum range between 'from' and 'to' exceeded. Please refer to documentation": { "value": { "code": "DATE_RANGE_LIMIT_EXCEEDED", "description": "Maximum range between 'from' and 'to' exceeded. Please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/energy/highres/{resolution}": { "post": { "tags": [ "Meter Energy High Resolution" ], "summary": "Creates or updates high resolution (hourly or higher) energy data for a meter.", "operationId": "post-high-resolution-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "Resolution of the data provided", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "High resolution energy object to create or update", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyHighResolutionData" } }, "examples": { "Energy high resolution data": { "value": [ { "interval_start": "2024-01-01T00:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T01:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T02:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T03:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T04:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T05:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T06:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T07:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T08:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T09:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T10:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T11:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T12:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T13:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T14:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T15:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T16:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T17:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T18:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T19:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T20:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T21:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T22:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T23:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-02T00:00:00Z", "energy_wh": 1000.0, "is_estimated": false } ] } } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Resolution must not be null or empty": { "value": { "code": "RESOLUTION_MISSING", "description": "Resolution must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid resolution. Must be one of: [hour, 30min, 15min, 10min, 6min]": { "value": { "code": "RESOLUTION_INVALID", "description": "Invalid resolution. Must be one of: [hour, 30min, 15min, 10min, 6min]", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum limit of element per request exceeded. Please refer to documentation for more information": { "value": { "code": "ENERGY_SEQUENCE_LENGTH_LIMIT_EXCEEDED", "description": "Maximum limit of element per request exceeded. Please refer to documentation for more information", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Energy elements in sequence must be unique": { "value": { "code": "ENERGY_SEQUENCE_CONTAINS_DUPLICATE_ELEMENTS", "description": "Energy elements in sequence must be unique", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'energy_wh' must not be negative": { "value": { "code": "ENERGY_ELEMENT_ENERGY_WH_INVALID", "description": "Parameter 'energy_wh' must not be negative", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'energy_wh' or 'energy_m3'": { "value": { "code": "ENERGY_ELEMENT_ENERGY_WH_AND_ENERGY_M3_MISSING", "description": "Element in sequence must have either parameter 'energy_wh' or 'energy_m3'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence must have either parameter 'energy_wh' or 'energy_m3' but not both": { "value": { "code": "ENERGY_ELEMENT_BOTH_ENERGY_WH_AND_ENERGY_M3_SET", "description": "Element in sequence must have either parameter 'energy_wh' or 'energy_m3' but not both", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence has 'energy_m3' but the meter's fuel does not support it. 'energy_wh' is supported": { "value": { "code": "ENERGY_ELEMENT_ENERGY_M3_ON_UNSUPPORTED_FUEL_METER", "description": "Element in sequence has 'energy_m3' but the meter's fuel does not support it. 'energy_wh' is supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'interval_start' must not be null. This may be caused by incorrect datetime format, please refer to documentation": { "value": { "code": "ENERGY_ELEMENT_INTERVAL_START_MISSING", "description": "Parameter 'interval_start' must not be null. This may be caused by incorrect datetime format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'interval_start' must align with given resolution (eg. 'xx:00:00' for hourly, 'xx:00:00' and 'xx:30:00' for 30min). Please refer to documentation for more information": { "value": { "code": "ENERGY_ELEMENT_INTERVAL_START_DATE_INVALID_FOR_RESOLUTION", "description": "Parameter 'interval_start' must align with given resolution (eg. 'xx:00:00' for hourly, 'xx:00:00' and 'xx:30:00' for 30min). Please refer to documentation for more information", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Gap not matching resolution size between 'interval_start' dates have been found.": { "value": { "code": "GAP_IN_ENERGY_DATE_INTERVAL", "description": "Gap not matching resolution size between 'interval_start' dates have been found.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'interval_start' must be between meter SupplyStartDate and SupplyEndDate dates.": { "value": { "code": "ENERGY_INTERVAL_START_DATE_IS_OUTSIDE_METER_SUPPLY_DATE_RANGE", "description": "Parameter 'interval_start' must be between meter SupplyStartDate and SupplyEndDate dates.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter Energy High Resolution" ], "summary": "Deletes the high resolution (hourly or higher) energy data for a meter.", "operationId": "delete-high-resolution-energy-meterid-2", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "Resolution of the data provided", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Resolution must not be null or empty": { "value": { "code": "RESOLUTION_MISSING", "description": "Resolution must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Energy High Resolution" ], "summary": "Gets the stored high resolution (hour or higher) energy data for a meter within a specified timespan.", "operationId": "get-high-resolution-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "Resolution of the data provided", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyHighResolutionData" } }, "examples": { "Energy high resolution data": { "value": [ { "interval_start": "2024-01-01T00:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T01:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T02:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T03:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T04:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T05:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T06:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T07:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T08:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T09:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T10:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T11:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T12:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T13:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T14:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T15:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T16:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T17:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T18:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T19:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T20:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T21:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T22:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-01T23:00:00Z", "energy_wh": 1000.0, "is_estimated": false }, { "interval_start": "2024-01-02T00:00:00Z", "energy_wh": 1000.0, "is_estimated": false } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Resolution must not be null or empty": { "value": { "code": "RESOLUTION_MISSING", "description": "Resolution must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid resolution. Must be one of: [hour, 30min, 15min, 10min, 6min]": { "value": { "code": "RESOLUTION_INVALID", "description": "Invalid resolution. Must be one of: [hour, 30min, 15min, 10min, 6min]", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum range between 'from' and 'to' exceeded. Please refer to documentation": { "value": { "code": "DATE_RANGE_LIMIT_EXCEEDED", "description": "Maximum range between 'from' and 'to' exceeded. Please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/energy/{resolution}": { "delete": { "tags": [ "Meter Energy High Resolution" ], "summary": "Deletes the high resolution (hourly or higher) energy data for a meter.", "operationId": "delete-high-resolution-energy-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "Resolution of the data provided", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Resolution must not be null or empty": { "value": { "code": "RESOLUTION_MISSING", "description": "Resolution must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/reads": { "post": { "tags": [ "Meter Energy Reads" ], "summary": "Creates or updates meter reads for a meter.", "operationId": "post-meter-reads-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Meter reads object", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/NonSmartMeterReadDto" } }, "examples": { "Meter reads data": { "value": [ { "date": "2024-01-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 100 }, { "id": "456", "index": 20 } ] }, { "date": "2024-02-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 110 }, { "id": "456", "index": 22 } ] }, { "date": "2024-03-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 120 }, { "id": "456", "index": 24 } ] }, { "date": "2024-04-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 130 }, { "id": "456", "index": 26 } ] }, { "date": "2024-05-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 140 }, { "id": "456", "index": 28 } ] }, { "date": "2024-06-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 150 }, { "id": "456", "index": 30 } ] } ] } } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum limit of element per request exceeded. Please refer to documentation for more information": { "value": { "code": "READ_SEQUENCE_LENGTH_LIMIT_EXCEEDED", "description": "Maximum limit of element per request exceeded. Please refer to documentation for more information", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence missing parameter 'registers'": { "value": { "code": "READ_ELEMENT_REGISTERS_MISSING", "description": "Element in sequence missing parameter 'registers'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].id' must not be null or empty": { "value": { "code": "READ_ELEMENT_REGISTER_ID_MISSING", "description": "Parameter 'registers[].id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Energy elements in sequence must be unique": { "value": { "code": "READ_SEQUENCE_CONTAINS_DUPLICATE_ELEMENTS", "description": "Energy elements in sequence must be unique", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].index' must not be null": { "value": { "code": "READ_ELEMENT_REGISTER_INDEX_MISSING", "description": "Parameter 'registers[].index' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].index' must not be negative": { "value": { "code": "READ_ELEMENT_REGISTER_INDEX_INVALID", "description": "Parameter 'registers[].index' must not be negative", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Registers in 'registers[]' must be unique": { "value": { "code": "READ_ELEMENT_CONTAINS_DUPLICATE_REGISTERS", "description": "Registers in 'registers[]' must be unique", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Element in sequence missing parameter 'date'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "READ_ELEMENT_DATE_MISSING", "description": "Element in sequence missing parameter 'date'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'quality' must not be null": { "value": { "code": "READ_ELEMENT_QUALITY_MISSING", "description": "Parameter 'quality' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'quality' invalid. Should be one of 'normal' or 'estimated'": { "value": { "code": "READ_ELEMENT_QUALITY_INVALID", "description": "Parameter 'quality' invalid. Should be one of 'normal' or 'estimated'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'status' must not be null": { "value": { "code": "READ_ELEMENT_STATUS_MISSING", "description": "Parameter 'status' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'status' invalid. Should be one of 'accepted' or 'pending'": { "value": { "code": "READ_ELEMENT_STATUS_INVALID", "description": "Parameter 'status' invalid. Should be one of 'accepted' or 'pending'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'source' must not be null": { "value": { "code": "READ_ELEMENT_SOURCE_MISSING", "description": "Parameter 'source' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'source' invalid. Should be one of 'customer', 'utility', 'smr' or 'system'": { "value": { "code": "READ_ELEMENT_SOURCE_INVALID", "description": "Parameter 'source' invalid. Should be one of 'customer', 'utility', 'smr' or 'system'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'unit' must not be null": { "value": { "code": "READ_ELEMENT_UNIT_MISSING", "description": "Parameter 'unit' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'unit' invalid. Should be 'kwh' or 'm3'": { "value": { "code": "READ_ELEMENT_UNIT_INVALID", "description": "Parameter 'unit' invalid. Should be 'kwh' or 'm3'", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'unit' has value 'm3' but the meter's fuel does not support it. 'kwh' is supported": { "value": { "code": "READ_ELEMENT_UNIT_M3_ON_UNSUPPORTED_FUEL_METER", "description": "Parameter 'unit' has value 'm3' but the meter's fuel does not support it. 'kwh' is supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter associated with provided id does not support meter reads.": { "value": { "code": "METER_MODEL_DOES_NOT_SUPPORT_READS", "description": "Meter associated with provided id does not support meter reads.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Energy Reads" ], "summary": "Gets the stored meter reads for a meter within a specified timespan.", "operationId": "get-meter-reads-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/NonSmartMeterReadDto" } }, "examples": { "Meter reads data": { "value": [ { "date": "2024-01-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 100 }, { "id": "456", "index": 20 } ] }, { "date": "2024-02-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 110 }, { "id": "456", "index": 22 } ] }, { "date": "2024-03-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 120 }, { "id": "456", "index": 24 } ] }, { "date": "2024-04-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 130 }, { "id": "456", "index": 26 } ] }, { "date": "2024-05-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 140 }, { "id": "456", "index": 28 } ] }, { "date": "2024-06-01", "source": "customer", "quality": "normal", "status": "accepted", "unit": "m3", "registers": [ { "id": "123", "index": 150 }, { "id": "456", "index": 30 } ] } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum range between 'from' and 'to' exceeded. Please refer to documentation": { "value": { "code": "DATE_RANGE_LIMIT_EXCEEDED", "description": "Maximum range between 'from' and 'to' exceeded. Please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter Energy Reads" ], "summary": "Deletes the stored meter reads for a meter within a specified timespan.", "operationId": "delete-meter-reads-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum range between 'from' and 'to' exceeded. Please refer to documentation": { "value": { "code": "DATE_RANGE_LIMIT_EXCEEDED", "description": "Maximum range between 'from' and 'to' exceeded. Please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/energy/period": { "post": { "tags": [ "Meter Energy Period" ], "summary": "Creates or updates periodic (monthly or higher) energy data for a meter.", "operationId": "post-period-energy-data-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Periodic energy data object", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyMonthlyData" } }, "examples": { "Energy periodic data": { "value": [ { "client_id": 0, "from": "2024-01-01", "to": "2024-02-01", "energy_wh": 35000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 25000.0 } ] }, { "client_id": 0, "from": "2024-02-01", "to": "2024-03-01", "energy_wh": 20000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 10000.0 } ] }, { "client_id": 0, "from": "2024-03-01", "to": "2024-04-01", "energy_wh": 80000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 70000.0 } ] } ] } } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Request body 'energyMonthlyData' must not be null or empty": { "value": { "code": "ENERGY_MONTHLY_DATA_MUST_NOT_BE_NULL", "description": "Request body 'energyMonthlyData' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Sequence contains duplicate date ranges": { "value": { "code": "SEQUENCE_MUST_NOT_CONTAIN_DUPLICATE_DATES", "description": "Sequence contains duplicate date ranges", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Either 'energy_wh' or 'energy_m3' must be provided": { "value": { "code": "ENERGY_WH_OR_ENERGY_M3_MUST_NOT_BE_NULL", "description": "Either 'energy_wh' or 'energy_m3' must be provided", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "'energy_wh' and 'energy_m3' cannot be provided together": { "value": { "code": "ENERGY_WH_AND_ENERGY_M3_MUST_NOT_BE_PROVIDED_TOGETHER", "description": "'energy_wh' and 'energy_m3' cannot be provided together", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "'energy_m3' cannot be used on a meter whose fuel type does not support it": { "value": { "code": "ENERGY_M3_MUST_NOT_BE_ADDED_ON_UNSUPPORTED_FUEL_METER", "description": "'energy_m3' cannot be used on a meter whose fuel type does not support it", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'from' is missing or invalid": { "value": { "code": "FROM_MISSING", "description": "Parameter 'from' is missing or invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'to' is missing or invalid": { "value": { "code": "TO_MISSING", "description": "Parameter 'to' is missing or invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].energy_wh' must not be null": { "value": { "code": "REGISTERS_ENERGY_MUST_NOT_BE_NULL", "description": "Parameter 'registers[].energy_wh' must not be null", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'registers[].id' must not be null or empty": { "value": { "code": "REGISTERS_ID_CANNOT_BE_NULL", "description": "Parameter 'registers[].id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Registers contain duplicate 'id' values": { "value": { "code": "REGISTERS_CANNOT_HAVE_SAME_ID", "description": "Registers contain duplicate 'id' values", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Energy Period" ], "summary": "Gets the stored periodic (monthly or higher) energy data for a meter within a specified timespan.", "operationId": "get-period-energy-data-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnergyMonthlyData" } }, "examples": { "Energy periodic data": { "value": [ { "client_id": 0, "from": "2024-01-01", "to": "2024-02-01", "energy_wh": 35000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 25000.0 } ] }, { "client_id": 0, "from": "2024-02-01", "to": "2024-03-01", "energy_wh": 20000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 10000.0 } ] }, { "client_id": 0, "from": "2024-03-01", "to": "2024-04-01", "energy_wh": 80000.0, "is_estimated": false, "registers": [ { "id": "123", "energy_wh": 10000.0 }, { "id": "456", "energy_wh": 70000.0 } ] } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Maximum range between 'from' and 'to' exceeded. Please refer to documentation": { "value": { "code": "DATE_RANGE_LIMIT_EXCEEDED", "description": "Maximum range between 'from' and 'to' exceeded. Please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter Energy Period" ], "summary": "Deletes the stored periodic (monthly or higher) energy data for a meter within a specified timespan.", "operationId": "delete-period-energy-data-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "FromDate", "in": "query", "schema": { "type": "string" } }, { "name": "From", "in": "query", "schema": { "type": "string" } }, { "name": "ToDate", "in": "query", "schema": { "type": "string" } }, { "name": "To", "in": "query", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "DATE_RANGE_MISSING", "description": "Missing parameters 'from' and 'to'. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "From date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "FROM_MISSING", "description": "From date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "To date is missing. This may be caused by incorrect date format, please refer to documentation": { "value": { "code": "TO_MISSING", "description": "To date is missing. This may be caused by incorrect date format, please refer to documentation", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Date range is invalid i.e. 'from' date is after 'to' date": { "value": { "code": "DATE_RANGE_INVALID", "description": "Date range is invalid i.e. 'from' date is after 'to' date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Meter with given id could not be found": { "value": { "code": "METER_NOT_FOUND", "description": "Meter with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/max-demand/{resolution}": { "post": { "tags": [ "Meter Max Demand" ], "summary": "Creates or updates max demand (peak power) data for a meter with a specified resolution.", "operationId": "post-max-demand-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Max demand object to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceMaxDemand" } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Max Demand" ], "summary": "Gets the stored max demand (peak power) data for a meter with a specified resolution within a specified time frame.", "operationId": "get-max-demand-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "From date. Inclusive", "schema": { "type": "string" } }, { "name": "to", "in": "query", "description": "To date. Exclusive", "schema": { "type": "string" } }, { "name": "unit", "in": "query", "description": "Unit for the max demand data (ex.: Kilovolt-ampere - kva)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DeviceMaxDemand" } }, "examples": { "Max demands": { "value": [ { "date": "2024-01-01", "value": 8.0, "unit": "kva" }, { "date": "2024-01-02", "value": 7.7, "unit": "kva" } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Meter Max Demand" ], "summary": "Deletes the max demand (peak power) data for a meter with a specified resolution within a specified time frame.", "operationId": "delete-max-demand-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "From date. Inclusive", "schema": { "type": "string" } }, { "name": "to", "in": "query", "description": "To date. Exclusive", "schema": { "type": "string" } }, { "name": "unit", "in": "query", "description": "Unit for the max demand data (ex.: Kilovolt-ampere - kva)", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/meters/{id}/max-demand/limits/{resolution}": { "delete": { "tags": [ "Meter Max Demand" ], "summary": "Deletes the max demand (peak power) limits for a meter with a specified resolution and unit.", "operationId": "delete-max-demand-limit-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } }, { "name": "unit", "in": "query", "description": "Unit for the max demand data (ex.: Kilovolt-ampere - kva)", "schema": { "type": "string" } } ], "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "post": { "tags": [ "Meter Max Demand" ], "summary": "Creates or updates the max demand (peak power) limits for a meter with a specified resolution and unit.", "operationId": "post-max-demand-limit-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Max demand limits object to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceMaxDemandLimit" }, "examples": { "Max demand limit": { "value": { "min": 1.0, "target": 5.0, "max": 9.5, "unit": "kva" } } } } } }, "responses": { "204": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Meter Max Demand" ], "summary": "Gets the max demand (peak power) limits for a meter with a specified resolution and unit.", "operationId": "get-max-demand-limit-meterid", "parameters": [ { "name": "id", "in": "path", "description": "Meter external reference", "required": true, "schema": { "type": "string" } }, { "name": "resolution", "in": "path", "description": "The data resolution for the specified meter", "required": true, "schema": { "type": "string" } }, { "name": "unit", "in": "query", "description": "Unit for the max demand data (ex.: Kilovolt-ampere - kva)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" }, "examples": { "Max demand limit": { "value": { "min": 1.0, "target": 5.0, "max": 9.5, "unit": "kva" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "METER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max Demand for the same Meter and Date already exist": { "value": { "code": "DUPLICATE_FOUND", "description": "Max Demand for the same Meter and Date already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Unit Type": { "value": { "code": "MISSING_UNIT_TYPE", "description": "Missing Unit Type", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "For Max Demand resolution monthly date have to be first day of the month": { "value": { "code": "INVALID_MONTHLY_DAY", "description": "For Max Demand resolution monthly date have to be first day of the month", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid date": { "value": { "code": "INVALID_DATE", "description": "Invalid date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid From Date": { "value": { "code": "INVALID_FROM_DATE", "description": "Invalid From Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Invalid To Date": { "value": { "code": "INVALID_TO_DATE", "description": "Invalid To Date", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand resolution is not supported": { "value": { "code": "MAX_DEMAND_RESOLUTION_NOT_SUPPORTED", "description": "Max demand resolution is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing max demand limit input data": { "value": { "code": "MISSING_INPUT", "description": "Missing max demand limit input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit for the same meter already exists": { "value": { "code": "DUPLICATE_FOUND", "description": "Max demand limit for the same meter already exists", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Unit type is not supported": { "value": { "code": "NOT_SUPPORTED_UNIT_TYPE", "description": "Unit type is not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Meter id is missing": { "value": { "code": "METER_ID_MISSING", "description": "Meter id is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing resolution": { "value": { "code": "MISSING_RESOLUTION", "description": "Missing resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Not Supported Resolution": { "value": { "code": "NOT_SUPPORTED_RESOLUTION", "description": "Not Supported Resolution", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Min value have to be smaller than Max value": { "value": { "code": "MIN_VALUE_BIGGER_OR_EQUAL_MAX_VALUE", "description": "Min value have to be smaller than Max value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be smaller than Min value": { "value": { "code": "TARGET_VALUE_SMALLER_THAN_MIN_VALUE", "description": "Target value cannot be smaller than Min value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Target value cannot be bigger than Max Value": { "value": { "code": "TARGET_VALUE_BIGGER_THAN_MAX_VALUE", "description": "Target value cannot be bigger than Max Value", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Max demand was not found": { "value": { "code": "MAX_DEMAND_NOT_FOUND", "description": "Max demand was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Missing Max Demand Input data": { "value": { "code": "MISSING_INPUT", "description": "Missing Max Demand Input data", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Max demand limit was not found": { "value": { "code": "MAX_DEMAND_LIMIT_NOT_FOUND", "description": "Max demand limit was not found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{id}": { "put": { "tags": [ "Portfolio Accounts" ], "summary": "Create or update portfolio account", "description": "Create or update an account for the portfolio.\r\n If an account with the given id does not exist, a new account will be created.\r\n If an account with id exists, that account will be updated.", "operationId": "put-portfolio-accounts", "parameters": [ { "name": "id", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioAccount" } } } }, "responses": { "200": { "description": "Portfolio account was updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioAccount" } } } }, "201": { "description": "Portfolio account was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioAccount" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Portfolio Accounts" ], "summary": "Delete a portfolio account", "operationId": "delete-portfolio-accounts", "parameters": [ { "name": "id", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "responses": { "204": { "description": "Portfolio account was deleted" }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Portfolio Accounts" ], "summary": "Get portfolio account", "operationId": "get-portfolio-accounts", "parameters": [ { "name": "id", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioAccount" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/name/{name}": { "get": { "tags": [ "Portfolio Accounts" ], "summary": "Get portfolio account, by name", "operationId": "get-portfolio-accounts-by-name", "parameters": [ { "name": "name", "in": "path", "description": "Name of the portfolio account", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioAccount" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts": { "get": { "tags": [ "Portfolio Accounts" ], "summary": "Get all portfolio accounts", "operationId": "get-portfolio-accounts-list", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioAccount" } } } } } } } }, "/portfolio/accounts/{accountId}/groups": { "post": { "tags": [ "Portfolio Groups" ], "summary": "Create (update not allowed) portfolio group", "description": "Create (update not allowed) portfolio group, which enables aggregate view for multiple locations.", "operationId": "put-portfolio-groups", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioGroupAddDto" } } } }, "responses": { "201": { "description": "Portfolio group was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioGroup" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Portfolio Groups" ], "summary": "Get all groups on porfolio account", "operationId": "get-portfolio-groups-list", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioGroup" } } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{accountId}/groups/{id}": { "delete": { "tags": [ "Portfolio Groups" ], "summary": "Delete group on portfolio account", "description": "Not allowed to delete groups created in portfolio api by portfolio user", "operationId": "delete-portfolio-groups", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "Group identifier", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "c26ad04d-0db7-4f96-a10d-d055a6aff002" } ], "responses": { "204": { "description": "Portfolio group was deleted" }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "403": { "description": "Group created by Portfolio user cannot be deleted from this Api", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio group or account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Portfolio Groups" ], "summary": "Get group on portfolio account", "operationId": "get-portfolio-groups", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "Group identifier", "required": true, "schema": { "type": "string", "format": "uuid" }, "example": "c26ad04d-0db7-4f96-a10d-d055a6aff002" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioGroup" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio group or account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{accountId}/locations/{id}": { "put": { "tags": [ "Portfolio Locations" ], "summary": "Create or update portfolio location", "description": "Create or update connection between location and account for the portfolio.\r\n If a location with the given id does not exist on the account, a new account location will be created.\r\n If a location with id exists on the account, that location will be updated.", "operationId": "put-portfolio-locations", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "Location identifier", "required": true, "schema": { "type": "string" }, "example": "ea395dfc-74da-4cd0-bf59-368046371f85" } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioLocation" } } } }, "responses": { "200": { "description": "Portfolio location was updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioLocation" } } } }, "201": { "description": "Portfolio location was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioLocation" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Portfolio Locations" ], "summary": "Remove location from portfolio account", "operationId": "delete-portfolio-locations", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "Location identifier", "required": true, "schema": { "type": "string" }, "example": "ea395dfc-74da-4cd0-bf59-368046371f85" } ], "responses": { "204": { "description": "Portfolio location was deleted" }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio location was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Portfolio Locations" ], "summary": "Get location on portfolio account", "operationId": "get-portfolio-locations", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "Location identifier", "required": true, "schema": { "type": "string" }, "example": "ea395dfc-74da-4cd0-bf59-368046371f85" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioLocation" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio location was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{accountId}/locations": { "get": { "tags": [ "Portfolio Locations" ], "summary": "Get all locations on porfolio account", "operationId": "get-portfolio-locations-list", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioLocation" } } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{accountId}/users/{id}": { "put": { "tags": [ "Portfolio Users" ], "summary": "Create or update portfolio user", "description": "Create or update user on an account for the portfolio.\r\n If a user with the given id does not exist on the account, a new account user will be created.\r\n If a user with id exists on the account, that user will be updated.", "operationId": "put-portfolio-users", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "User identifier", "required": true, "schema": { "type": "string" }, "example": "c26ad04d-0db7-4f96-a10d-d055a6aff002" } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioUser" } } } }, "responses": { "200": { "description": "Portfolio user was updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioUser" } } } }, "201": { "description": "Portfolio user was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioUser" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "Portfolio Users" ], "summary": "Delete user on portfolio account", "operationId": "delete-portfolio-users", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "User identifier", "required": true, "schema": { "type": "string" }, "example": "c26ad04d-0db7-4f96-a10d-d055a6aff002" } ], "responses": { "204": { "description": "Portfolio user was deleted" }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio user was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "Portfolio Users" ], "summary": "Get user on portfolio account", "operationId": "get-portfolio-users", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" }, { "name": "id", "in": "path", "description": "User identifier", "required": true, "schema": { "type": "string" }, "example": "c26ad04d-0db7-4f96-a10d-d055a6aff002" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortfolioUser" } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio user was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/portfolio/accounts/{accountId}/users": { "get": { "tags": [ "Portfolio Users" ], "summary": "Get all user on porfolio account", "operationId": "get-portfolio-users-list", "parameters": [ { "name": "accountId", "in": "path", "description": "Account identifier", "required": true, "schema": { "type": "string" }, "example": "6ad04dc2-0db7-4f96-a10d-5a6aff002d05" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioUser" } } } } }, "400": { "description": "Bad request. See error code and description for more info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "404": { "description": "Portfolio account was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Job with specified id could not be found": { "value": { "code": "JOB_NOT_FOUND", "description": "Job with specified id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/users/{id}": { "put": { "tags": [ "User" ], "summary": "Creates or updates user", "operationId": "put-users-userId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of user", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "User object to create or update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" }, "examples": { "User request example": { "value": { "id": "210ba397-6320-4ebb-b41b-679d00085efb", "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" }, "examples": { "Full user example": { "value": { "id": "210ba397-6320-4ebb-b41b-679d00085efb", "eliq_id": 1234567, "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB" } } } } } }, "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" }, "examples": { "Full user example": { "value": { "id": "210ba397-6320-4ebb-b41b-679d00085efb", "eliq_id": 1234567, "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Request input is missing. This may be caused by incorrect format of input.": { "value": { "code": "INPUT_MISSING", "description": "Request input is missing. This may be caused by incorrect format of input.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Parameter 'id' must not be null or empty": { "value": { "code": "USER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Email is invalid": { "value": { "code": "USER_EMAIL_INVALID", "description": "Email is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Phone number is invalid": { "value": { "code": "USER_PHONE_INVALID", "description": "Phone number is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "A user with the provided email already exist": { "value": { "code": "USER_EMAIL_DUPLICATE", "description": "A user with the provided email already exist", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Language code is invalid": { "value": { "code": "USER_LANGUAGE_CODE_INVALID", "description": "Language code is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Language code is missing": { "value": { "code": "USER_LANGUAGE_CODE_MISSING", "description": "Language code is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Time zone is missing": { "value": { "code": "USER_TIME_ZONE_MISSING", "description": "Time zone is missing", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Time zone is invalid": { "value": { "code": "USER_TIME_ZONE_INVALID", "description": "Time zone is invalid", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "The provided custom properties are not supported": { "value": { "code": "USER_CUSTOM_NOT_SUPPORTED", "description": "The provided custom properties are not supported", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "Too many requests to add the same User were created, please try again later.": { "value": { "code": "EXCESSIVE_REQUESTS_FOR_THE_SAME_USER", "description": "Too many requests to add the same User were created, please try again later.", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "delete": { "tags": [ "User" ], "summary": "Deletes user", "operationId": "delete-users-userId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of user", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoContentResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "USER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } }, "get": { "tags": [ "User" ], "summary": "Gets user", "operationId": "get-users-userId", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of user", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" }, "examples": { "Full user example": { "value": { "id": "210ba397-6320-4ebb-b41b-679d00085efb", "eliq_id": 1234567, "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "USER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/users": { "get": { "tags": [ "User" ], "summary": "Gets multiple users", "description": "Users are fetched in batches of maximum 1000 users, and returned in created date order.\r\nUsing parameters after_id and limit can be used to iterate over the full user base.\r\nParameter created_after can also be used to fetch users after a certain date.", "operationId": "get-users", "parameters": [ { "name": "after_id", "in": "query", "description": "Unique identifier of user, fetch users created after user with given id", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of users to get", "schema": { "type": "integer", "format": "int32", "default": 100 } }, { "name": "created_after", "in": "query", "description": "Users created after the provided date", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } }, "examples": { "Get users example": { "value": [ { "id": "210ba397-6320-4ebb-b41b-679d00085efb", "eliq_id": 1234567, "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB", "custom": {} }, { "id": "1a3b96fd-8734-4a66-bf83-a01baceffc56", "eliq_id": 2345678, "name": "Forename Surname", "email": "mail@mail.com", "phone": "555-55555", "language_code": "en-GB", "custom": {} } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/users/{id}/notification": { "post": { "tags": [ "User" ], "summary": "Sends notifications to user", "operationId": "post-users-userId-notification", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of user", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Notification object to send to user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationDto" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptedResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "USER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } }, "/users/{id}/locations": { "get": { "tags": [ "User" ], "summary": "Gets user locations", "operationId": "get-users-userId-locations", "parameters": [ { "name": "id", "in": "path", "description": "Unique identifier of user", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Location" } }, "examples": { "Get locations example": { "value": [ { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c474", "eliq_id": 7654321, "name": "Location name 1", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65e", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 18", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } }, { "id": "27f4a08a-8672-4efe-84a1-9d16abc7c475", "eliq_id": 7654321, "name": "Location name 2", "user_id": "df530bba-da48-44c6-8f53-8dcb1909a65f", "spot_price_region_id": "nordpool_se1", "address": { "street_address": "Stora Badhusgatan 19", "postal_code": "411 21", "city": "Göteborg", "country_code": "SE" }, "geo": { "latitude": 57.70413, "longitude": 11.95716 } } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Parameter 'id' must not be null or empty": { "value": { "code": "USER_ID_MISSING", "description": "Parameter 'id' must not be null or empty", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } }, "User with given id could not be found": { "value": { "code": "USER_NOT_FOUND", "description": "User with given id could not be found", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetails" }, "examples": { "Internal server error. If problem remains, please contact support": { "value": { "code": "INTERNAL_ERROR", "description": "Internal server error. If problem remains, please contact support", "request_id": "65e2ea86-470f-4363-9295-35d6b473981a" } } } } } } } } } }, "components": { "schemas": { "AcceptedResult": { "type": "object", "properties": { "location": { "type": "string", "nullable": true }, "value": { "nullable": true }, "formatters": { "type": "array", "items": { "$ref": "#/components/schemas/IOutputFormatter" }, "nullable": true }, "contentTypes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "declaredType": { "type": "string", "nullable": true }, "statusCode": { "type": "integer", "format": "int32", "nullable": true } } }, "Block": { "type": "object", "properties": { "resolution": { "type": "string", "nullable": true }, "register_id": { "type": "string", "nullable": true }, "unit_rate": { "type": "number", "format": "double" }, "from_kwh": { "type": "integer", "format": "int64", "nullable": true }, "to_kwh": { "type": "integer", "format": "int64", "nullable": true }, "from_m3": { "type": "integer", "format": "int64", "nullable": true }, "to_m3": { "type": "integer", "format": "int64", "nullable": true } } }, "CapacityTariff": { "type": "object", "properties": { "charge_tariff": { "type": "number", "format": "double" }, "minimum_contribution": { "type": "number", "format": "double" }, "calculation_type": { "type": "string", "nullable": true } } }, "Charge": { "type": "object", "properties": { "resolution": { "type": "string", "nullable": true }, "charge": { "type": "number", "format": "double", "nullable": true }, "type": { "type": "string", "nullable": true }, "capacity_tariff": { "$ref": "#/components/schemas/CapacityTariff" } } }, "DeviceMaxDemand": { "type": "object", "properties": { "date": { "type": "string" }, "value": { "type": "number", "format": "double" }, "unit": { "type": "string", "nullable": true } } }, "DeviceMaxDemandLimit": { "type": "object", "properties": { "min": { "type": "number", "format": "double" }, "target": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "unit": { "type": "string", "nullable": true } } }, "DtoLink": { "type": "object", "properties": { "url": { "type": "string", "nullable": true }, "label": { "type": "string", "nullable": true }, "target": { "$ref": "#/components/schemas/DtoLinkTarget" } } }, "DtoLinkTarget": { "enum": [ "webview", "browser" ], "type": "string" }, "Element": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true }, "charge": { "$ref": "#/components/schemas/Charge" }, "unit_rate": { "$ref": "#/components/schemas/UnitRate" } } }, "EnergyDailyData": { "type": "object", "properties": { "date": { "type": "string", "nullable": true }, "energy_wh": { "type": "number", "format": "float", "nullable": true }, "energy_m3": { "type": "number", "format": "float", "nullable": true }, "is_estimated": { "type": "boolean" }, "registers": { "type": "array", "items": { "$ref": "#/components/schemas/Register" }, "nullable": true } } }, "EnergyHighResolutionData": { "type": "object", "properties": { "interval_start": { "type": "string", "nullable": true }, "energy_wh": { "type": "number", "format": "float", "nullable": true }, "energy_m3": { "type": "number", "format": "float", "nullable": true }, "is_estimated": { "type": "boolean" } } }, "EnergyMonthlyData": { "type": "object", "properties": { "client_id": { "type": "integer", "format": "int64" }, "device_ref": { "type": "string", "nullable": true }, "from": { "type": "string", "nullable": true }, "to": { "type": "string", "nullable": true }, "energy_wh": { "type": "number", "format": "float", "nullable": true }, "energy_m3": { "type": "number", "format": "float", "nullable": true }, "is_estimated": { "type": "boolean" }, "registers": { "type": "array", "items": { "$ref": "#/components/schemas/Register" }, "nullable": true } } }, "ErrorDetails": { "required": [ "code", "description" ], "type": "object", "properties": { "code": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "request_id": { "type": "string", "nullable": true } } }, "FileRowError": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true } } }, "Fixed": { "type": "object", "properties": { "unit_rate": { "type": "number", "format": "double", "nullable": true } } }, "HomeProfileProperty": { "type": "object", "properties": { "key": { "type": "string", "nullable": true }, "value": { "nullable": true }, "value_type": { "nullable": true } } }, "IOutputFormatter": { "type": "object" }, "Interval": { "type": "object", "properties": { "from_minute": { "type": "integer", "format": "int64", "nullable": true }, "to_minute": { "type": "integer", "format": "int64", "nullable": true } } }, "JobEntry": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "reference": { "type": "string", "nullable": true }, "created_at_timestamp": { "type": "string" }, "state_updated_at_timestamp": { "type": "string" }, "entity": { "type": "string", "nullable": true }, "operation": { "$ref": "#/components/schemas/JobOperationType" }, "state": { "$ref": "#/components/schemas/JobEntryStateType" }, "number_of_rows": { "type": "integer", "format": "int32", "nullable": true }, "number_of_successful_rows": { "type": "integer", "format": "int32", "nullable": true }, "number_of_failed_rows": { "type": "integer", "format": "int32", "nullable": true }, "file_format": { "type": "string", "nullable": true }, "type": { "$ref": "#/components/schemas/JobType" } } }, "JobEntryStateType": { "enum": [ "received", "queued", "processing", "failed", "completed", "canceled" ], "type": "string" }, "JobFailedRow": { "type": "object", "properties": { "row_number": { "type": "integer", "format": "int32", "nullable": true }, "error_code": { "type": "string", "nullable": true }, "error_description": { "type": "string", "nullable": true } } }, "JobOperationType": { "enum": [ "upsert", "delete", "export", "multi-file-export" ], "type": "string" }, "JobResultRow": { "type": "object", "properties": { "is_successful": { "type": "boolean" }, "error": { "$ref": "#/components/schemas/FileRowError" }, "result": { "nullable": true }, "input": { "nullable": true } } }, "JobType": { "enum": [ "import", "export", "multi-file" ], "type": "string" }, "Location": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "eliq_id": { "type": "integer", "format": "int32", "nullable": true, "readOnly": true }, "name": { "type": "string", "nullable": true }, "user_id": { "type": "string", "nullable": true }, "spot_price_region_id": { "type": "string", "nullable": true }, "address": { "$ref": "#/components/schemas/LocationAddress" }, "geo": { "$ref": "#/components/schemas/LocationGeo" }, "meters": { "type": "array", "items": { "$ref": "#/components/schemas/Meter" }, "nullable": true }, "created_at_timestamp": { "type": "string", "nullable": true }, "location_profile_type": { "$ref": "#/components/schemas/ProfileType" } } }, "LocationAddress": { "type": "object", "properties": { "street_address": { "type": "string", "nullable": true }, "postal_code": { "type": "string", "nullable": true }, "city": { "type": "string", "nullable": true }, "country_code": { "type": "string", "nullable": true } } }, "LocationGeo": { "type": "object", "properties": { "latitude": { "type": "number", "format": "double", "nullable": true }, "longitude": { "type": "number", "format": "double", "nullable": true } } }, "LocationPriceFormula": { "type": "object", "properties": { "fuel": { "type": "string", "nullable": true }, "source": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "direction": { "type": "string", "nullable": true }, "from": { "type": "string", "nullable": true }, "to": { "type": "string", "nullable": true }, "currency_code": { "type": "string", "nullable": true }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Element" }, "nullable": true }, "price_multiplier": { "type": "number", "format": "double", "nullable": true } } }, "LocationProfileDataType": { "enum": [ "single_select", "multiple_select", "number" ], "type": "string" }, "LocationProfilePossibleValue": { "type": "object", "properties": { "value": { "type": "string", "nullable": true }, "developer_description": { "type": "string", "nullable": true } } }, "LocationProfilePropertyRequirement": { "type": "object", "properties": { "key": { "type": "string", "nullable": true }, "accepted_values": { "type": "array", "items": {}, "nullable": true } } }, "LocationProfileSelectedValue": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "value": { "nullable": true }, "from": { "type": "string", "format": "date-time", "nullable": true } } }, "LocationProfileSetting": { "required": [ "data_type", "dependent_properties", "developer_description", "group", "key", "possible_values", "selected_values", "tags" ], "type": "object", "properties": { "key": { "minLength": 1, "type": "string" }, "data_type": { "$ref": "#/components/schemas/LocationProfileDataType" }, "selected_values": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileSelectedValue" } }, "possible_values": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfilePossibleValue" } }, "limits": { "$ref": "#/components/schemas/LocationPropertyLimit" }, "dependent_properties": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfilePropertyRequirement" } }, "developer_description": { "minLength": 1, "type": "string" }, "tags": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileTag" } }, "group": { "minLength": 1, "type": "string" } } }, "LocationProfileSettings": { "required": [ "groups", "settings" ], "type": "object", "properties": { "settings": { "type": "array", "items": { "$ref": "#/components/schemas/LocationProfileSetting" } }, "groups": { "uniqueItems": true, "type": "array", "items": { "type": "string" } } } }, "LocationProfileTag": { "enum": [ "required_for_sh_to_work", "required_for_euc_to_work" ], "type": "string" }, "LocationProfileType": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ProfileType" } } }, "LocationProfileValueRequest": { "required": [ "key", "value" ], "type": "object", "properties": { "key": { "minLength": 1, "type": "string" }, "value": {}, "from": { "type": "string", "format": "date-time", "nullable": true } } }, "LocationProfileValueResponse": { "required": [ "key", "value" ], "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "key": { "minLength": 1, "type": "string" }, "value": {}, "from": { "type": "string", "format": "date-time", "nullable": true } } }, "LocationPropertyLimit": { "type": "object", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "step": { "type": "number", "format": "double" } } }, "Meter": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "eliq_id": { "type": "string", "nullable": true, "readOnly": true }, "location_id": { "type": "string", "nullable": true }, "name": { "type": "string", "nullable": true }, "model": { "type": "string", "nullable": true }, "fuel": { "type": "string", "nullable": true }, "type": { "type": "string", "nullable": true }, "is_sub_meter": { "type": "boolean", "nullable": true }, "category": { "type": "string", "nullable": true }, "category_percentage": { "type": "integer", "format": "int32", "nullable": true }, "supply_start_date": { "type": "string", "nullable": true }, "supply_end_date": { "type": "string", "nullable": true }, "created_at_timestamp": { "type": "string", "nullable": true }, "sync_status": { "type": "string", "nullable": true } } }, "NoContentResult": { "type": "object", "properties": { "statusCode": { "type": "integer", "format": "int32" } } }, "NonSmartMeterReadDto": { "type": "object", "properties": { "date": { "type": "string", "nullable": true }, "source": { "type": "string", "nullable": true }, "quality": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "unit": { "type": "string", "nullable": true }, "registers": { "type": "array", "items": { "$ref": "#/components/schemas/NonSmartRegisterDto" }, "nullable": true } } }, "NonSmartRegisterDto": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "index": { "type": "integer", "format": "int32", "nullable": true } } }, "NotificationDto": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/NotificationType" }, "header": { "type": "string", "nullable": true }, "content": { "type": "string", "nullable": true }, "link": { "$ref": "#/components/schemas/DtoLink" } } }, "NotificationType": { "enum": [ "unknown", "custom" ], "type": "string" }, "OkObjectResult": { "type": "object", "properties": { "value": { "nullable": true }, "formatters": { "type": "array", "items": { "$ref": "#/components/schemas/IOutputFormatter" }, "nullable": true }, "contentTypes": { "type": "array", "items": { "type": "string" }, "nullable": true }, "declaredType": { "type": "string", "nullable": true }, "statusCode": { "type": "integer", "format": "int32", "nullable": true } } }, "PatchLocationProfileRequestModel": { "type": "object", "properties": { "from": { "type": "string", "format": "date-time", "nullable": true }, "value": { "nullable": true } } }, "PortfolioAccount": { "required": [ "name" ], "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "name": { "minLength": 1, "type": "string" }, "created_at_utc": { "type": "string" } } }, "PortfolioGroup": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "nullable": true }, "status": { "$ref": "#/components/schemas/PortfolioGroupStatus" }, "created_at_utc": { "type": "string" }, "created_by_user_id": { "type": "string", "nullable": true }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioUser" }, "nullable": true }, "locations": { "type": "array", "items": { "$ref": "#/components/schemas/PortfolioLocation" }, "nullable": true }, "created_by_user": { "$ref": "#/components/schemas/PortfolioUser" } } }, "PortfolioGroupAddDto": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "users": { "type": "array", "items": { "type": "string" }, "nullable": true }, "locations": { "type": "array", "items": { "type": "string" }, "nullable": true } } }, "PortfolioGroupStatus": { "enum": [ "in_progress", "active", "disabled" ], "type": "string" }, "PortfolioLocation": { "required": [ "name" ], "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "name": { "minLength": 1, "type": "string" }, "created_at_utc": { "type": "string" } } }, "PortfolioUser": { "required": [ "name", "role" ], "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "name": { "minLength": 1, "type": "string" }, "role": { "$ref": "#/components/schemas/PortfolioUserRole" }, "created_at_utc": { "type": "string" }, "last_logon_utc": { "type": "string", "nullable": true }, "magic_link_emails": { "type": "array", "items": { "type": "string" }, "nullable": true } } }, "PortfolioUserRole": { "enum": [ "user", "admin", "owner" ], "type": "string" }, "PriceFormula": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "from": { "type": "string", "nullable": true }, "to": { "type": "string", "nullable": true }, "currency_code": { "type": "string", "nullable": true }, "elements": { "type": "array", "items": { "$ref": "#/components/schemas/Element" }, "nullable": true }, "price_multiplier": { "type": "number", "format": "double", "nullable": true }, "energy_unit": { "type": "string", "nullable": true } } }, "ProfileType": { "enum": [ "residential", "business", "undefined" ], "type": "string" }, "Register": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "energy_wh": { "type": "number", "format": "float", "nullable": true }, "energy_m3": { "type": "number", "format": "float", "nullable": true } } }, "SpotPrice": { "type": "object", "properties": { "provider": { "type": "string", "nullable": true }, "region": { "type": "string", "nullable": true }, "resolution": { "type": "string", "nullable": true }, "multiplier": { "type": "number", "format": "double", "nullable": true } } }, "Tou": { "type": "object", "properties": { "register_id": { "type": "string", "nullable": true }, "unit_rate": { "type": "number", "format": "double", "nullable": true }, "intervals": { "type": "array", "items": { "$ref": "#/components/schemas/Interval" }, "nullable": true }, "skip_intervals": { "type": "boolean", "nullable": true } } }, "UnitRate": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "fixed": { "$ref": "#/components/schemas/Fixed" }, "tou": { "$ref": "#/components/schemas/Tou" }, "block": { "$ref": "#/components/schemas/Block" }, "spot_price": { "$ref": "#/components/schemas/SpotPrice" }, "weekdays": { "type": "array", "items": { "type": "string" }, "nullable": true } } }, "User": { "type": "object", "properties": { "id": { "type": "string", "nullable": true }, "eliq_id": { "type": "integer", "format": "int32", "nullable": true, "readOnly": true }, "name": { "type": "string", "nullable": true }, "email": { "type": "string", "nullable": true }, "phone": { "type": "string", "nullable": true }, "language_code": { "type": "string", "nullable": true }, "locations": { "type": "array", "items": { "$ref": "#/components/schemas/Location" }, "nullable": true }, "created_at_timestamp": { "type": "string", "nullable": true } } } } }, "tags": [ { "name": "User" }, { "name": "Location" }, { "name": "Location profile" }, { "name": "Location home profile" }, { "name": "Location price formulas" }, { "name": "Meter" }, { "name": "Meter Energy Day" }, { "name": "Meter Energy High Resolution" }, { "name": "Meter Energy Reads" }, { "name": "Meter Energy Period" }, { "name": "Meter Max Demand" }, { "name": "Meter Price Formulas" }, { "name": "Jobs" }, { "name": "Portfolio Accounts" }, { "name": "Portfolio Groups" }, { "name": "Portfolio Locations" }, { "name": "Portfolio Users" }, { "name": "Client details" } ], "x-tagGroups": [ { "name": "Users", "tags": [ "User" ] }, { "name": "Locations", "tags": [ "Location", "Location profile", "Location home profile", "Location price formulas" ] }, { "name": "Meters", "tags": [ "Meter", "Meter Energy Day", "Meter Energy High Resolution", "Meter Energy Reads", "Meter Energy Period", "Meter Max Demand", "Meter Price Formulas" ] }, { "name": "Jobs", "tags": [ "Jobs" ] }, { "name": "Portfolio", "tags": [ "Portfolio Accounts", "Portfolio Groups", "Portfolio Locations", "Portfolio Users" ] }, { "name": "Client details", "tags": [ "Client details" ] } ], "servers": [ { "url": "https://eliq.data-management-api.eliq.com/integration/api/v1", "description": "Production (tenant-prefixed host; your own base URL is issued by Eliq — form: https://{tenant}.data-management-api.eliq.com/integration/api/v1)" } ] }