Vai al contenuto principale
POST
/
clusters
/
{clusterId}
/
schedules
Apply a schedule to every location in a cluster
curl --request POST \
  --url https://api.ridergy.com/v1/clusters/{clusterId}/schedules \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "startTime": "2026-06-12T08:00:00Z",
  "endTime": "2026-06-12T18:00:00Z",
  "limitKw": 50,
  "priority": 5
}
'
{
  "clusterId": "clst_20260612_a1b2c3d4",
  "applied": [
    {
      "locationId": "3632155",
      "priority": 5,
      "limitKw": 50,
      "startTime": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z",
      "permanentLimitKw": 100,
      "effectiveLimitKw": 50
    }
  ],
  "errors": [
    {
      "locationId": "<string>",
      "error": {
        "error": {
          "code": "LOCATION_NOT_FOUND",
          "message": "Location 123 was not found for the provided tenant",
          "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      }
    }
  ],
  "totalLocations": 2
}

Autorizzazioni

x-api-key
string
header
obbligatorio

Chiave API per-tenant. Il tenant viene derivato dalla chiave — mai dalla richiesta.

Parametri del percorso

clusterId
string
obbligatorio

Corpo

application/json
startTime
string<date-time>
obbligatorio

Timestamp UTC ISO-8601. Obbligatorio.

Esempio:

"2026-06-12T08:00:00Z"

endTime
string<date-time>
obbligatorio

Timestamp UTC ISO-8601. Deve essere successivo a startTime e nel futuro. Obbligatorio.

Esempio:

"2026-06-12T18:00:00Z"

limitKw
number<float>
obbligatorio

Limite di potenza in kW. Deve essere maggiore di 0. Obbligatorio.

Esempio:

50

priority
integer
predefinito:0

Livello di priorità in stile stack OCPP, da 0 (più bassa) a 10 (più alta). L'invio di un profilo a una priorità già esistente per questo target lo sostituisce.

Intervallo richiesto: 0 <= x <= 10
Esempio:

5

Risposta

Schedulazione applicata ad almeno una location

clusterId
string
Esempio:

"clst_20260612_a1b2c3d4"

applied
object[]
errors
object[]
totalLocations
integer
Esempio:

2