Enectiva REST API - Librarian
HomeEnectivaUser ManualEnerfis
HomeEnectivaUser ManualEnerfis
  1. Access tokens
  • Introduction
  • Access tokens
    • Create a new access token
      POST
  • Data points from Enectiva
    • List data points of a data series
      GET
  • Deltas
    • Introduction to Deltas
    • List monthly deltas of an entity
      GET
    • List monthly deltas of a meter
      GET
    • List monthly deltas of a virtual meter
      GET
  • Data points to Enectiva
    • Latest data point
      GET
    • Create a new data point
      POST
    • Delete a data point by ID
      DELETE
    • Delete a data point by time
      DELETE
  • Profiles to Enectiva
    • Latest profile
      GET
    • Create a new/update an existing profile
      POST
    • Delete a profile by ID
      DELETE
    • Delete a profile by time range
      DELETE
  • Readings to Enectiva
    • Latest reading
      GET
    • Create a new reading
      POST
    • Delete a reading by ID
      DELETE
    • Delete a reading by time
      DELETE
  • Readings from Enectiva
    • List readings of a meter
      GET
  • Entities from Enectiva
    • Entity
      GET
    • List entities
      GET
  • Meters from Enectiva
    • List meters
    • Meter
  • Received energy invoices
    • Create a new invoice
  1. Access tokens

Create a new access token

POST
https://api.enectiva.cz//access_tokens
Last modified:2025-10-31 18:47:17
This action lets you use a long‑lived login token to obtain a short‑lived access token, which you can then use to access other resources. The access token is a JWT that you can inspect to verify its permissions and validity.
For access tokens, the validity is limited to 5 minutes.
In addition to standard claims, each token includes an exp claim that contains a NumericDate (a Unix timestamp in whole seconds, UTC, since 1970‑01‑01T00:00:00Z). The token is rejected once the current time is at or past exp. When it expires, you must acquire a new access token.
At the same time, the permissions are stored in the scp claim.

Request

Header Params

Body Params application/vnd.api+json

Example
{
    "data": {
        "attributes": {
            "customer_uuid": "9796513c-e811-4b75-b2eb-b36b9f1a1b8c",
            "login_token": "5d16cbf4794439be3139a2009edc8cc06911802102214b5fce8320ff4edb61ae"
        },
        "type": "login_tokens"
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.enectiva.cz//access_tokens' \
--header 'Accept: application/vnd.api+json' \
--header 'Content-Type: application/vnd.api+json' \
--data-raw '{
    "data": {
        "attributes": {
            "customer_uuid": "9796513c-e811-4b75-b2eb-b36b9f1a1b8c",
            "login_token": "5d16cbf4794439be3139a2009edc8cc06911802102214b5fce8320ff4edb61ae"
        },
        "type": "login_tokens"
    }
}'

Responses

🟢201Created
application/vnd.api+json
Created
Body

Example
{
    "data": {
        "attributes": {
            "encoded": "eyJhbGciOiJFUzI1NiJ9.eyJzY3AiOlsiZW50aXR5X2NvbnN1bXB0aW9ucyJdLCJqaXQiOiJjMGY2ODdhYzZiNDdjM2FiIiwibHRpIjo4LCJzdWIiOiI1MTIzZDhlZi1iNTAxLTRjNzEtYjE4OC04M2FjMzk5ZDY2YjkiLCJleHAiOjE1NzQ3NzU5NjgsImtleSI6MX0.jbRqzsRS78yEuLO5advtgjlYgEbL4UckDoErj2Wc2SjM-pjr1MGUvb2uZkCcIxAmkLfy99pjNW8OT2t9snL6xw"
        },
        "id": "c0f687ac6b47c3ab",
        "type": "access_tokens"
    }
}
🟠400Bad Request
🟠406Not Acceptable
🟠415Unsupported Media Type
🟠429Too Many Requests
🔴500Server Error
Modified at 2025-10-31 18:47:17
Previous
Introduction
Next
List data points of a data series
Built with