Skip to main content
GET
/
rules
/
{id}
Retrieve a rule
curl --request GET \
  --url https://api.flatpeak.com/rules/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "rle_69a59db12eb2b9a16312541d",
  "object": "rule",
  "location_id": "loc_641b90b758fb8e6293716e40",
  "live_mode": true,
  "is_linked": false,
  "connection_type": "MANUAL",
  "status": "CONNECTED",
  "time_created": "2023-05-05T05:37:27Z",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "provider_id": "prv_63a6087272921ef075a8fd3e",
  "rule": [
    {
      "type": "CAPACITY_CHARGE",
      "mode": "TIERED",
      "direction": "IMPORT",
      "duration": 1800,
      "cycle_type": "MONTHLY",
      "cycle_start": "CONTRACT",
      "data": [
        {
          "to_kva": 500,
          "fee": 1.5802
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak tariff_id.

Response

Example response

id
string
required

Unique rule ID.

Example:

"rle_69a59db12eb2b9a16312541d"

object
string
required

Flatpeak object type. I.e. rule.

Example:

"rule"

location_id
string
required

Flatpeak Location ID this tariff is associated with.

Example:

"loc_641b90b758fb8e6293716e40"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

is_linked
boolean
default:false
required

This indicates that the tariff is linked to an external data source and is automatically updated from this source. Such as when it's linked to your customer's provider account or to a tariff in the Flatpeak tariffs library. This value is set automatically by Flatpeak and cannot be changed.

connection_type
string
required

Represents tariff connection type. Set automatically by Flatpeak depending on how the tariff was created. Supported options are MANUAL, LIBRARY and DIRECT.

Example:

"MANUAL"

status
string
required

Status of the rule. Possible values are CONNECTED or ERROR.

Example:

"CONNECTED"

time_created
string<date-time>
required

Indicates time when this tariff object was created.

Example:

"2023-05-05T05:37:27Z"

account_id
string
required

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

provider_id
string

Flatpeak ID of the provider this tariff belongs to.

Example:

"prv_63a6087272921ef075a8fd3e"

rule
Rule-CAPACITY_CHARGE · object[]

Rule object for CAPACITY_CHARGE