Skip to main content
GET
/
formulas
/
List all formulas
curl --request GET \
  --url https://sandbox.prezio.eu/api/formulas/ \
  --header 'Authorization: <api-key>'
{
  "count": 15,
  "next": "https://api.prezio.com/api/formulas/?page=2",
  "previous": "https://api.prezio.com/api/formulas/?page=1",
  "results": [
    {
      "count": 2,
      "next": null,
      "previous": null,
      "results": [
        {
          "id": 1,
          "name": "Swedish Peak Power Charge - High Load Period",
          "key": "se_peak_highlast",
          "formula_definition": "peak_demand * rate",
          "usage": {
            "summary": {
              "total_components": 15,
              "total_tariffs": 8,
              "component_types": [
                "DEMAND"
              ]
            },
            "details": [
              {
                "tariff_id": "tar_45",
                "tariff_name": "Business Low Voltage",
                "component_id": "com_1889",
                "component_name": "Winter Peak Demand",
                "component_key": "winter_peak",
                "calculation_input": "peak_demand",
                "has_tariff_tou": true,
                "has_tiers": false
              }
            ]
          }
        },
        {
          "id": 2,
          "name": "Swedish Peak Power Charge - Base Load Period",
          "key": "se_peak_baslast",
          "formula_definition": "peak_demand * rate",
          "usage": null
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Query Parameters

component_type
string

Filter formulas by component type (e.g., DEMAND, CAPACITY)

include_usage
boolean

Include detailed usage information showing which components use each formula (default: false)

ordering
string

Sort results by: name, key (prefix with - for descending)

organization
string

Filter formulas by organization ID (e.g., org_123)

page
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

Search formulas by name, key

tariff_ids
string

Filter formulas by comma-separated tariff IDs (e.g., tar_45,tar_46)

Response

200 - application/json

OK

count
integer

Total number of items across all pages

Example:

15

next
string | null

URL for the next page of results, null if no next page

Example:

"https://api.prezio.com/api/formulas/?page=2"

previous
string | null

URL for the previous page of results, null if no previous page

Example:

"https://api.prezio.com/api/formulas/?page=1"

results
object[]