{"openapi":"3.1.0","info":{"title":"EnerSky Insight API","description":"The following endpoints allow users to request or revoke access, and read available meter data from\nend users.\n\n## Authentication and authorization\n\nAll endpoints require authentication via an API key header `X-API-Key`.\n\nAccess to resources for which the associated API key is not valid will result in a\n`401 Unauthorized` HTTP response. If the API-key is valid, but the resource is protected requiring a scope not present\nfor the given key, a `403 Forbidden` HTTP response will be returned.\n\n#### Example\n\n```\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/mp/inventory\n```\n\n## Rate limiting\n\nEach user may send up to:\n\n- 10 requests per second to the meter data endpoints: `/api/v1/md/{mpid}`, `/api/v1/md/{mpid}/changed`,\n  `/api/v1/md/{mpid}/summary` and `/api/v1/md/daily/{day}`.\n- 20 requests per second to other `GET` endpoints.\n- 5 requests per second to `POST`, `PUT`, `PATCH` and `DELETE` endpoints.\n\nEach IP address may also send up to 40 requests per second in total, whatever the API key.\n\nA limited request gets `429 Too Many Requests` with the code `ES-RQ-025` and a `Retry-After` header in\nseconds. Wait that long, then retry.\n\n## Compression\n\nTo enable GZip compressed responses, include the `Accept-Encoding: gzip` header in the request.\n","license":{"name":"Proprietary"},"version":"1.26.13"},"paths":{"/api/v1/elhub-data/grid-areas":{"get":{"tags":["Reference Data"],"summary":"Get all known grid areas","description":"## Get every grid area Elhub publishes.\n\nPermission required: **reference:read**\n\n### Description\n\nGrid areas keyed by metering grid area code, the EIC code that identifies a grid area. Each\narea carries its grid owner, its bidding zone, the grid type as eSett reports it and, for a sub\ngrid area, the parent grid it hangs off.\n\nAreas that Elhub has temporarily stopped publishing are kept rather than dropped, which happens\nfor days at a time while a grid operator is reconfigured. Read `last_seen` to tell those apart\nfrom the ones in the most recent fetch. An owner Elhub is not currently listing is named\n`UNKNOWN`.\n\nThis data is refreshed once a day, so polling more often returns the same answer.\n\nPlease see the `GridArea` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/elhub-data/grid-areas\n```","operationId":"elhub_grid_areas_api_v1_elhub_data_grid_areas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridAreasResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-004","detail":"You do not have permission to access this resource"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-504","detail":"Reference data is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/elhub-data/grid-areas/{mga_code}":{"get":{"tags":["Reference Data"],"summary":"Get a single grid area by metering grid area code","description":"## Get one grid area by its metering grid area code.\n\nPermission required: **reference:read**\n\n### Description\n\nOne grid area, with its owner, its bidding zone and its parent grid where it has one. An area\nElhub has only temporarily stopped publishing is still returned, carrying the `last_seen` from\nwhen it was last published. A code Elhub has never published answers 404.\n\nPlease see the `GridArea` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/elhub-data/grid-areas/50YNDCT-QFBCAF1B\n```","operationId":"elhub_grid_area_api_v1_elhub_data_grid_areas__mga_code__get","parameters":[{"name":"mga_code","in":"path","description":"The metering grid area code (an EIC).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GridArea"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-004","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-001","detail":"Grid area not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","mga_code"],"msg":"Invalid URL: invalid UTF-8 in path parameter","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-504","detail":"Reference data is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/elhub-data/parties":{"get":{"tags":["Reference Data"],"summary":"Get all known market parties","description":"## Get every market party Elhub publishes.\n\nPermission required: **reference:read**\n\n### Description\n\nMarket parties keyed by GLN (Global Location Number, the identifier Elhub uses for the\nfunctional roles of an organization). One organization can hold several, and some roles are\nbarred from sharing one. Each party carries the market roles it holds, such as `GridOwner`, and\nthe grid areas it owns.\n\nParties that Elhub has temporarily stopped listing are kept rather than dropped, which happens\nfor days at a time while a grid operator is reconfigured. Read `last_seen` to tell those apart\nfrom the ones in the most recent fetch.\n\nThis data is refreshed once a day, so polling more often returns the same answer.\n\nPlease see the `Party` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/elhub-data/parties\n```","operationId":"elhub_market_parties_api_v1_elhub_data_parties_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketPartiesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-004","detail":"You do not have permission to access this resource"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-504","detail":"Reference data is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/elhub-data/parties/{gln}":{"get":{"tags":["Reference Data"],"summary":"Get a single market party by GLN","description":"## Get one market party by its GLN.\n\nPermission required: **reference:read**\n\n### Description\n\nOne market party, with the roles it holds and the grid areas it owns. A party Elhub has only\ntemporarily stopped listing is still returned, carrying the `last_seen` from when it was last\npublished. A GLN Elhub has never listed answers 404.\n\nPlease see the `Party` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/elhub-data/parties/7080011062658\n```","operationId":"elhub_market_party_api_v1_elhub_data_parties__gln__get","parameters":[{"name":"gln","in":"path","description":"The party's Global Location Number: 13 digits.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Party"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-004","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-002","detail":"Market party not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","gln"],"msg":"Invalid URL: invalid UTF-8 in path parameter","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-504","detail":"Reference data is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/end-users":{"post":{"tags":["End Users"],"summary":"Register a new end user (requires active end user module)","description":"## Register a new end user (not available for own GLN users without explicit OEM end user management enabled).\n\nPermission required: **enduser:write**\n\n**DEPRECATED**: The response does not carry the end user's `id`, which the `/v2` end-user endpoints\nneed. Use `POST /v2/end-users` instead.\n\nThis endpoint allows end users to be registered. Requires end user management to be enabled for the user\ncalling the endpoint.\n\nNewly registered end users have to accept the end user agreement before their metering points can be\nsubscribed to. Send them an access link (`POST /mp/subscribe/token`) and share the returned URL: they\naccept and pick their metering points in one flow.\n\nThis endpoint registers businesses only. Private end users are registered through `POST /v2/end-users` with\n`date_of_birth`, and a request with `private` set to `true` returns 422.\n\n* `private`: Must be `false`.\n* `identifier`: Organization number, nine digits.\n* `first_name`: The given name (and optional middle names) of the contact person.\n* `last_name`: Family name of the contact person.\n* `email`: The e-mail address of the contact person.\n* `company_name`: Name of the company as registered in the official records. Must be omitted or `null` if `private`\n    is `true`.\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v1/end-users -d '{\n    \"private\": false,\n    \"identifier\": \"900900900\",\n    \"first_name\": \"Firstname\",\n    \"last_name\": \"Lastname\",\n    \"email\": \"firstname.lastname@testcompany.net\",\n    \"company_name\": \"TestCompany AS\"\n}'\n```","operationId":"register_end_user_api_v1_end_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterEndUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterEndUserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-001","detail":"User not found"}}}},"409":{"description":"End user already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-008","detail":"End user already exists"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body"],"msg":"Value error, company_name is required","type":"value_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]}},"/api/v1/end-users/signature":{"post":{"tags":["End Users"],"summary":"Send end user agreement signature request (temporarily unavailable)","description":"## Send end user agreement signature request (not applicable if using own GLN).\n\nPermission required: **enduser:write**\n\n**This endpoint is temporarily unavailable and always answers 503.** The signature e-mail was sent by our\nsigning provider, which no longer offers it.\n\nSend the end user an access link instead: create one with `POST /mp/subscribe/token` and share the\nreturned URL. They confirm their agreement and their metering points in one flow.\n\n* `identifier`: Organization number of the end user, or the identifier Enersky assigned to a private end user.\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v1/end-users/signature -d '{\n    \"identifier\": \"900900900\"\n}'\n```","operationId":"send_end_user_signature_request_api_v1_end_users_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEndUserAgreementSignatureRequest"}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","identifier"],"msg":"missing field `identifier`","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-010","detail":"Temporarily unavailable. Send the end user an access link instead: create one with POST /mp/subscribe/token and share the returned URL."}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/md/daily/{day}":{"get":{"tags":["Meter Data"],"summary":"Get meterdata for all metering points on a specific date.","description":"## Retrieve metering values for all metering points for a given date.\n\nPermission required: **meterdata:read**\n\nThis endpoint reads all available metering values on a given date. By default the date is\nlocalized in central european timezone (DST-aware). This can be overridden by providing a valid\ntimezone string in the optional `tz` query parameter.\n\nTo return the metering values in CSV format, specify `?format=csv` as a query parameter.\n\n#### Example\n\nGet all metering values at 2025-01-01 in central european timezone.\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/md/daily/2025-01-01\n```\n\nGet all metering values at 2025-01-01 in UTC.\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/md/daily/2025-01-01?tz=UTC\n```","operationId":"daily_api_v1_md_daily__day__get","parameters":[{"name":"day","in":"path","description":"The date to read, as YYYY-MM-DD.","required":true,"schema":{"type":"string"}},{"name":"tz","in":"query","description":"Optionally use a different timezone than the default","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"`json` or `csv`.","required":false,"schema":{"type":"string","description":"Which of the two body formats to answer with.","enum":["json","csv"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MeteringValuesByChannel"}},"example":[{"channels":[{"direction":"consumption","product":"8716867000030","resolution":"PT1H","updated":"2025-04-06T20:01:30.133Z","values":[{"method":"metered","remarks":null,"ts":"2025-04-05T22:00:00Z","value":"2.025"}]}],"mpid":"703060000044520138"}]}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-012","detail":"Invalid time zone format."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","day"],"msg":"path_invalid","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/md/head":{"get":{"tags":["Meter Data"],"summary":"Get the last known meter data timestamp for each metering point","description":"## Retrieve the last timestamp for each metering value time series in your inventory.\n\nPermission required: **meterdata:read**\n\nThis endpoint is useful for providing a quick overview of the head of each meter data\ntimeseries in your inventory. Depending on the type of metering point, or potential delays in\nreporting by the grid operator, the most recent metering value might differ between each time\nseries.\n\nMetering points that have not received new metering values for a month are omitted from the\nsearch results.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/md/head\n```","operationId":"head_api_v1_md_head_get","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryTimestampsResponse"},"example":{"count":3,"latest":{"703060000044520138":"2024-08-22T09:16:39.453Z","703060000044520139":"2024-08-22T09:16:39.453Z","703060000044520140":"2024-08-22T09:16:39Z"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/md/{mpid}":{"get":{"tags":["Meter Data"],"summary":"Get metering values for a metering point","description":"## Read metering values for a given MPID.\n\nPermission required: **meterdata:read**\n\nBy default this endpoint will read the complete timeseries for both **consumption** and\n**production** directions.\n\nYou can optionally limit the query by selecting a specific `direction`, `product`, `start` and\n`end` filters.\n\nTimestamps must be URL-encoded, as `+` character (`%2B`) in query parameters represent a space.\n\nTo return the metering values in CSV format, specify `?format=csv` as a query parameter.\n\n### Description\n\nEach data point in the timeseries includes the following fields:\n\n* `ts`: The timestamp of the value, which depending on the metering point will be a 1 hour\n  (00:00 - 01:00) or 15 minute (00:00 - 00:15) block.\n* `direction`: The flow direction of the reported value, either `production` or `consumption`.\n* `product`: Product code of what type is being measured on this channel, i.e 8716867000030 for\n  Energy Active.\n* `resolution`: The resolution code of the series, i.e `PT60M` / `PT1H` or `PT15M`.\n* `value`: The value, in kWh or kVArh depending on channel, as a decimal (string), produced or\n  consumed during the timeframe.\n* `method`: How the measurement was performed, for example `metered` or `estimated`.\n* `updated`: When the reported value was registered in the source system (i.e Elhub or\n  DataHub). This field can be used to indicate corrections to historical values.\n* `remarks`: This field is only used to provide additional context if the registered value is\n  for example an estimate, and would then indicate if it is a `preliminary` or `final` estimate.\n\n#### Examples\n\nGet the entire metering value timeseries for a metering point:\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/md/707057500012345678\n```\n\nGet metering values for a metering point within a specific timeframe (i.e month of january):\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/md/707057500012345678 \\\n  --url-query 'start=2024-01-01T00:00:00+02:00' --url-query 'end=2024-02-01T00:00:00+02:00'\n```\n\nGet metering values only for \"production\":\n\n```text\ncurl -H \"X-API-Key: my-api-key\" 'https://insight.enersky.no/api/v1/md/707057500012345678?direction=production'\n```","operationId":"usage_api_v1_md__mpid__get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","description":"Which flow direction to query for (**both**, **consumption** or **production**)","required":false,"schema":{"type":"string","description":"Which flow direction to query for.","enum":["both","consumption","production"]}},{"name":"product","in":"query","description":"Optional product code to filter on","required":false,"schema":{"type":"string","description":"What is being measured on a channel: an Elhub product code.","enum":["8716867000030","8716867000047","8716867000139","8716867000146","4700000000301","4700000000302","4700000000303","4700000000101","4700000000201"]}},{"name":"start","in":"query","description":"An optional starting timestamp (ISO8601) to limit your query from.","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","description":"An optional non-inclusive end timestamp (ISO8601) to limit your query to.","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","description":"`json` or `csv`.","required":false,"schema":{"type":"string","description":"Which of the two body formats to answer with.","enum":["json","csv"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringValuesResponse"},"example":{"mpid":"707057500012345678","values":[{"direction":"consumption","method":"metered","product":"8716867000030","remarks":null,"resolution":"PT1H","ts":"2025-04-05T22:00:00+00:00","updated":"2025-04-06T20:01:30.133+00:00","value":"2.025"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-006","detail":"mpid must be 18 digits"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"Metering point not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","direction"],"msg":"unknown variant `sideways`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/md/{mpid}/changed":{"get":{"tags":["Meter Data"],"summary":"Get recently updated metering values for a metering point","description":"## Retrieve the metering values that have been registered after the specified timestamp.\n\nPermission required: **meterdata:read**\n\nThis endpoint is useful for fetching new meter data that has been added or corrected since your\nlast fetch.\n\nIt differs from the `/md/{mpid}` usage endpoint in that it will include meter data based on when\nthe values were registered in the source system. This means it will also include potential\ncorrections of historical data for this metering point.\n\nTo return the metering values in CSV format, specify `?format=csv` as a query parameter.\n\n#### Example\n\nAfter fetching the complete time series for your metering points via `/md/{mpid}`, select the\nmost recent `updated` timestamp for each time series.\n\nThen, at your preferred interval, call `/changed?updated_after={last_updated_timestamp}`.\nRemember to change the `last_updated_timestamp` to whatever is the most recently updated in the\nresponse.\n\nTimestamps must be URL-encoded, as `+` character (`%2B`) in query parameters represent a space.\n\n```text\ncurl -H \"X-API-Key: my-api-key\" \\\n  https://insight.enersky.no/api/v1/md/707057500012345678/changed \\\n  --url-query 'updated_after=2024-10-01T00:00:00+02:00'\n```\n\nWill return an empty response if there are no updated metering values for the metering point.","operationId":"updated_after_api_v1_md__mpid__changed_get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}},{"name":"updated_after","in":"query","description":"A required datetime timestamp in ISO format","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","description":"`json` or `csv`.","required":false,"schema":{"type":"string","description":"Which of the two body formats to answer with.","enum":["json","csv"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringValuesResponse"},"example":{"mpid":"707057500012345678","values":[{"direction":"consumption","method":"metered","product":"8716867000030","remarks":null,"resolution":"PT1H","ts":"2025-04-05T22:00:00+00:00","updated":"2025-04-06T20:01:30.133+00:00","value":"2.025"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-010","detail":"updated_after must be an ISO 8601 timestamp with an offset"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"Metering point not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","updated_after"],"msg":"missing field `updated_after`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/md/{mpid}/summary":{"get":{"tags":["Meter Data"],"summary":"Get a summary of the metering values on a given metering point","description":"## Get a summary of the metering values for a metering point.\n\nPermission required: **meterdata:read**\n\nThis endpoint will provide a summary of the metering values stored for a given metering point.\nYou can optionally limit the query by selecting a specific `start` and/or `end` filter to limit\nthe time range the summary will be generated for.\n\nTimestamps must be URL-encoded, as `+` character (`%2B`) in query parameters represent a space.\n\n### Description\n\nAn aggregate is produced for each channel (combination of direction, product and resolution),\ncontaining the following attributes:\n\n* `direction`: The direction of the channel.\n* `product`: The product code of the channel.\n* `resolution`: The resolution code of the channel.\n* `min_ts`: The first timestamp in the timeseries.\n* `max_ts`: The last timestamp in the timeseries.\n* `min_positive_ts`: The timestamp of the first positive value in the timeseries.\n* `max_positive_ts`: The timestamp of the last positive value in the timeseries.\n* `min_value`: The minimum value in the timeseries.\n* `max_value`: The maximum value in the timeseries.\n* `total_value`: The sum total value in the timeseries.\n\nIf there is no meterdata registered yet, or your query filters exclude all metering values, the\nresulting `channels` list will be empty.","operationId":"get_meterdata_summary_api_v1_md__mpid__summary_get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"An optional starting timestamp (ISO8601) to limit your query from.","required":false,"schema":{"type":"string"}},{"name":"end","in":"query","description":"An optional non-inclusive end timestamp (ISO8601) to limit your query to.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterDataSummaryResponse"},"example":{"channels":[{"direction":"consumption","max_positive_ts":"2025-04-06T21:00:00Z","max_ts":"2025-04-06T21:00:00Z","max_value":"12.500","min_positive_ts":"2025-04-05T22:00:00Z","min_ts":"2025-04-05T22:00:00Z","min_value":"0.000","product":"8716867000030","resolution":"PT1H","total_value":"104.775"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-009","detail":"End timestamp cannot be before start timestamp"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-001","detail":"Metering point not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","start"],"msg":"duplicate field `start`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/inventory":{"get":{"tags":["Metering Points"],"summary":"List status of all metering points in your inventory","description":"## List all metering points in your inventory, containing metering point status.\n\nPermission required: **meteringpoint:read**\n\nThe inventory includes a summary of all metering points you are currently subscribed to. This\nsummary includes `mpid`, `state`, `processing`, `updated_at`, `expires` and `notice` fields.\n\nThe `updated_at` field indicates when we last received metering values (timeseries data) from\nthe source system (i.e Elhub). If the `updated_at` field is `null`, we do not have any\ntimeseries data for this metering point yet. This is therefore the recommended way of polling\nto check if new metering values have arrived, and comparing the timestamps against the result\nof the last poll. For the metering points which have changed since last poll, one can then\nchoose which of the /md/{mpid} meterdata endpoints to invoke based on your use case.\n\nPlease refer to `MeteringPointStatus` in the schema section for a description of each field in\nthe response.\n\nDetailed information about a metering point, including master data, is accessible via the\n`/mp/{mpid}` endpoint.\n\nTo limit the response to only include metering points associated with a specific end user,\nspecify the `end_user_identifier` query parameter with the end user's org.no, or the identifier\nEnersky assigned to a private end user when it was registered. Requires an active end user module\nconfigured for your user account. If not active, the response will always be empty.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/mp/inventory\n```","operationId":"inventory_api_v1_mp_inventory_get","parameters":[{"name":"end_user_identifier","in":"query","description":"Optionally filter on metering points associated with a given end user identifier.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryResponse"},"example":{"count":1,"inventory":[{"expires":"2024-10-08T10:55:18.803000+02:00","mpid":"707057500012345678","notice":null,"processing":false,"state":"active","updated_at":"2024-10-08T10:55:18.803000+02:00"}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-004","detail":"end_user_identifier must be a 9 digit organization number, or the identifier returned when the end user was registered"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","end_user_identifier"],"msg":"duplicate field `end_user_identifier`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/subscribe":{"post":{"tags":["Metering Points"],"summary":"Subscribe to a metering point","description":"## Request access to metering values for a given metering point ID.\n\nPermission required: **meteringpoint:write**\n\nThis is an asynchronous request, and the result of the operation will become visible in the\ninventory shortly.\n\n* `end_user_identifier` is the organization number of the company owning the metering point, or\n  for a private person the identifier Enersky assigned when they were registered.\n* `mpid` is the metering point ID\n\nThe following reasons can cause a non-OK status code apart from auth or syntactic validation:\n\n* The end user does not exist (404)\n* The end user has not accepted the end user agreement (409)\n* The metering point is already associated with a different end user (400)\n* This metering point already exists, please contact support (409)\n* The caller is configured with using its own GLN, but an end_user_identifier was provided (400)\n* There is an ongoing request to the source system preventing the action at this time (423)\n* Generic server error (500)\n* Elhub is temporarily unavailable (503)\n\nIn order to track the status of the request, check the `GET /mp/{mpid}` endpoint for details.\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v1/mp/subscribe -d '{\n    \"end_user_identifier\": \"900900900\",\n    \"mpid\": \"707057500012345678\"\n}'\n```","operationId":"subscribe_api_v1_mp_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-003","detail":"The end user specified is not associated with this metering point"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"No end user found for the given identifier"}}}},"409":{"description":"End user agreement not signed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-007","detail":"End user agreement not signed. Access can be requested once the end user has signed."}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","mpid"],"msg":"mpid must be 18 digits","type":"json_data_error"}]}}}},"423":{"description":"Action temporarily blocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-004","detail":"An ongoing request prevents the action at this time, please try again in a few minutes"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected error occurred, please contact system administrator"}}}},"502":{"description":"The broker answered with a body we could not read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-500","detail":"The upstream service sent a response we could not read"}}}},"503":{"description":"Temporarily unavailable, worth retrying","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EH-500","detail":"The Elhub service is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/subscribe/token":{"get":{"tags":["Metering Points"],"summary":"Retrieve a list of web flow subscribe tokens","description":"## Retrieve all or a filtered list of subscribe tokens.\n\nPermission required: **meteringpoint:read**\n\n**DEPRECATED**: This endpoint identifies the end user by their identifier and does not return\nthe link URL. Use `GET /v2/mp/access-links` instead, which identifies them by `id` and returns\nthe URL.\n\nRetrieve all web flow subscribe tokens, or optionally all tokens for a specific end user, given\nby `end_user_identifier`: the organization number, or the identifier Enersky assigned to a\nprivate end user.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/mp/subscribe/token\n```","operationId":"subscribe_get_webflow_tokens_api_v1_mp_subscribe_token_get","parameters":[{"name":"end_user_identifier","in":"query","description":"Optionally filter on tokens associated with a given end user identifier.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeTokenListResponse"},"example":{"tokens":[{"created_at":"2026-03-02T09:14:05+00:00","end_user_identifier":"900900900","token":"6775cccb-9a45-43cd-b53f-c21c4b6506c5"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","end_user_identifier"],"msg":"duplicate field `end_user_identifier`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Metering Points"],"summary":"Create a subscribe token to enable end users to choose metering points in a webapp based flow","description":"## Create a token for end users to grant access to metering points via the web based flow.\n\nPermission required: **meteringpoint:write**\n\n**DEPRECATED**: This endpoint takes the end user's identifier. Use `POST /v2/mp/access-links`\ninstead, which takes their `id`.\n\nIn Elhub, this process is called BRS-NO-624, and enables a more streamlined process for granting\naccess to metering points by the end user. With this flow, prior knowledge of the metering point\nIDs is not required, as the end user will select which metering points they want to grant access\nto from a simplified list.\n\n### How the flow works\n\n1. Call this endpoint to create a subscribe token (access link).\n2. Store the returned `request_id` (UUID), which will be used to check which metering points\n   were given access to.\n3. Refer, or redirect your end user to the URL returned in the `url` field, either directly from\n   your system, or for example as a link via email or SMS.\n4. Once the end user has completed the steps in the webapp, and new metering points were granted\n   access to, they will appear in your inventory with the corresponding `request_id` from the\n   token.\n\nIt is only necessary to create one token per end user you wish to differentiate, as the same\ntoken can be used to add additional metering points at a later point in time. You can still\ncreate a new token if you want to.\n\nTo see the history for a given token, see the `/mp/subscribe/token/{request_id}` endpoint.\n\n`end_user_identifier` is the organization number, or the identifier Enersky assigned to a\nprivate end user when it was registered.\n\n#### Example\n\nFor API users that use their own GLN, `end_user_identifier` must be set to `null`.\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" \\\n  https://insight.enersky.no/api/v1/mp/subscribe/token -d '{\n\"end_user_identifier\": \"900900900\"\n}'\n```","operationId":"subscribe_create_webflow_token_api_v1_mp_subscribe_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscribeWebFlowTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscribeWebFlowTokenResponse"},"example":{"created_at":"2026-03-02T10:14:05+01:00","request_id":"6775cccb-9a45-43cd-b53f-c21c4b6506c5","url":"https://insight.enersky.no/web/elhub/token/6775cccb-9a45-43cd-b53f-c21c4b6506c5"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-001","detail":"end_user_identifier must be null (end user module not active for your account)"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"No end user found for the given identifier"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","end_user_identifier"],"msg":"missing field `end_user_identifier`","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/subscribe/token/{request_id}":{"get":{"tags":["Metering Points"],"summary":"Retrieve history associated with a subscribe token in a webapp based flow","description":"## Retrieve history for a webflow subscribe token.\n\nPermission required: **meteringpoint:read**\n\n**DEPRECATED**: This endpoint reports only the metering point IDs. Use\n`GET /v2/mp/access-links/{token}` instead, which also reports the access level and expiry per\nmetering point, and the end user.\n\nRetrieve a list of receipts received through the webapp based metering point access for a\nspecific token.\n\nThe activity history will include a list of metering point IDs that were granted access to at a\ngiven time, or an error message indicating why no access was given. If there was an error, for\nexample if the session was aborted, or the user had no more available metering points, the\n`mpids` list will be empty.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" \\\n  https://insight.enersky.no/api/v1/mp/subscribe/token/6775cccb-9a45-43cd-b53f-c21c4b6506c5\n```","operationId":"subscribe_get_webflow_token_history_api_v1_mp_subscribe_token__request_id__get","parameters":[{"name":"request_id","in":"path","description":"The token, as returned when it was created.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeWebFlowTokenHistoryResponse"},"example":{"history":[{"created_at":"2026-03-02T10:20:31.5+01:00","error":null,"mpids":["707057500012345678"]}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-004","detail":"Token not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","request_id"],"msg":"UUID parsing failed","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]},"delete":{"tags":["Metering Points"],"summary":"Delete a subscribe token used for the webapp based flow","description":"## Delete a webflow subscribe token.\n\nPermission required: **meteringpoint:write**\n\n**DEPRECATED**: This is `v1` of the access link surface. Use\n`DELETE /v2/mp/access-links/{token}` instead.\n\n**This cannot be undone**. The link stops working. An end user who has not finished the flow can\nno longer use it to grant access to metering points or accept their end user agreement. The Elhub\nevent history for the token is no longer reachable.\n\nMetering points already granted through the token keep their access. The token is only used to\nset the access up, so deleting it never removes a metering point from your inventory. Use\n`POST /v1/mp/unsubscribe` for that.\n\n#### Example\n\n```text\ncurl -X DELETE -H \"X-API-Key: my-api-key\" \\\n  https://insight.enersky.no/api/v1/mp/subscribe/token/6775cccb-9a45-43cd-b53f-c21c4b6506c5\n```","operationId":"subscribe_delete_webflow_token_api_v1_mp_subscribe_token__request_id__delete","parameters":[{"name":"request_id","in":"path","description":"The token, as returned when it was created.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscribeTokenResponse"},"example":{"success":true,"token":"6775cccb-9a45-43cd-b53f-c21c4b6506c5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-004","detail":"Token not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","request_id"],"msg":"UUID parsing failed","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/unsubscribe":{"post":{"tags":["Metering Points"],"summary":"Unsubscribe from a metering point","description":"## Remove access to metering values for a given MPID.\n\nPermission required: **meteringpoint:write**\n\nThis is an asynchronous request, and will only fail if there is an issue with communicating\nwith the source system (i.e Elhub or DataHub).\n\nAccess to the metering point is immediately revoked, and it will no longer appear in the\ninventory.\n\nThe following reasons can cause a non-OK status code apart from auth or syntactic validation:\n\n* The metering point does not exist in your inventory (404)\n* Generic server error (500)\n* Elhub is temporarily unavailable (503)\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v1/mp/unsubscribe -d '{\n    \"mpid\": \"707057500012345678\"\n}'\n```","operationId":"unsubscribe_api_v1_mp_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"The specified MPID was not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","mpid"],"msg":"mpid must be 18 digits","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected error occurred, please contact system administrator"}}}},"502":{"description":"The broker answered with a body we could not read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MD-500","detail":"The upstream service sent a response we could not read"}}}},"503":{"description":"Temporarily unavailable, worth retrying","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EH-500","detail":"The Elhub service is temporarily unavailable, please try again later"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/mp/{mpid}":{"get":{"tags":["Metering Points"],"summary":"Get detailed information about a metering point","description":"## Retrieve detailed information about a specific metering point in your inventory.\n\nPermission required: **meteringpoint:read**\n\n**DEPRECATED**: This is `v1` of this endpoint, and provides only a subset of meter and customer\nmetadata. For the complete set of available metadata, please use the full `v2` of this endpoint.\n\nThis endpoint provides details of a specific metering point in addition to the summary provided\nin the `/mp/inventory` endpoint. Please refer to `MeteringPointResponse` in the schema\ndefinition for a complete description of each field in the response.\n\n### Overview\n\nA metering point will transition through the following states:\n\n* `pending`: The subscription request was received by the source system and is currently\n  awaiting end user approval.\n* `active`: The metering point subscription is operating normally and is receiving meter data.\n* `failed`: The subscription request failed, most often due to non-existing `mpid`. Further\n  details will be present in the `notice` field.\n* `expired`: A pending request for access to end user was not granted within the allowed\n  timeframe, or an active subscription was not allowed to be extended by the end user for\n  metering points with time limited access.\n* `revoked`: Access to the metering point was either revoked in the source system (by the end\n  user), or via an `/unsubscribe` request.\n\nThe `processing` field indicates whether or not there currently is an active in-flight request\nto the source system, for which we are awaiting a response. If this flag is `true`, some actions\nmight be temporarily blocked. An example is performing a `/subscribe` request during a phase\nwhere there is an in-flight `/unsubscribe` request currently being processed.\n\nThe `updated_at` field indicates when this metering point last received meter data. This might\nalso include corrections to historical data, hence does not correspond to the head of the time\nseries.\n\nIf the metering point is in `pending` state (awaiting end user approval) or `active`, but the\nunderlying source system only provides time-limited access (i.e 1 year periods), the `expires`\nfield will indicate when it expires.\n\nAny additional information detailing the specifics of a given state will be present in the\n`notice` field, for example why a subscription failed.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/mp/707057500012345678\n```","operationId":"metering_point_api_v1_mp__mpid__get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringPointResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-006","detail":"mpid must be 18 digits"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"Metering point not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","mpid"],"msg":"Invalid URL: invalid UTF-8 in path parameter","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"deprecated":true,"security":[{"APIKeyHeader":[]}]}},"/api/v1/prices/day-ahead/{year}/{month}":{"get":{"tags":["Prices"],"summary":"Get the Day-Ahead spot prices for the nordics","description":"## Get the Day-Ahead spot prices for the nordics for a given month.\n\nPermission required: **price:read**\n\nRequires price module to be enabled for the user calling the endpoint.\n\n### Description\n\nThis endpoint returns spot prices for the nordics, sourced from ENTSO-e. Prices for the next day\nshould be available no later than 14:30. If prices are not available by 14:30, there is most\nlikely an ongoing issue with the source system, and retries will be periodically performed until\nprices are fetched.\n\nAll price area values are in Euro per megawatthour (EUR/MWh) by default. Requesting\n`unit=local/kWh` reports each price area in its own country's currency per kilowatthour (NOK,\nSEK, DKK, and EUR for Finland) at five decimals, converted with the estimated FX curves in the\n`/prices/exchange-rates` endpoint. A market date that has no estimated rate is left out of the\nanswer. Please note that these FX curves are not sourced from Nordpool and should thus not be\nused for invoicing/trading.\n\nMonth parameter must be in ISO format (1-12).\n\nPlease see the `DayAheadSpotPricesResponse` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/prices/day-ahead/2025/11\ncurl -H \"X-API-Key: my-api-key\" \"https://insight.enersky.no/api/v1/prices/day-ahead/2025/11?unit=local/kWh\"\n```","operationId":"dayahead_spot_prices_api_v1_prices_day_ahead__year___month__get","parameters":[{"name":"year","in":"path","description":"Calendar year, from 2022 up to next year.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"month","in":"path","description":"Calendar month, 1 to 12.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"resolution","in":"query","description":"Specifies MTU (market time unit). Defaults to PT15M which is market standard. Requesting\nPT1H will perform the same resampling Nordpool does when publishing the PT1H day ahead spot\nprice indices.","required":false,"schema":{"type":"string","description":"The market time unit the day-ahead series is reported in.","enum":["PT15M","PT1H"]}},{"name":"unit","in":"query","description":"Specifies the unit the price area values are reported in. Defaults to EUR/MWh. Requesting\nlocal/kWh reports each price area in its own country's currency per kilowatthour (NOK, SEK,\nDKK, and EUR for Finland) at five decimals, and leaves out any market date that has no\nestimated exchange rate.","required":false,"schema":{"type":"string","description":"The unit the day-ahead price area values are reported in.","enum":["EUR/MWh","local/kWh"]}},{"name":"format","in":"query","description":"Which body to answer with. Defaults to json.","required":false,"schema":{"type":"string","description":"Which of the two body formats to answer with.","enum":["json","csv"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayAheadSpotPricesResponse"},"example":{"prices":[{"DK1":43.66,"DK2":43.66,"FI":16.42,"NO1":22.14,"NO2":22.14,"NO3":19.88,"NO4":16.42,"NO5":22.14,"SE1":19.88,"SE2":19.88,"SE3":19.88,"SE4":43.66,"resolution":"PT15M","ts":"2026-02-28T23:00:00+00:00","updated":"2026-02-28T13:05:00+00:00"}]}},"text/csv":{"schema":{"type":"string"},"example":"ts,resolution,updated,NO1,NO2,NO3,NO4,NO5,DK1,DK2,SE1,SE2,SE3,SE4,FI\n2026-02-28T23:00:00+00:00,PT15M,2026-02-28T13:05:00+00:00,22.14,22.14,19.88,16.42,22.14,43.66,43.66,19.88,19.88,19.88,43.66,16.42\n"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-003","detail":"Month must be in 1-12 range"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","resolution"],"msg":"unknown variant `PT30M`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/prices/exchange-rates":{"get":{"tags":["Prices"],"summary":"Get an estimated exchange rate curve for the nordics","description":"## Get estimated exchange rate curves for the nordics.\n\nPermission required: **price:read**\n\nRequires price module to be enabled for the user calling the endpoint.\n\n### Description\n\nAs Nordpool does not report the exchange rates used in Day-Ahead pricing to ENTSO-e, this\nendpoint uses public FX rate curves as base curves to compute estimated exchange rates.\n\nThis means that these curves will not match Nordpool exchange rates exactly, and thus should not\nbe used for invoicing/trading.\n\nOn regular banking days with open markets, exchange rates for tomorrow (day-ahead) will become\navailable a few minutes after 13:20. On weekends and during holidays, preliminary rates are\ncalculated and are normally available a few minutes after 09:15.\n\nDates marked with **preliminary**: `true` can be adjusted when today's curve calculation is\nexecuted.\n\nPlease see the `ExchangeRatesResponse` model for a detailed description of each field.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v1/prices/exchange-rates\n```","operationId":"estimated_exchange_rates_api_v1_prices_exchange_rates_get","parameters":[{"name":"format","in":"query","description":"Which body to answer with. Defaults to json.","required":false,"schema":{"type":"string","description":"Which of the two body formats to answer with.","enum":["json","csv"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRatesResponse"},"example":{"base_currency":"EUR","base_currency_unit":1,"base_curve":"intraday_market","quote_currency_unit":1,"quotes":[{"DKK":7.46125,"NOK":11.7423,"SEK":11.2045,"date":"2026-03-27","preliminary":false,"updated":"2026-03-26T12:20:31Z"}]}},"text/csv":{"schema":{"type":"string"},"example":"date,updated,preliminary,NOK,SEK,DKK,base_curve,base_currency,base_currency_unit,quote_currency_unit\r\n2026-03-27,2026-03-26T12:20:31+00:00,0,11.7423,11.2045,7.46125,intraday_market,EUR,1,1\r\n"}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","format"],"msg":"unknown variant `xml`","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/status":{"get":{"tags":["Service Status"],"summary":"Get Service Status","description":"## Retrieve service incidents.\n\nPermission required: None (public)\n\n### Description\n\nFetches active, upcoming or historical incidents related to the operational status of the\nEnerSky platform.\n\nThe `description` field in an `Incident` object, and the `description` field in each update\nmessage contains text in Markdown syntax.\n\n#### Example\n\n```text\ncurl 'https://insight.enersky.no/api/v1/status'\n```","operationId":"get_service_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentsResponse"},"example":{"active":[{"data":{"component":"api","description":"Meter data deliveries are **delayed**.","domain":"elhub","title":"Elhub is answering slowly","updates":[{"description":"Elhub reports the cause is found.","timestamp":"2026-03-02T11:20:00Z"}]},"end":null,"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","start":"2026-03-02T09:14:05Z"}],"previous":[],"upcoming":[]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}}}},"/api/v2/end-users":{"get":{"tags":["End Users"],"summary":"List your end users","description":"## List the end users registered under your account.\n\nPermission required: **enduser:read**\n\nRequires end user management to be enabled for the user calling the endpoint, and returns 403 otherwise.\nReturns the complete list, in the order the end users were registered.\n\nThe `stage` field tells you whether metering points can be subscribed to on an end user's behalf: only\n`completed` allows it. Please refer to `EndUserResponseV2` in the schema definition for a complete\ndescription of each field in the response.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/end-users\n```","operationId":"list_end_users_api_v2_end_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EndUserResponseV2"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["End Users"],"summary":"Register a new end user (requires active end user module)","description":"## Register a new end user (not applicable if using own GLN).\n\nPermission required: **enduser:write**\n\nRequires end user management to be enabled for the user calling the endpoint, and returns 403 otherwise.\nThe response carries the new end user's `id`, which the corresponding v1 endpoint does not provide.\n\nNewly registered end users have to accept the end user agreement before their metering points can be\nsubscribed to. Send them an access link (`POST /v2/mp/access-links`) and share the returned URL: they\naccept and pick their metering points in one flow.\n\nA private end user is registered with `date_of_birth` and no `identifier`. For a private end user, Enersky\ngenerates the identifier as `eu-` and eight hex digits, and returns it in the response. Use it wherever an\n`end_user_identifier` is required, and as a stable public reference to the end user in your own platform.\nRegistering a private end user is not idempotent: each request registers a new end user with a new\nidentifier.\n\nRegistering an organization number you already hold returns 409.\n\n* `private`: Whether or not this end user is a private person (not representing a business entity).\n* `identifier`: Organization number, nine digits. Required if `private` is `false`, and must be omitted or\n  `null` if `private` is `true`.\n* `date_of_birth`: The private person's date of birth, `YYYY-MM-DD`. Required if `private` is `true`, and\n  must be omitted or `null` if `private` is `false`.\n* `first_name`: The given name (and optional middle names) of the contact person.\n* `last_name`: Family name of the contact person.\n* `email`: The e-mail address of the contact person.\n* `company_name`: Name of the company as registered in the official records. Must be omitted or `null`\n  if `private` is `true`.\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v2/end-users -d '{\n    \"private\": false,\n    \"identifier\": \"900900900\",\n    \"first_name\": \"Firstname\",\n    \"last_name\": \"Lastname\",\n    \"email\": \"firstname.lastname@testcompany.net\",\n    \"company_name\": \"TestCompany AS\"\n}'\n```\n\nA private end user:\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v2/end-users -d '{\n    \"private\": true,\n    \"date_of_birth\": \"1990-01-31\",\n    \"first_name\": \"Firstname\",\n    \"last_name\": \"Lastname\",\n    \"email\": \"firstname.lastname@example.net\"\n}'\n```","operationId":"create_end_user_api_v2_end_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterEndUserRequestV2"},"examples":{"business":{"summary":"A business, with its organization number and company name","value":{"company_name":"TestCompany AS","email":"firstname.lastname@testcompany.net","first_name":"Firstname","identifier":"900900900","last_name":"Lastname","private":false}},"private":{"summary":"A private person, with a date of birth and no identifier","value":{"date_of_birth":"1990-01-31","email":"firstname.lastname@example.net","first_name":"Firstname","last_name":"Lastname","private":true}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserResponseV2"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-001","detail":"User not found"}}}},"409":{"description":"End user already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-008","detail":"End user already exists"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body"],"msg":"Value error, company_name is required","type":"value_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/end-users/{end_user_id}":{"get":{"tags":["End Users"],"summary":"Get a single end user with its agreements","description":"## Retrieve a single end user and the end user agreements sent to them.\n\nPermission required: **enduser:read**\n\nThe `agreements` list is a history, most recent first. At most one agreement is awaiting acceptance at\nany time. The others are earlier agreements that were accepted, declined, expired or replaced. Each one\nlists the steps the end user took on it, in `events`.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/end-users/1234\n```","operationId":"get_end_user_api_v2_end_users__end_user_id__get","parameters":[{"name":"end_user_id","in":"path","description":"The end user's ID, as `POST /v2/end-users` answered it.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserDetailResponseV2"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","end_user_id"],"msg":"invalid digit found in string","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]},"delete":{"tags":["End Users"],"summary":"Delete an end user","description":"## Delete an end user and their end user agreements.\n\nPermission required: **enduser:write**\n\n**This cannot be undone.** These are removed along with the end user:\n\n* Their end user agreements, and the history of what they did with them.\n* Any access links (`POST /v2/mp/access-links`) created for them.\n* Their metering points that are not active, i.e `revoked`, `expired` or `failed`. These disappear\n  from your inventory, and their meter data is no longer readable. To read one again, request\n  access again.\n\nAn agreement still awaiting acceptance is withdrawn, so an access link already sent out stops working.\nThis is best effort: the delete still succeeds if the signing provider cannot be reached.\n\nYou cannot delete an end user who still has active metering points in your inventory. The request\nreturns 409, and the response lists the metering points blocking it. Unsubscribe from them first\n(`POST /v1/mp/unsubscribe`), then delete. A metering point with a request in flight also blocks the\ndelete until that request completes.\n\n#### Example\n\n```text\ncurl -X DELETE -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/end-users/1234\n```","operationId":"delete_end_user_api_v2_end_users__end_user_id__delete","parameters":[{"name":"end_user_id","in":"path","description":"The end user's ID, as `POST /v2/end-users` answered it.","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEndUserResponseV2"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"409":{"description":"End user is still tied to metering points","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-009","detail":"End user is still tied to live metering points: 707057500012345678"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","end_user_id"],"msg":"invalid digit found in string","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-500","detail":"An unexpected error occurred, the end user was not deleted"}}}}},"security":[{"APIKeyHeader":[]}]},"patch":{"tags":["End Users"],"summary":"Update an end user","description":"## Correct the contact details of an end user.\n\nPermission required: **enduser:write**\n\nThis is a partial update. Send only the fields you want to change. Omitted fields are left as they\nare. Send `null` for `company_name` to clear it.\n\n**If the end user has an agreement awaiting acceptance, this replaces that agreement.** An agreement\nshows the contact details it was created with. The open one is therefore withdrawn, and a new one with\nthe corrected details takes its place. The access link you already sent keeps working and shows the new\nagreement, so you do not have to send a new link. Nothing is replaced if the values you send match what\nis already stored.\n\nNeither `identifier` nor `stage` can be changed, and sending either is rejected. The identifier\nidentifies the legal person, so a different identifier means a different end user - register a new one.\n`stage` is set by what the end user does with their agreement.\n\n* `first_name`: The given name (and optional middle names) of the contact person.\n* `last_name`: Family name of the contact person.\n* `email`: The e-mail address of the contact person.\n* `company_name`: Name of the company as registered in the official records. Must be `null` for a\n  private person, and is required for a business.\n\n#### Example\n\n```text\ncurl -X PATCH -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" https://insight.enersky.no/api/v2/end-users/1234 -d '{\n    \"email\": \"new.address@testcompany.net\"\n}'\n```","operationId":"update_end_user_api_v2_end_users__end_user_id__patch","parameters":[{"name":"end_user_id","in":"path","description":"The end user's ID, as `POST /v2/end-users` answered it.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndUserRequestV2"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserResponseV2"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-002","detail":"company_name is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","first_name"],"msg":"Input should be a valid string","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/mp/access-links":{"get":{"tags":["Metering Points"],"summary":"List your access links","description":"## List the access links on your account.\n\nPermission required: **meteringpoint:read**\n\nReturns every access link you have created, most recently created first, or only the ones for a single\nend user when `end_user_id` is given. An end user who has no links yet returns an empty list; an\n`end_user_id` that does not exist returns 404, so the two cases are told apart.\n\nTo narrow by organization number, or by the identifier Enersky assigned to a private end user, instead\nof by id, use `POST /v2/mp/access-links/by-identifier`, which takes the identifier in the request body.\n\nAn access link does not expire and can be used again, so an end user can add more metering points\nthrough the same link later. Use `GET /v2/mp/access-links/{token}` to see what came of one.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/mp/access-links\n```","operationId":"list_access_links_api_v2_mp_access_links_get","parameters":[{"name":"end_user_id","in":"query","description":"Only return the access links created for this end user.","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLinksResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["query","end_user_id"],"msg":"invalid digit found in string","type":"query_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"tags":["Metering Points"],"summary":"Create an access link","description":"## Create a link that lets an end user grant you access to their metering points.\n\nPermission required: **meteringpoint:write**\n\nIn Elhub this process is called BRS-NO-624. The end user does not need to know their metering point\nIDs: they pick the ones they want to share from a list Elhub shows them.\n\n### How the flow works\n\n1. Call this endpoint to create an access link.\n2. Store the returned `token`, which is how you look the link up again afterwards.\n3. Send the end user to the returned `url`, either from your own system or as a link by e-mail or SMS.\n4. The end user accepts the end user agreement if they have not already, then selects their metering\n    points at Elhub.\n5. The metering points they granted appear in your inventory, each carrying this `token` as its\n    `request_id`, and on `GET /v2/mp/access-links/{token}`.\n\nOne link per end user is enough. It does not expire, and the same end user can come back to it later to\nadd more metering points. Creating several is allowed if you would rather tell them apart.\n\nWhere the end user module is active for your account an `end_user_id` is required, and naming one that\ndoes not exist returns 404. Where it is not active, `end_user_id` must be `null`. Either mismatch\nreturns 400.\n\n* `end_user_id`: The end user to create the link for, from `GET /v2/end-users`. Send `null` where the\n    end user module is not active for your account.\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" \\\n  https://insight.enersky.no/api/v2/mp/access-links -d '{\n\"end_user_id\": 1234\n}'\n```","operationId":"create_access_link_api_v2_mp_access_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccessLinkRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLink"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-002","detail":"end_user_id is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","end_user_id"],"msg":"missing field `end_user_id`","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/mp/access-links/by-identifier":{"post":{"tags":["Metering Points"],"summary":"List the access links for one end user, named by their identifier","description":"## List the access links for one end user, named by their identifier.\n\nPermission required: **meteringpoint:read**\n\nThis is `GET /v2/mp/access-links?end_user_id=...` with the end user named by their organization number,\nor by the identifier Enersky assigned to a private end user, instead of by their id. The end user is\nlooked up first, and the response is the same list, in the same shape, most recently created first.\n\n**It creates and changes nothing**, and needs only the read permission. Prefer\n`GET /v2/mp/access-links?end_user_id=...` where you already hold the id.\n\nAn end user who has no links yet returns an empty list; an identifier that does not exist returns 404,\nso the two cases are told apart.\n\n* `end_user_identifier`: Organization number (9 digits) of the end user, or the identifier Enersky\n    assigned if they are a private person (`eu-` and 8 hex digits).\n\n#### Example\n\n```text\ncurl -X POST -H \"X-API-Key: my-api-key\" -H \"Content-Type: application/json\" \\\n  https://insight.enersky.no/api/v2/mp/access-links/by-identifier -d '{\n\"end_user_identifier\": \"900900900\"\n}'\n```","operationId":"list_access_links_by_identifier_api_v2_mp_access_links_by_identifier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLinksByIdentifierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLinksResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-005","detail":"End user not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["body","end_user_identifier"],"msg":"Value error, end_user_identifier must be a 9 digit organization number, or the identifier returned when the end user was registered","type":"json_data_error"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/mp/access-links/{token}":{"get":{"tags":["Metering Points"],"summary":"Get a single access link with its end user and results","description":"## Retrieve one access link, the end user it was created for, and what came of it.\n\nPermission required: **meteringpoint:read**\n\n`end_user` carries the same fields as `GET /v2/end-users`, so `end_user.stage` tells you whether they\nhave accepted their end user agreement yet. It is `null` where the end user module is not active for your\naccount.\n\nThe results are split in two, both most recent first:\n\n* `granted` has one entry per metering point the end user shared, with the access level Elhub reported\n    and when that access runs out. This is what Elhub said at the time. The metering point's own record\n    (`GET /v2/mp/{mpid}`) is the live view and can have moved on since.\n* `rejected` has one entry per time the end user reached Elhub through this link and granted nothing,\n    with the reason Elhub gave. An end user who gives up before reaching Elhub leaves no entry at all.\n\nBoth can hold several entries, because a link can be used as many times as the end user likes.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" \\\n  https://insight.enersky.no/api/v2/mp/access-links/6775cccb-9a45-43cd-b53f-c21c4b6506c5\n```","operationId":"get_access_link_api_v2_mp_access_links__token__get","parameters":[{"name":"token","in":"path","description":"The access link, as returned when it was created.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessLinkDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-004","detail":"Access link not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","token"],"msg":"UUID parsing failed","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]},"delete":{"tags":["Metering Points"],"summary":"Delete an access link","description":"## Delete an access link.\n\nPermission required: **meteringpoint:write**\n\n**This cannot be undone.** The link stops working. An end user who has not finished the flow can no\nlonger use it to grant access to metering points or to accept their end user agreement, and the results\non `GET /v2/mp/access-links/{token}` are no longer reachable.\n\nMetering points already granted through the link keep their access. A link only sets access up, so\ndeleting it never removes a metering point from your inventory. Use `POST /v1/mp/unsubscribe` for that.\n\n#### Example\n\n```text\ncurl -X DELETE -H \"X-API-Key: my-api-key\" \\\n  https://insight.enersky.no/api/v2/mp/access-links/6775cccb-9a45-43cd-b53f-c21c4b6506c5\n```","operationId":"delete_access_link_api_v2_mp_access_links__token__delete","parameters":[{"name":"token","in":"path","description":"The access link, as returned when it was created.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccessLinkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-EU-004","detail":"Access link not found"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","token"],"msg":"UUID parsing failed","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/mp/{mpid}":{"get":{"tags":["Metering Points"],"summary":"Get detailed information about a metering point","description":"## Retrieve detailed information about a specific metering point in your inventory.\n\nPermission required: **meteringpoint:read**\n\nThis endpoint provides details of a specific metering point in addition to the summary\nprovided in the `/mp/inventory` endpoint. Please refer to `MeteringPointResponseV2` in the schema definition\nfor a complete description of each field in the response.\n\n### Overview\n\nA metering point will transition through the following states:\n\n* `pending`: The subscription request was received by the source system and is currently awaiting end user approval.\n* `active`: The metering point subscription is operating normally and is receiving meter data.\n* `failed`: The subscription request failed, most often due to non-existing `mpid`. Further details will be present\n  in the `notice` field.\n* `expired`: A pending request for access to end user was not granted within the allowed timeframe, or an active\n  subscription was not allowed to be extended by the end user for metering points with time limited access.\n* `revoked`: Access to the metering point was either revoked in the source system (by the end user), or via\n  an `/unsubscribe` request.\n\nThe `processing` field indicates whether or not there currently is an active in-flight request to the source system,\nfor which we are awaiting a response. If this flag is `true`, some actions might be temporarily blocked.\nAn example is performing a `/subscribe` request during a phase where there is an in-flight `/unsubscribe`\nrequest currently being processed.\n\nThe `updated_at` field indicates when this metering point last received meter data. This might also include\ncorrections to historical data, hence does not correspond to the head of the time series.\n\nIf the metering point is in `pending` state (awaiting end user approval) or `active`, but the underlying source\nsystem only provides time-limited access (i.e 1 year periods), the `expires` field will indicate when it expires.\n\nAny additional information detailing the specifics of a given state will be present in the `notice` field, for\nexample why a subscription failed.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/mp/707057500012345678\n```","operationId":"metering_point_api_v2_mp__mpid__get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringPointResponseV2"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-006","detail":"mpid must be 18 digits"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"Metering point not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","mpid"],"msg":"Invalid URL: invalid UTF-8 in path parameter","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v2/mp/{mpid}/meter-metadata-history":{"get":{"tags":["Metering Points"],"summary":"Retrieve the meter metadata history for a specific metering point.","description":"## Retrieve historical changes to the meter metadata about a specific metering point.\n\nPermission required: **meteringpoint:read**\n\nThis provides a historical timeline of changes to the meter metadata, and is useful for example for correlating\nbetween changes to timeseries (start, stop, resolution) and the channels reported by the source system at that point\nin time.\n\n#### Example\n\n```text\ncurl -H \"X-API-Key: my-api-key\" https://insight.enersky.no/api/v2/mp/707057500012345678/meter-metadata-history\n```","operationId":"impersonate_metering_point_metadata_history_api_v2_mp__mpid__meter_metadata_history_get","parameters":[{"name":"mpid","in":"path","description":"The metering point id: 18 digits.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterMetadataHistoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-002","detail":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-AU-003","detail":"You do not have permission to access this resource"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-MP-002","detail":"Metering point not found in your inventory"}}}},"422":{"description":"The request does not match the schema this endpoint declares","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"code":"ES-RQ-008","detail":[{"loc":["path","mpid"],"msg":"Invalid URL: invalid UTF-8 in path parameter","type":"path_invalid"}]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"How many seconds to wait before a retry."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-RQ-025","detail":"Too many requests"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"code":"ES-G-501","detail":"An unexpected internal error occurred"}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"AccessLink":{"type":"object","description":"A link that lets an end user grant you access to their metering points.","required":["token","created_at","end_user_id","url"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When the access link was created."},"end_user_id":{"type":["integer","null"],"format":"int32","description":"The end user this access link was created for. `null` where the end user module is not\nactive for your account."},"token":{"type":"string","format":"uuid","description":"A unique reference (UUIDv4) for this access link."},"url":{"type":"string","description":"The address to send the end user to."}}},"AccessLinkDetail":{"type":"object","description":"An access link, the end user it was created for, and what Elhub has reported against it.\n\nA single end user can be sent through the flow as many times as they like on the same link, so\nboth lists can hold several entries. Sort on `timestamp` to read them as one sequence of events.","required":["token","created_at","url","end_user","granted","rejected"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When the access link was created."},"end_user":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EndUserResponseV2","description":"The end user this access link was created for. `null` where the end user module is not\nactive for your account."}]},"granted":{"type":"array","items":{"$ref":"#/components/schemas/AccessLinkElhubGrant"},"description":"Every metering point granted through this link, most recent first, one entry per metering\npoint."},"rejected":{"type":"array","items":{"$ref":"#/components/schemas/AccessLinkElhubRejection"},"description":"Every time the end user reached Elhub through this link and granted nothing, most recent\nfirst."},"token":{"type":"string","format":"uuid","description":"A unique reference (UUIDv4) for this access link."},"url":{"type":"string","description":"The address to send the end user to."}}},"AccessLinkElhubGrant":{"type":"object","description":"One metering point an end user granted access to.\n\nThis is what Elhub reported at the moment access was given. The metering point's own record is\nthe live view of it, and can have moved on since - access may since have been revoked, or the\nmetering point may have been removed from the inventory.","required":["timestamp","mpid","access","expires"],"properties":{"access":{"type":"string","description":"How much of the metering point the grant covers, as reported by Elhub: `full` or `limited`.\n`unknown` where the record does not say. Treat any value you do not recognize as `limited`."},"expires":{"type":"string","format":"date-time","description":"When the granted access runs out."},"mpid":{"type":"string","description":"The metering point that access was granted to."},"timestamp":{"type":"string","format":"date-time","description":"When Elhub reported the grant."}}},"AccessLinkElhubRejection":{"type":"object","description":"One time an end user opened an access link and no access came out of it.\n\nAn end user who abandons the flow before reaching Elhub produces nothing at all, so the absence\nof a rejection does not mean the link was never opened.","required":["timestamp","error"],"properties":{"error":{"type":"string","description":"Why no access was granted, as reported by Elhub, including the Elhub error code."},"timestamp":{"type":"string","format":"date-time","description":"When Elhub reported the outcome."}}},"AccessLinksByIdentifierRequest":{"type":"object","description":"Name an end user by their identifier rather than by their id.\n\nFields that are not listed here are rejected.","required":["end_user_identifier"],"properties":{"end_user_identifier":{"type":"string","description":"Organization number of the end user, or the identifier Enersky assigned if they are a\nprivate person.","maxLength":32}},"additionalProperties":false},"AccessLinksResponse":{"type":"object","description":"Every access link on your account, or the ones matching your filter.","required":["tokens"],"properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/AccessLink"},"description":"The access links, most recently created first."}}},"AgreementEventV2":{"type":"object","description":"A step the end user took on an end user agreement.","required":["event_type","timestamp"],"properties":{"event_type":{"oneOf":[{"type":"string","description":"What an end user did with an agreement.","enum":["viewed","started","completed","declined"]}],"description":"What happened: `viewed` when the agreement was opened, `started` when the end user began\nfilling it in, `completed` when they accepted it, and `declined` when they refused it."},"timestamp":{"type":"string","format":"date-time","description":"When it happened."}}},"ChannelMeteringValue":{"type":"object","description":"Data model for a metering value at a specific timestamp in a channel.\n\n* `ts` is the timestamp for the start of the data point (spanning until the next one, i.e 1hr)\n* `value`: The value, in kWh or kVArh depending on channel, as a decimal (string),\n  produced or consumed during the timeframe.\n* `method` is how the metered value was generated, i.e metered, estimated or temporary.\n* `remarks`: This field is only used to provide additional context if the registered value is\n  for example an estimate, and would then indicate if it is a `preliminary` or `final` estimate.","required":["ts","value","method"],"properties":{"method":{"oneOf":[{"type":"string","description":"How the value was arrived at.","enum":["metered","estimated","temporary","calculated"]}],"description":"How the value was arrived at."},"remarks":{"type":["string","null"],"description":"Extra context, such as whether an estimate is preliminary or final."},"ts":{"type":"string","format":"date-time","description":"The start of the interval this value covers."},"value":{"type":"string","description":"The value, in kWh or kVArh, as a decimal string."}}},"ChannelMeteringValues":{"type":"object","description":"Data model for a timeseries of metering values for a specific metering point channel.\n\n* `direction`: is whether or not this refers to energy being consumed or produced.\n* `product`: Product code of what type is being measured on this channel, i.e 8716867000030 for\n  Energy Active.\n* `resolution`: The resolution code of the series, i.e `PT60M` / `PT1H` or `PT15M`.\n* `values`: A list of `ChannelMeteringValue` objects, each containing timestamp, value, method\n  and remarks.\n* `updated`: When the reported value was registered in the source system (i.e Elhub or\n  DataHub). This field can be used to indicate corrections to historical values.","required":["direction","product","resolution","values","updated"],"properties":{"direction":{"oneOf":[{"type":"string","description":"Which way the energy flowed on a channel.","enum":["consumption","production"]}],"description":"Which way the energy flowed."},"product":{"oneOf":[{"type":"string","description":"What is being measured on a channel: an Elhub product code.","enum":["8716867000030","8716867000047","8716867000139","8716867000146","4700000000301","4700000000302","4700000000303","4700000000101","4700000000201"]}],"description":"The product code of the channel."},"resolution":{"oneOf":[{"type":"string","description":"How long one value covers.","enum":["PT5M","PT15M","PT30M","PT60M","PT1H","P1D","P1M","P1Y","N"]}],"description":"The resolution code of the channel."},"updated":{"type":"string","format":"date-time","description":"When the source system registered the first of these values."},"values":{"type":"array","items":{"$ref":"#/components/schemas/ChannelMeteringValue"},"description":"The channel's values, oldest first."}}},"Country":{"type":"string","description":"The country a grid area belongs to, by its English name.","enum":["Norway","Sweden","Denmark","Finland"]},"CountryCode":{"type":"string","description":"The country a grid area belongs to, by its two letter code.","enum":["NO","SE","DK","FI"]},"CreateAccessLinkRequest":{"type":"object","description":"Create an access link for one of your end users.\n\nFields that are not listed here are rejected.","required":["end_user_id"],"properties":{"end_user_id":{"type":["integer","null"],"format":"int64","description":"The end user to create the link for. Send `null` where the end user module is not active\nfor your account."}},"additionalProperties":false},"CreateSubscribeWebFlowTokenRequest":{"type":"object","description":"Request for creating a token used by end users when granting access to metering points through\nthe web flow.\n\nUsers with own GLN must pass `null` as end user contracts are not handled by Insight API.\n\n* `end_user_identifier` is the organization number of the end user, or the identifier Enersky\n  assigned to a private end user, or `null` if using own GLN.","required":["end_user_identifier"],"properties":{"end_user_identifier":{"type":["string","null"],"description":"The end user's organisation number, or the identifier Enersky assigned to a private end\nuser, or `null` for a customer acting under its own GLN. The key itself may not be left out."}}},"CreateSubscribeWebFlowTokenResponse":{"type":"object","description":"Response for creating a token used by end users when granting access to metering points through\nthe web flow.\n\n* `request_id` is the unique request identifier for tracking the metering point grants (or\n  reject).\n* `created_at` is when the token was created.\n* `url` is the URL to redirect the end user to.","required":["request_id","created_at","url"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When it was minted."},"request_id":{"type":"string","format":"uuid","description":"The token, for tracking which metering points were granted through it."},"url":{"type":"string","description":"Where to send the end user."}}},"CustomerAddress":{"type":"object","description":"Data model for a specific customer (end user) address.","properties":{"address_type":{"oneOf":[{"type":"string","description":"Which kind of address this is: `postaladr` or `invoiceadr`.","enum":["postaladr","invoiceadr"]}],"description":"Which kind of address this is."},"attention_of":{"type":["string","null"],"description":"Attention of."},"building_number":{"type":["string","null"],"description":"House number, letter included."},"care_of":{"type":["string","null"],"description":"Care of."},"city":{"type":["string","null"],"description":"City or town."},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code."},"on_behalf_of":{"type":["string","null"],"description":"On behalf of."},"post_code":{"type":["string","null"],"description":"Post code."},"post_office_box":{"type":["string","null"],"description":"Post office box."},"street_name":{"type":["string","null"],"description":"Street name."}}},"CustomerCommunicationChannel":{"type":"object","description":"Data model for a specific communication channel for a customer (end user).","required":["communication_type","value"],"properties":{"communication_type":{"oneOf":[{"type":"string","description":"The kinds of communication channel Elhub carries: `Email`, `Mobile`, `Phone` or `Telefax`.","enum":["Email","Mobile","Phone","Telefax"]}],"description":"Which kind of channel this is."},"description":{"type":["string","null"],"description":"What Elhub says the channel is for."},"value":{"type":"string","description":"The address or number itself."}}},"CustomerInformation":{"type":"object","description":"Data model for the details about the end user customer of a specific metering point. Version 1.","required":["updated_at"],"properties":{"address_type":{"type":"string","description":"Always `postaladr`. Sent even when every address field below is null."},"building_number":{"type":["string","null"],"description":"House number of the postal address."},"city":{"type":["string","null"],"description":"City or town of the postal address."},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code of the postal address."},"family_name":{"type":["string","null"],"description":"Family name."},"given_name":{"type":["string","null"],"description":"Given name."},"name":{"type":["string","null"],"description":"The end user's full name."},"post_code":{"type":["string","null"],"description":"Post code of the postal address."},"street_name":{"type":["string","null"],"description":"Street name of the postal address."},"updated_at":{"type":"string","format":"date-time","description":"When Elhub last said something about this end user."}}},"CustomerInformationV2":{"type":"object","description":"Data model for the details about the end user customer of a specific metering point. Version 2.","required":["updated_at"],"properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAddress"},"description":"Every address Elhub carries."},"communication":{"type":"array","items":{"$ref":"#/components/schemas/CustomerCommunicationChannel"},"description":"Every communication channel Elhub carries."},"family_name":{"type":["string","null"],"description":"Family name."},"given_name":{"type":["string","null"],"description":"Given name."},"name":{"type":["string","null"],"description":"The end user's full name."},"updated_at":{"type":"string","format":"date-time","description":"When Elhub last said something about this end user."}}},"DayAheadSpotPrices":{"type":"object","description":"Data model for a Day-Ahead spot prices for a single MTU (Market Time Unit).\n\n* `ts`: datetime representing the start of the MTU.\n* `resolution`: Which MTU this observation is marked under, either `PT15M` or `PT1H`.\n* `updated`: datetime representing when this observation was last fetched.\n* `NO1`: bid area price in the requested unit, EUR/MWh by default.\n* `NO2`: bid area price in the requested unit, EUR/MWh by default.\n* `NO3`: bid area price in the requested unit, EUR/MWh by default.\n* `NO4`: bid area price in the requested unit, EUR/MWh by default.\n* `NO5`: bid area price in the requested unit, EUR/MWh by default.\n* `DK1`: bid area price in the requested unit, EUR/MWh by default.\n* `DK2`: bid area price in the requested unit, EUR/MWh by default.\n* `SE1`: bid area price in the requested unit, EUR/MWh by default.\n* `SE2`: bid area price in the requested unit, EUR/MWh by default.\n* `SE3`: bid area price in the requested unit, EUR/MWh by default.\n* `SE4`: bid area price in the requested unit, EUR/MWh by default.\n* `FI`: bid area price in the requested unit, EUR/MWh by default.","required":["ts","resolution","updated","NO1","NO2","NO3","NO4","NO5","DK1","DK2","SE1","SE2","SE3","SE4","FI"],"properties":{"DK1":{"type":"number","format":"double","description":"West Denmark, in the requested unit. EUR/MWh by default."},"DK2":{"type":"number","format":"double","description":"East Denmark, in the requested unit. EUR/MWh by default."},"FI":{"type":"number","format":"double","description":"Finland, in the requested unit. EUR/MWh by default."},"NO1":{"type":"number","format":"double","description":"South east Norway, in the requested unit. EUR/MWh by default."},"NO2":{"type":"number","format":"double","description":"South west Norway, in the requested unit. EUR/MWh by default."},"NO3":{"type":"number","format":"double","description":"Central Norway, in the requested unit. EUR/MWh by default."},"NO4":{"type":"number","format":"double","description":"North Norway, in the requested unit. EUR/MWh by default."},"NO5":{"type":"number","format":"double","description":"West Norway, in the requested unit. EUR/MWh by default."},"SE1":{"type":"number","format":"double","description":"North Sweden, in the requested unit. EUR/MWh by default."},"SE2":{"type":"number","format":"double","description":"North central Sweden, in the requested unit. EUR/MWh by default."},"SE3":{"type":"number","format":"double","description":"South central Sweden, in the requested unit. EUR/MWh by default."},"SE4":{"type":"number","format":"double","description":"South Sweden, in the requested unit. EUR/MWh by default."},"resolution":{"type":"string","description":"Which market time unit this observation is marked under, `PT15M` or `PT1H`."},"ts":{"type":"string","format":"date-time","description":"The start of the market time unit."},"updated":{"type":"string","format":"date-time","description":"When this observation was last fetched."}}},"DayAheadSpotPricesResponse":{"type":"object","description":"Response model for a sequence of Day-Ahead spot prices for a given period.\n\n* `prices`: A sequence of `DayAheadSpotPrice` observations.","required":["prices"],"properties":{"prices":{"type":"array","items":{"$ref":"#/components/schemas/DayAheadSpotPrices"},"description":"One entry per market time unit, oldest first."}}},"DeleteAccessLinkResponse":{"type":"object","description":"Confirmation that an access link was deleted.","required":["token","success"],"properties":{"success":{"type":"boolean","description":"Whether or not the delete was successful."},"token":{"type":"string","format":"uuid","description":"The token of the access link that was removed, echoed back so several deletions can be\ncorrelated."}}},"DeleteEndUserResponseV2":{"type":"object","description":"Confirmation that an end user was deleted.\n\n* `id` is the end user that was removed, echoed back so several deletions can be correlated.\n* `success` is whether it was removed.","required":["id","success"],"properties":{"id":{"type":"integer","format":"int32","description":"The ID of the end user object that was removed."},"success":{"type":"boolean","description":"Whether or not the delete was successful."}}},"DeleteSubscribeTokenResponse":{"type":"object","description":"Response for deleting a single subscribe web flow token.\n\n* `token` is the unique identifier of the deleted token, echoed back so several deletions can be\n  correlated.\n* `success` is whether the token was removed.","required":["token","success"],"properties":{"success":{"type":"boolean","description":"Whether the token was removed. Always `true`: a token that does not exist is a 404\ninstead."},"token":{"type":"string","format":"uuid","description":"The token that was deleted, echoed back so several deletions can be correlated."}}},"EndUserAgreementV2":{"type":"object","description":"An end user agreement sent for acceptance, including status and event trail.\n\nAn end user can have several agreements over time. At most one is awaiting acceptance. The others\nare records of earlier agreements.","required":["id","status","created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When the agreement was created."},"events":{"type":"array","items":{"$ref":"#/components/schemas/AgreementEventV2"},"description":"The event trail for this agreement."},"id":{"type":"integer","format":"int32","description":"The agreement ID"},"status":{"oneOf":[{"type":"string","description":"What the signing provider says about one submission.","enum":["pending","completed","declined","expired","archived"]}],"description":"State of the agreement: `pending` while it is awaiting acceptance, `completed` once accepted,\n`declined` if the end user refused it, `expired` if it was never answered, and `archived`\nif it was replaced by a newer request."},"updated_at":{"type":"string","format":"date-time","description":"When this agreement was last changed."}}},"EndUserDetailResponseV2":{"type":"object","description":"An end user together with their end user agreements.\n\nThe list endpoint does not include `agreements`: they are read one end user at a time.","required":["id","identifier","domain","private","first_name","last_name","email","company_name","date_of_birth","stage","created_at","updated_at"],"properties":{"agreements":{"type":"array","items":{"$ref":"#/components/schemas/EndUserAgreementV2"},"description":"Every agreement sent to this end user, most recent first."},"company_name":{"type":["string","null"],"description":"Registered company name. `null` for a private person."},"created_at":{"type":"string","format":"date-time","description":"When the end user was registered."},"date_of_birth":{"type":["string","null"],"format":"date","description":"The private person's date of birth, `YYYY-MM-DD`. `null` for a business."},"domain":{"oneOf":[{"type":"string","description":"Which source system an end user is registered in.","enum":["elhub","datahub"]}],"description":"The source system the end user is relevant for."},"email":{"type":"string","format":"email","description":"E-mail address of the contact person."},"first_name":{"type":"string","description":"Given name of the contact person who accepts the end user agreement."},"id":{"type":"integer","format":"int32","description":"Unique ID for this end user. Use it to reference them on the other `/v2/end-users`\nendpoints, and to correlate them with your own records. Not to be confused with\n'identifier'."},"identifier":{"type":"string","description":"Organization number, or for a private person the identifier Enersky assigned, `eu-` and\neight hex digits. Use it where an endpoint asks for `end_user_identifier`."},"last_name":{"type":"string","description":"Family name of the contact person."},"private":{"type":"boolean","description":"Whether the end user is a private person rather than a business."},"stage":{"oneOf":[{"type":"string","description":"The five stages an end user agreement takes an end user through.","enum":["registered","pending","completed","declined","revoked"]}],"description":"How far the end user has come with their end user agreement. Metering points can only be\nsubscribed to on their behalf while this reads `completed`.\n\n* `registered`: No agreement is awaiting acceptance. Either none was sent yet, or the last\n  one expired or was replaced without an answer.\n* `pending`: An agreement is awaiting their acceptance.\n* `completed`: They have accepted.\n* `declined`: They rejected the agreement.\n* `revoked`: An acceptance was manually withdrawn afterwards."},"updated_at":{"type":"string","format":"date-time","description":"When the end user was last changed."}}},"EndUserResponseV2":{"type":"object","description":"Data model for a registered end user.","required":["id","identifier","domain","private","first_name","last_name","email","company_name","date_of_birth","stage","created_at","updated_at"],"properties":{"company_name":{"type":["string","null"],"description":"Registered company name. `null` for a private person."},"created_at":{"type":"string","format":"date-time","description":"When the end user was registered."},"date_of_birth":{"type":["string","null"],"format":"date","description":"The private person's date of birth, `YYYY-MM-DD`. `null` for a business."},"domain":{"oneOf":[{"type":"string","description":"Which source system an end user is registered in.","enum":["elhub","datahub"]}],"description":"The source system the end user is relevant for."},"email":{"type":"string","format":"email","description":"E-mail address of the contact person."},"first_name":{"type":"string","description":"Given name of the contact person who accepts the end user agreement."},"id":{"type":"integer","format":"int32","description":"Unique ID for this end user. Use it to reference them on the other `/v2/end-users`\nendpoints, and to correlate them with your own records. Not to be confused with\n'identifier'."},"identifier":{"type":"string","description":"Organization number, or for a private person the identifier Enersky assigned, `eu-` and\neight hex digits. Use it where an endpoint asks for `end_user_identifier`."},"last_name":{"type":"string","description":"Family name of the contact person."},"private":{"type":"boolean","description":"Whether the end user is a private person rather than a business."},"stage":{"oneOf":[{"type":"string","description":"The five stages an end user agreement takes an end user through.","enum":["registered","pending","completed","declined","revoked"]}],"description":"How far the end user has come with their end user agreement. Metering points can only be\nsubscribed to on their behalf while this reads `completed`.\n\n* `registered`: No agreement is awaiting acceptance. Either none was sent yet, or the last\n  one expired or was replaced without an answer.\n* `pending`: An agreement is awaiting their acceptance.\n* `completed`: They have accepted.\n* `declined`: They rejected the agreement.\n* `revoked`: An acceptance was manually withdrawn afterwards."},"updated_at":{"type":"string","format":"date-time","description":"When the end user was last changed."}}},"ErrorResponse":{"type":"object","description":"The body of every response this API answers with a status of 400 or above.","required":["detail","code"],"properties":{"code":{"type":"string","description":"The permanent code for this reason, such as `ES-MP-001`. Deliberately a plain string and not\nan enum: codes are added over time, and a client that types them as a closed set breaks on\nthe next one. Treat a code you do not know as a generic failure of its status. The catalogue\nwith an explanation per code is on the help page."},"detail":{"type":"string","description":"What went wrong, in words. Free to carry facts about this one occurrence."}}},"ExchangeRate":{"type":"object","description":"One market date's estimated quotes against the euro.","required":["date","updated","preliminary","NOK","SEK","DKK"],"properties":{"DKK":{"type":"number","format":"double","description":"Danish kroner per euro."},"NOK":{"type":"number","format":"double","description":"Norwegian kroner per euro."},"SEK":{"type":"number","format":"double","description":"Swedish kronor per euro."},"date":{"type":"string","format":"date","description":"The market date the quote applies to."},"preliminary":{"type":"boolean","description":"Whether today's curve calculation can still move this quote."},"updated":{"type":"string","format":"date-time","description":"When the estimate was last recomputed."}}},"ExchangeRatesResponse":{"type":"object","description":"The estimated exchange rate curve, with the four constants that describe what it quotes.","required":["quotes"],"properties":{"base_currency":{"type":"string","description":"The currency the quotes are against. Always `EUR`.","default":"EUR"},"base_currency_unit":{"type":"integer","format":"int32","description":"How many units of the base currency a quote is for.","default":1,"minimum":0},"base_curve":{"type":"string","description":"Which base curve the estimate is built on. Always `intraday_market` today.","default":"intraday_market"},"quote_currency_unit":{"type":"integer","format":"int32","description":"How many units of the quote currency a quote is in.","default":1,"minimum":0},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeRate"},"description":"One entry per market date, oldest first."}}},"GridArea":{"type":"object","description":"A grid area, combining what Elhub and eSett each know about it.\n\nElhub decides which areas exist and who owns them. eSett supplies the grid type and country.\nSub grid areas also carry the parent grid they hang off.","required":["name","mga_code","mga_type","price_area","country","country_code","owner","status"],"properties":{"country":{"$ref":"#/components/schemas/Country","description":"Country the grid area belongs to."},"country_code":{"$ref":"#/components/schemas/CountryCode","description":"Country code the grid area belongs to."},"last_seen":{"type":["string","null"],"format":"date-time","description":"When Elhub last published this grid area."},"mga_code":{"type":"string","description":"Metering grid area code (EIC)."},"mga_type":{"type":"string","description":"Grid type from eSett: `distribution`, `regional`, `transmission`, `industrial`,\n`production` or `border`. `sub-grid` when the area hangs off a parent grid, `unknown` when\neSett does not report it."},"name":{"type":"string","description":"Short grid area name as Elhub publishes it."},"owner":{"$ref":"#/components/schemas/Party","description":"Grid owner. Named `UNKNOWN` when Elhub does not currently list the party."},"parent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GridArea","description":"Parent grid area when this is a sub grid area."}]},"price_area":{"$ref":"#/components/schemas/PriceAreaName","description":"Bidding zone the grid area settles in."},"status":{"type":"string","description":"Lifecycle status as Elhub reports it, lowercased. Currently `active` or `inactive`."}}},"GridAreasResponse":{"type":"object","description":"All known grid areas, keyed by metering grid area code.","required":["grid_areas"],"properties":{"grid_areas":{"type":"object","description":"Grid areas, keyed by mga code.","additionalProperties":{"$ref":"#/components/schemas/GridArea"},"propertyNames":{"type":"string"}}}},"Incident":{"type":"object","description":"Data model for incidents (service status)\n\n* `id`: A unique identifier for this incident.\n* `start`: The timestamp the incident was registered.\n* `end`: The timestamp the incident was resolved, or `null` if still active.\n* `data`: The incident message payload with context, content and potential updates.","required":["id","start","end","data"],"properties":{"data":{"$ref":"#/components/schemas/IncidentMessageData","description":"The message payload, with the context, the text and any updates."},"end":{"type":["string","null"],"format":"date-time","description":"When it was resolved, or `null` while it is still open."},"id":{"type":"string","format":"uuid","description":"A unique identifier for this incident."},"start":{"type":"string","format":"date-time","description":"When the incident started, or is due to start."}}},"IncidentMessageData":{"type":"object","description":"Data model for an incident message payload.\n\n* `domain`: The affected service (i.e \"elhub\", \"enersky\", \"entso-e\")\n* `component`: An optional service component (i.e \"website\", \"api\", \"portal\")\n* `title`: The title of the incident.\n* `description`: The main incident description text (markdown).\n* `updates`: An array containing any updates to this incident.","required":["domain","title","description","updates"],"properties":{"component":{"type":["string","null"],"description":"The affected component within it, such as `website`, `api` or `portal`."},"description":{"type":"string","description":"The main incident text, in Markdown."},"domain":{"type":"string","description":"The affected service, such as `elhub`, `enersky` or `entso-e`."},"title":{"type":"string","description":"The incident's title."},"updates":{"type":"array","items":{"$ref":"#/components/schemas/IncidentUpdateMessageData"},"description":"Everything said about the incident since it was registered."}}},"IncidentUpdateMessageData":{"type":"object","description":"Data model for a single update to an incident.\n\n* `description`: The update text (markdown).\n* `timestamp`: The time the update was registered","required":["description","timestamp"],"properties":{"description":{"type":"string","description":"The update text, in Markdown."},"timestamp":{"type":"string","format":"date-time","description":"When the update was registered."}}},"IncidentsResponse":{"type":"object","description":"Response model for retrieving active and historical incidents","properties":{"active":{"type":"array","items":{"$ref":"#/components/schemas/Incident"},"description":"Started, and not over."},"previous":{"type":"array","items":{"$ref":"#/components/schemas/Incident"},"description":"Over."},"upcoming":{"type":"array","items":{"$ref":"#/components/schemas/Incident"},"description":"Not started yet."}}},"InventoryResponse":{"type":"object","description":"Response for requests to list the inventory of available MPIDs.\n\n* `count` is the number of metering point the user has access to.\n* `inventory` is an array of `MeteringPointStatus` objects containing the status of the metering\n  point.","required":["count","inventory"],"properties":{"count":{"type":"integer","description":"How many metering points the answer holds.","minimum":0},"inventory":{"type":"array","items":{"$ref":"#/components/schemas/MeteringPointStatus"},"description":"The metering points. No order is promised."}}},"InventoryTimestampsResponse":{"type":"object","description":"Response for requests that query various endpoints for a specific timestamp for each MPID.\nFor example the inventory head, which fetches the last timestamp for each MPID timeseries (regardless of direction).\n\n* `count` is the total number of MPIDs seen during the search.\n* `latest` is a mapping from MPID to ISO8601 timestamp, the most recently seen.","required":["count","latest"],"properties":{"count":{"type":"integer","description":"How many metering points the search saw."},"latest":{"type":"object","description":"Metering point id to the most recently seen meter data timestamp.","additionalProperties":{"type":"string","format":"date-time"}}}},"MarketPartiesResponse":{"type":"object","description":"All known market parties, keyed by GLN.","required":["market_parties"],"properties":{"market_parties":{"type":"object","description":"Market parties, keyed by GLN.","additionalProperties":{"$ref":"#/components/schemas/Party"},"propertyNames":{"type":"string"}}}},"MeterDataSummary":{"type":"object","description":"One channel's aggregate over the requested window.","required":["direction","product","resolution","min_ts","max_ts","min_positive_ts","max_positive_ts","min_value","max_value","total_value"],"properties":{"direction":{"oneOf":[{"type":"string","description":"Which way the energy flowed on a channel.","enum":["consumption","production"]}],"description":"Which way the energy flowed."},"max_positive_ts":{"type":["string","null"],"format":"date-time","description":"The last timestamp carrying a value above zero, or `null` when the channel has none."},"max_ts":{"type":"string","format":"date-time","description":"The last timestamp in the channel."},"max_value":{"type":"string","description":"The largest value in the channel, as a decimal string."},"min_positive_ts":{"type":["string","null"],"format":"date-time","description":"The first timestamp carrying a value above zero, or `null` when the channel has none."},"min_ts":{"type":"string","format":"date-time","description":"The first timestamp in the channel."},"min_value":{"type":"string","description":"The smallest value in the channel, as a decimal string."},"product":{"oneOf":[{"type":"string","description":"What is being measured on a channel: an Elhub product code.","enum":["8716867000030","8716867000047","8716867000139","8716867000146","4700000000301","4700000000302","4700000000303","4700000000101","4700000000201"]}],"description":"The product code of the channel."},"resolution":{"oneOf":[{"type":"string","description":"How long one value covers.","enum":["PT5M","PT15M","PT30M","PT60M","PT1H","P1D","P1M","P1Y","N"]}],"description":"The resolution code of the channel."},"total_value":{"type":"string","description":"The sum of every value in the channel, as a decimal string."}}},"MeterDataSummaryResponse":{"type":"object","description":"One aggregate per channel of a metering point.","required":["channels"],"properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/MeterDataSummary"},"description":"One entry per channel, or an empty list when the metering point has no values in range."}}},"MeterMetadataHistoryResponse":{"type":"object","description":"Data model for historical meter metadata (`meter_metadata` field on a metering point).\n\n* `history` is a mapping from a datetime to `MeteringPointInformationV2`, where the datetime key\n  is the valid from timestamp for the associated meter metadata. The last timestamp in the\n  history is the one currently active.","required":["history"],"properties":{"history":{"type":"object","description":"Every stored version of the meter metadata, keyed by the instant it became current.","additionalProperties":{"$ref":"#/components/schemas/MeteringPointInformationV2"},"propertyNames":{"type":"string"}}}},"MeteringPointAddress":{"type":"object","description":"Data model for the physical location of the metering point.","properties":{"building_number":{"type":["string","null"],"description":"House number, letter included."},"city":{"type":["string","null"],"description":"City or town."},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code."},"latitude":{"type":["string","null"],"description":"Latitude, when Elhub carries one. A JSON string."},"longitude":{"type":["string","null"],"description":"Longitude, when Elhub carries one. A JSON string."},"post_code":{"type":["string","null"],"description":"Post code."},"street_name":{"type":["string","null"],"description":"Street name."}}},"MeteringPointChannel":{"type":"object","description":"Data model for the details about a single channel (measurement definition) in a metering point.","required":["product","product_desc","unit","direction","resolution","exclude_from_settlement"],"properties":{"direction":{"oneOf":[{"type":"string","description":"Which way the energy on a channel flows.","enum":["In","Out"]}],"description":"Which way the energy flows."},"exclude_from_settlement":{"type":"boolean","description":"Whether Elhub leaves this channel out of settlement."},"product":{"type":"string","description":"The Elhub product code."},"product_desc":{"type":"string","description":"What the product code means, in words."},"resolution":{"type":"string","description":"The ISO 8601 duration one value covers."},"unit":{"type":"string","description":"The unit the values are in."}}},"MeteringPointGridDetails":{"type":"object","description":"Data model for the grid details of the metering point.","properties":{"balance_supplier_desc":{"type":["string","null"],"description":"The balance supplier's name."},"balance_supplier_gln":{"type":["string","null"],"description":"The balance supplier's GLN."},"country":{"type":["string","null"],"description":"Country name."},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code."},"grid_operator_desc":{"type":["string","null"],"description":"The grid operator's name."},"grid_operator_gln":{"type":["string","null"],"description":"The grid operator's GLN."},"mga_code":{"type":["string","null"],"description":"Metering grid area code."},"mga_name":{"type":["string","null"],"description":"Metering grid area name."},"mga_type":{"type":["string","null"],"description":"Grid type in upper case, for example `DISTRIBUTION`, `SUB-GRID` or `UNKNOWN`."},"price_area":{"type":["string","null"],"description":"The price area the grid area settles in, such as `NO1`. The v1 `price_area`."}}},"MeteringPointInformation":{"type":"object","description":"Data model for the details about a specific metering point. Version 1.","required":["updated_at"],"properties":{"annual_usage_estimate_kwh":{"type":["integer","null"],"format":"int32","description":"Estimated annual consumption in kWh."},"building_number":{"type":["string","null"],"description":"House number, letter included."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/MeteringPointChannel"},"description":"The measurement definitions on the meter."},"city":{"type":["string","null"],"description":"City or town."},"country_code":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code."},"description":{"type":["string","null"],"description":"Free text description of the premises."},"meter_number":{"type":["string","null"],"description":"The meter's serial number."},"meter_reading":{"type":["string","null"],"description":"How the meter is read, in words."},"meter_settlement":{"type":["string","null"],"description":"How the meter settles, in words."},"meter_status":{"type":["string","null"],"description":"What state the meter is in, in words."},"meter_type":{"type":["string","null"],"description":"What kind of meter it is, in words."},"post_code":{"type":["string","null"],"description":"Post code."},"price_area":{"type":["string","null"],"description":"The price area the grid area settles in, such as `NO1`."},"street_name":{"type":["string","null"],"description":"Street name."},"updated_at":{"type":"string","format":"date-time","description":"When Elhub last said something about this meter."}}},"MeteringPointInformationV2":{"type":"object","description":"Data model for the details about a specific metering point. Version 2.","required":["updated_at","address","meter_details","grid_details"],"properties":{"address":{"$ref":"#/components/schemas/MeteringPointAddress","description":"Where the meter is."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/MeteringPointChannel"},"description":"The measurement definitions on the meter."},"description":{"type":["string","null"],"description":"Free text description of the premises."},"grid_details":{"$ref":"#/components/schemas/MeteringPointGridDetails","description":"The grid it sits in."},"meter_details":{"$ref":"#/components/schemas/MeteringPointMeterDetails","description":"The meter itself."},"taxation_profile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MeteringPointTaxationProfile","description":"Taxation, fees and certificates."}]},"updated_at":{"type":"string","format":"date-time","description":"When Elhub last said something about this meter."}}},"MeteringPointMeterDetails":{"type":"object","description":"Data model for the meter details of the metering point.","properties":{"annual_consumption_calculation":{"type":["string","null"],"description":"How the consumption estimate was arrived at."},"annual_consumption_estimate":{"type":["integer","null"],"format":"int32","description":"Estimated annual consumption in kWh. The v1 `annual_usage_estimate_kwh`."},"annual_production_calculation":{"type":["string","null"],"description":"How the production estimate was arrived at."},"annual_production_estimate":{"type":["integer","null"],"format":"int32","description":"Estimated annual production in kWh."},"delivery_obligation":{"type":["string","null"],"format":"date-time","description":"When the supply obligation started."},"extended_storage":{"type":["boolean","null"],"description":"Whether the meter keeps values beyond the standard retention."},"installed_capacity":{"type":["number","null"],"format":"double","description":"The installed capacity, in kW. A JSON number."},"load_limit":{"type":["number","null"],"format":"double","description":"The load limit, in amperes. A JSON number, unlike the decimals above."},"meter_blocked":{"type":["boolean","null"],"description":"Whether the meter is blocked for supplier switching."},"meter_constant":{"type":["string","null"],"description":"The meter constant. A JSON string."},"meter_digits":{"type":["integer","null"],"format":"int32","description":"How many digits the register shows."},"meter_number":{"type":["string","null"],"description":"The meter's serial number."},"meter_priority":{"type":["string","null"],"description":"Priority code."},"meter_priority_desc":{"type":["string","null"],"description":"What the priority code means, in words."},"meter_reading_code":{"type":["string","null"],"description":"Reading method code."},"meter_reading_count":{"type":["integer","null"],"format":"int32","description":"How many readings are taken per reading period."},"meter_reading_desc":{"type":["string","null"],"description":"What the reading code means, in words. The v1 `meter_reading`."},"meter_reading_resolution_code":{"type":["string","null"],"description":"Reading resolution code."},"meter_reading_resolution_desc":{"type":["string","null"],"description":"What the reading resolution code means, in words."},"meter_settlement_code":{"type":["string","null"],"description":"Settlement method code."},"meter_settlement_desc":{"type":["string","null"],"description":"What the settlement code means, in words. The v1 `meter_settlement`."},"meter_status_code":{"type":["string","null"],"description":"Meter status code."},"meter_status_desc":{"type":["string","null"],"description":"What the meter status code means, in words. The v1 `meter_status`."},"meter_subtype_consumption_code":{"type":["string","null"],"description":"Consumption subtype code."},"meter_subtype_consumption_desc":{"type":["string","null"],"description":"What the consumption subtype code means, in words."},"meter_subtype_production_code":{"type":["string","null"],"description":"Production subtype code."},"meter_subtype_production_desc":{"type":["string","null"],"description":"What the production subtype code means, in words."},"meter_type_code":{"type":["string","null"],"description":"Meter type code."},"meter_type_desc":{"type":["string","null"],"description":"What the meter type code means, in words. The v1 `meter_type`."}}},"MeteringPointResponse":{"type":"object","description":"Data model for metadata associated with a metering point, containing the current state, request\ntimestamp and when the last metering values were received, etc.\n\n* `mpid` is the metering point ID.\n* `state` represents whether or not it is still awaiting approval, active, has been revoked, or\n  expired.\n* `requested_at` is the timestamp for when the request for access was sent.\n* `request_id` is the unique identifier of the request message.\n* `processing` is whether or not there is an active, in-flight, request currently being\n  processed.\n* `updated_at` is when the most recent change to metering values were inserted. This does not\n  include updates to master data for customer and meter information. Will be null while state\n  is pending.\n* `expires` is an optional datetime for when a pending access request will expire, or granted\n  access will expire in the source system (i.e Elhub, DataHub), if access is granted on a time\n  limited basis.\n* `notice` is an optional message if there are any important events or issues related to this\n  metering point.\n* `meter_metadata` is an optional varying JSON structure containing metering point specs from\n  i.e Elhub\n* `customer_metadata` is an optional varying JSON structure containing customer specs from i.e\n  Elhub","required":["mpid","state","requested_at","request_id"],"properties":{"customer_metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CustomerInformation","description":"What Elhub says about the end user behind the meter, projected down to the version 1 shape."}]},"expires":{"type":["string","null"],"format":"date-time","description":"When a pending request or a time limited access runs out."},"meter_metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MeteringPointInformation","description":"What Elhub says about the meter, projected down to the version 1 shape."}]},"mpid":{"type":"string","description":"The metering point id: 18 digits."},"notice":{"type":["string","null"],"description":"What happened, when something did."},"processing":{"type":"boolean","description":"Whether a request to Elhub is in flight."},"request_id":{"type":"string","format":"uuid","description":"The id of the request message that asked for access."},"requested_at":{"type":"string","format":"date-time","description":"When access was requested."},"state":{"$ref":"#/components/schemas/MeteringPointState","description":"Where the metering point is in its life."},"updated_at":{"type":["string","null"],"format":"date-time","description":"When meter data last arrived."}}},"MeteringPointResponseV2":{"type":"object","description":"Data model for metadata associated with a metering point, containing the current state, request\ntimestamp and when the last metering values were received, etc.\n\n* `mpid` is the metering point ID.\n* `state` represents whether or not it is still awaiting approval, active, has been revoked, or\n  expired.\n* `requested_at` is the timestamp for when the request for access was sent.\n* `request_id` is the unique identifier of the request message.\n* `processing` is whether or not there is an active, in-flight, request currently being\n  processed.\n* `updated_at` is when the most recent change to metering values were inserted. This does not\n  include updates to master data for customer and meter information. Will be null while state\n  is pending.\n* `expires` is an optional datetime for when a pending access request will expire, or granted\n  access will expire in the source system (i.e Elhub, DataHub), if access is granted on a time\n  limited basis.\n* `notice` is an optional message if there are any important events or issues related to this\n  metering point.\n* `meter_metadata` is an optional varying JSON structure containing metering point specs from\n  i.e Elhub\n* `customer_metadata` is an optional varying JSON structure containing customer specs from i.e\n  Elhub","required":["mpid","state","requested_at","request_id"],"properties":{"customer_metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CustomerInformationV2","description":"What Elhub says about the end user behind the meter, whole."}]},"expires":{"type":["string","null"],"format":"date-time","description":"When a pending request or a time limited access runs out."},"meter_metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MeteringPointInformationV2","description":"What Elhub says about the meter, whole."}]},"mpid":{"type":"string","description":"The metering point id: 18 digits."},"notice":{"type":["string","null"],"description":"What happened, when something did."},"processing":{"type":"boolean","description":"Whether a request to Elhub is in flight."},"request_id":{"type":"string","format":"uuid","description":"The id of the request message that asked for access."},"requested_at":{"type":"string","format":"date-time","description":"When access was requested."},"state":{"$ref":"#/components/schemas/MeteringPointState","description":"Where the metering point is in its life."},"updated_at":{"type":["string","null"],"format":"date-time","description":"When meter data last arrived."}}},"MeteringPointState":{"type":"string","description":"Where a metering point is in its life.","enum":["pending","active","revoked","expired","failed"]},"MeteringPointStatus":{"type":"object","description":"Data model for metadata associated with a metering point, containing the current state, last\nupdate of timeseries data, and potential expiry timestamp and notice message.\n\n* `mpid` is the metering point ID.\n* `state` represents whether or not it is still awaiting approval, active, failed, has been\n  revoked, or expired.\n* `processing` is whether or not there is an inflight request awaiting response, temporarily\n  blocking any action.\n* `updated_at` is the when the latest metering values were received. This does not include\n  updates to master data for customer and meter information. Will be `null` until metering\n  values are received.\n* `expires` if applicable, is when the access request will expire for `pending` state, or when\n  the access period expires for `active` state. The latter is only applicable if the source\n  system or end user explicitly sets and expiry date.\n* `notice` is an optional message if there are any important events or issues related to this\n  metering point.","required":["mpid","state","processing"],"properties":{"expires":{"type":["string","null"],"format":"date-time","description":"When a pending request or a time limited access runs out."},"mpid":{"type":"string","description":"The metering point id: 18 digits."},"notice":{"type":["string","null"],"description":"What happened, when something did."},"processing":{"type":"boolean","description":"Whether a request to Elhub is in flight, which temporarily blocks some actions."},"state":{"$ref":"#/components/schemas/MeteringPointState","description":"Where the metering point is in its life."},"updated_at":{"type":["string","null"],"format":"date-time","description":"When meter data last arrived. `null` until the first values do, which is what makes this\nthe field to poll on."}}},"MeteringPointTaxationProfile":{"type":"object","description":"Data model for the details about taxation, fees and certificates.","properties":{"consumption_code":{"type":["string","null"],"description":"Consumption code."},"consumption_code_desc":{"type":["string","null"],"description":"What the consumption code means, in words."},"el_certificate_share":{"type":["string","null"],"description":"The share of consumption covered by electricity certificates."},"el_fee":{"type":["string","null"],"description":"The electricity tax."},"enova_fee":{"type":["string","null"],"description":"The Enova fee itself. A JSON **string**, at the scale it was stored with."},"enova_fee_type":{"oneOf":[{"type":"null"},{"type":"string","description":"How the Enova fee is charged: `Fixed` or `ConsumptionDependent`.","enum":["Fixed","ConsumptionDependent"]}],"description":"How the Enova fee is charged."},"nace_division_code":{"type":["string","null"],"description":"The NACE division the consumption is classified under."},"vat_code":{"type":["string","null"],"description":"Value added tax code."},"vat_code_desc":{"type":["string","null"],"description":"What the value added tax code means, in words."}}},"MeteringValue":{"type":"object","description":"Data model for a single metered value at a specific timestamp.\n\n* `ts`: is the timestamp for the start of the data point (spanning until the next one, i.e 1hr)\n* `direction`: is whether or not this refers to energy being consumed or produced.\n* `product`: Product code of what type is being measured on this channel, i.e 8716867000030 for\n  Energy Active.\n* `resolution`: The resolution code of the series, i.e `PT60M` / `PT1H` or `PT15M`.\n* `value`: The value, in kWh or kVArh depending on channel, as a decimal (string),\n  produced or consumed during the timeframe.\n* `method`: is how the metered value was generated, i.e metered, estimated or temporary.\n* `updated`: is the timestamp was last retrieved/updated from the source.\n* `remarks`: is optional extra information, for example if it's an initial estimated value or\n  final estimated value.","required":["ts","direction","product","resolution","value","method","updated"],"properties":{"direction":{"oneOf":[{"type":"string","description":"Which way the energy flowed on a channel.","enum":["consumption","production"]}],"description":"Which way the energy flowed."},"method":{"oneOf":[{"type":"string","description":"How the value was arrived at.","enum":["metered","estimated","temporary","calculated"]}],"description":"How the value was arrived at."},"product":{"oneOf":[{"type":"string","description":"What is being measured on a channel: an Elhub product code.","enum":["8716867000030","8716867000047","8716867000139","8716867000146","4700000000301","4700000000302","4700000000303","4700000000101","4700000000201"]}],"description":"The product code of the channel."},"remarks":{"type":["string","null"],"description":"Extra context, such as whether an estimate is preliminary or final."},"resolution":{"oneOf":[{"type":"string","description":"How long one value covers.","enum":["PT5M","PT15M","PT30M","PT60M","PT1H","P1D","P1M","P1Y","N"]}],"description":"The resolution code of the channel."},"ts":{"type":"string","format":"date-time","description":"The start of the interval this value covers."},"updated":{"type":"string","format":"date-time","description":"When the source system registered the value. A correction carries a newer one."},"value":{"type":"string","description":"The value, in kWh or kVArh, as a decimal string."}}},"MeteringValuesByChannel":{"type":"object","description":"Data model for metering values for a metering point separated into channels.\n\n* `mpid`: The metering point ID.\n* `channels`: A list of `ChannelMeteringValues` objects, containing channel details and metering\n  values.","required":["mpid","channels"],"properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/ChannelMeteringValues"},"description":"Its channels, in the order their first value appeared."},"mpid":{"type":"string","description":"The metering point."}}},"MeteringValuesResponse":{"type":"object","description":"Data model for a time series of metering values for a specific MPID.\n\n* `mpid` is the MPID for the requested time series.\n* `values` is an array of `MeteringValue` objects, each representing a single data point.","required":["mpid","values"],"properties":{"mpid":{"type":"string","description":"The metering point the series belongs to."},"values":{"type":"array","items":{"$ref":"#/components/schemas/MeteringValue"},"description":"The values, newest first."}}},"Party":{"type":"object","description":"A market party as Elhub publishes it: who they are and what roles they hold.","required":["gln","name"],"properties":{"gln":{"type":"string","description":"Global Location Number identifying the party."},"grid_areas":{"type":"array","items":{"type":"string"},"description":"Metering grid area codes this party owns, as Elhub last listed them. Each one can be looked\nup on its own. Empty when Elhub lists no areas for the party, which is the usual case."},"last_seen":{"type":["string","null"],"format":"date-time","description":"When Elhub last listed this party."},"name":{"type":"string","description":"Registered name of the party."},"org_no":{"type":["string","null"],"description":"Norwegian organisation number. Not set for every party."},"roles":{"type":"array","items":{"type":"string"},"description":"Market roles the party holds, such as `GridOwner` or `BalanceSupplier`."}}},"PriceAreaName":{"type":"string","description":"A Nordic bidding zone.","enum":["NO1","NO2","NO3","NO4","NO5","SE1","SE2","SE3","SE4","DK1","DK2","FI"]},"RegisterEndUserRequest":{"type":"object","description":"Data model for registering an end user (not applicable if using own GLN).\n\n* `private`: Must be `false`. Private end users are registered through `POST /api/v2/end-users`\n  with `date_of_birth`.\n* `identifier`: Organization number, nine digits.\n* `first_name`: Given name (and potential middle names) of the end user.\n* `last_name`: Family name of the end user.\n* `email`: The e-mail address of the end user.\n* `company_name`: If `private` is `false`, `company_name` must be provided. If `private` is\n  `true`, `company_name` must be `null` or omitted from the request. Names are trimmed of\n  surrounding whitespace and cannot be blank.","required":["private","identifier","first_name","last_name","email"],"properties":{"company_name":{"type":["string","null"],"description":"The company's name as the official records hold it. Required when `private` is false, and\nrefused when it is true. Absent and `null` are the same thing here.","maxLength":128,"minLength":1},"email":{"type":"string","format":"email","description":"The e-mail address of the contact person.","maxLength":128},"first_name":{"type":"string","description":"The given name, and any middle names, of the contact person.","maxLength":96,"minLength":1},"identifier":{"type":"string","description":"Organization number, nine digits."},"last_name":{"type":"string","description":"The family name of the contact person.","maxLength":96,"minLength":1},"private":{"type":"boolean","description":"Whether this end user is a private person rather than a business entity. Must be `false`:\nprivate end users are registered through `POST /api/v2/end-users`."}}},"RegisterEndUserRequestV2":{"type":"object","description":"Register a new end user.\n\n* `private`: whether this end user is a private person rather than a business.\n* `identifier`: the organization number, required for a business. Must be omitted or `null` for\n  a private person: Enersky assigns their identifier and returns it in the response.\n* `date_of_birth`: the private person's date of birth, `YYYY-MM-DD`. Required for a private\n  person, and must be omitted or `null` for a business.\n* `first_name`, `last_name`, `email`: the contact person who accepts the end user agreement.\n* `company_name`: required for a business, and must be omitted or `null` for a private person.\n\nNames are trimmed of surrounding whitespace and cannot be blank.\n\nFields that are not listed here are rejected.","required":["private","first_name","last_name","email"],"properties":{"company_name":{"type":["string","null"],"description":"Registered company name. Required for a business, and must be omitted or `null` for a\nprivate person.","maxLength":128,"minLength":1},"date_of_birth":{"type":["string","null"],"format":"date","description":"The private person's date of birth, `YYYY-MM-DD`. Required for a private person. Must be\nomitted or `null` for a business."},"email":{"type":"string","format":"email","description":"E-mail address of the contact person.","maxLength":128},"first_name":{"type":"string","description":"Given name of the contact person who accepts the end user agreement.","maxLength":96,"minLength":1},"identifier":{"type":["string","null"],"description":"The organization number, nine digits. Required for a business. Must be omitted or `null`\nfor a private person.","maxLength":32},"last_name":{"type":"string","description":"Family name of the contact person.","maxLength":96,"minLength":1},"private":{"type":"boolean","description":"Whether this end user is a private person rather than a business."}},"additionalProperties":false},"RegisterEndUserResponse":{"type":"object","description":"Data model for registering an end user (not applicable if using own GLN).\n\n* `identifier`: Organization number, or the identifier Enersky assigned to a private end user.\n* `domain`: Which data domain this end user is referencing (i.e `elhub`).\n* `private`: Whether or not this end user is a private person (not representing a company).\n* `first_name`: Given name (and potential middle names) of the end user.\n* `last_name`: Family name of the end user.\n* `email`: The e-mail address of the end user.\n* `completed`: Whether or not end user registration is completed (end user agreement of PoA\n  accepted).\n* `company_name`: If `private` is `false`, `company_name` must be provided. If `private` is\n  `true`, `company_name` must be `null` or omitted from the request.","required":["identifier","domain","private","first_name","last_name","email","completed","company_name"],"properties":{"company_name":{"type":["string","null"],"description":"The company's name, or `null` for a private person. Always present as a key."},"completed":{"type":"boolean","description":"Whether the end user agreement is accepted, and the Elhub gate therefore open. False on a\nfresh registration, which has nothing accepted yet."},"domain":{"type":"string","description":"Which source system this end user is registered in. Always `elhub` here."},"email":{"type":"string","format":"email","description":"The e-mail address of the contact person."},"first_name":{"type":"string","description":"The given name of the contact person."},"identifier":{"type":"string","description":"The organisation number, or the identifier Enersky assigned to a private end user."},"last_name":{"type":"string","description":"The family name of the contact person."},"private":{"type":"boolean","description":"Whether this end user is a private person."}}},"SendEndUserAgreementSignatureRequest":{"type":"object","description":"Data model for sending an email to the end user with a link to sign an end user agreement.\n\n* `identifier`: Organization number, or the identifier Enersky assigned to a private end user.","required":["identifier"],"properties":{"identifier":{"type":"string","description":"The organisation number of the end user, or the identifier Enersky assigned to them."}}},"SubscribeRequest":{"type":"object","description":"Request for requesting access to meter data for a specific MPID.\n\n* `end_user_identifier` is the organisation number, or the identifier Enersky assigned to a\n  private end user when it was registered.\n* `mpid` is the metering point ID, a string containing 18 digits.","required":["mpid"],"properties":{"end_user_identifier":{"type":["string","null"],"description":"The organisation number, or the identifier Enersky assigned to a private end user when it\nwas registered. Absent and `null` are the same thing, and both mean \"this customer acts\nunder its own GLN\"."},"mpid":{"type":"string","description":"The metering point to request access to: 18 digits."}}},"SubscribeResponse":{"type":"object","description":"Response for requesting access to meter data for a specific MPID.\n\n* `request_id` is unique request identifier for tracking the state of the access request.\n* `mpid` is the 18 digit MPID for which access was requested.\n* `requested_at` is the timestamp at which the request was sent.","required":["request_id","mpid","requested_at"],"properties":{"mpid":{"type":"string","description":"The metering point access was requested for."},"request_id":{"type":"string","format":"uuid","description":"The id of the request message that asked Elhub for access. Track the state through\n`GET /api/v1/mp/{mpid}`."},"requested_at":{"type":"string","format":"date-time","description":"When the request was sent."}}},"SubscribeTokenListResponse":{"type":"object","description":"Response for all or a filtered set of subscribe tokens.\n* `tokens` is all subscribe web flow tokens returned by the query. Optionally filtered by end\n  user.","required":["tokens"],"properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/SubscribeTokenResponse"},"description":"The tokens. No order is promised."}}},"SubscribeTokenResponse":{"type":"object","description":"Response for a single subscribe web flow token.\n\n* `token` is the unique identifier of the subscribe token.\n* `created_at` is when the token was created.\n* `end_user_identifier` is the identifier of the associated end user, or `null` if the token is\n  not tied to an end user managed by the system.","required":["token","created_at"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When it was minted."},"end_user_identifier":{"type":["string","null"],"description":"The end user it is for, or `null` for a customer acting under its own GLN."},"token":{"type":"string","format":"uuid","description":"The token. `request_id` is the name the other endpoints give it."}}},"SubscribeWebFlowTokenHistoryResponse":{"type":"object","description":"Response for retrieving history for a token used by end users when granting access to metering\npoints through the web flow.\n\n* `history` is a sorted (newest first) list of results from webflow token based metering point\n  access grants.","required":["history"],"properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/SubscribeWebFlowTokenResult"},"description":"The results, newest first."}}},"SubscribeWebFlowTokenResult":{"type":"object","description":"A single result from the webflow token based approach to granting access to metering points.\n\n* `created_at` is the timestamp when the callback receipt was received.\n* `mpids` is the list of metering point IDs that were granted access to in this session (empty\n  if error).\n* `error` is an optional error string, indicating the reason for why no access was given by the\n  end user.","required":["created_at","mpids"],"properties":{"created_at":{"type":"string","format":"date-time","description":"When the receipt arrived."},"error":{"type":["string","null"],"description":"Why no access was given, when none was."},"mpids":{"type":"array","items":{"type":"string"},"description":"The metering points granted in this session. Empty when there was an error."}}},"UnsubscribeRequest":{"type":"object","description":"Request for revoking access to meter data for a specific MPID.\n\nThe `mpid` must be a string containing 18 digits.","required":["mpid"],"properties":{"mpid":{"type":"string","description":"The metering point to give up access to: 18 digits."}}},"UnsubscribeResponse":{"type":"object","description":"Response for revoking access to meter data for a specific MPID.\n\n* `mpid` is the 18 digit MPID for which access was requested.\n* `success` is whether the access was successfully removed.","required":["mpid","success"],"properties":{"mpid":{"type":"string","description":"The metering point access was given up for."},"success":{"type":"boolean","description":"Whether the access was removed. Always `true`: a metering point that had no access to\nremove is a 404 instead."}}},"UpdateEndUserRequestV2":{"type":"object","description":"Update an end user. Fields that are omitted are left unchanged.\n\n* `first_name`, `last_name`, `email`: the contact person who accepts the end user agreement.\n* `company_name`: required for a business, and must be `null` for a private person. Send `null`\n  to clear it.\n\nNames are trimmed of surrounding whitespace and cannot be blank. Only `company_name` accepts\n`null`. For the other fields, omit the field to leave it unchanged.\n\n`identifier` and `date_of_birth` cannot be changed. They identify the legal person, so a\ndifferent value means a different end user. Register a new end user instead.\n\n`stage` cannot be changed. It is set by what the end user does with their agreement.\n\nFields that are not listed here are rejected, so a misspelled field name returns an error\ninstead of being ignored.","properties":{"company_name":{"type":["string","null"],"description":"Registered company name; send `null` to clear it. Required for a business, and must be\n`null` for a private person.","maxLength":128,"minLength":1},"email":{"type":"string","format":"email","description":"E-mail address of the contact person.","maxLength":128},"first_name":{"type":"string","description":"Given name of the contact person who accepts the end user agreement.","maxLength":96,"minLength":1},"last_name":{"type":"string","description":"Family name of the contact person.","maxLength":96,"minLength":1}},"additionalProperties":false},"ValidationErrorItem":{"type":"object","description":"One field-level complaint from request validation.","required":["loc","msg","type"],"properties":{"loc":{"type":"array","items":{"oneOf":[{"type":"string","description":"A field name, or a source segment such as `body`."},{"type":"integer","format":"int64","description":"An index into a list.","minimum":0}],"description":"One `loc` segment: a field name or a list index."},"description":"Path to the field that failed, from the root of the request."},"msg":{"type":"string","description":"What is wrong with it."},"type":{"type":"string","description":"The validation rule that failed."}}},"ValidationErrorResponse":{"type":"object","description":"The body of a 422. `detail` is per-field, so it is a list rather than one sentence.","required":["detail","code"],"properties":{"code":{"type":"string","description":"Always `ES-RQ-008` today."},"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"},"description":"One entry per thing that is wrong with the request."}}}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}