Create or replace a location priority limit profile
curl --request POST \
--url https://api.ridergy.com/v1/locations/{locationId}/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
}
'import requests
url = "https://api.ridergy.com/v1/locations/{locationId}/schedules"
payload = {
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startTime: '2026-06-12T08:00:00Z',
endTime: '2026-06-12T18:00:00Z',
limitKw: 50,
priority: 5
})
};
fetch('https://api.ridergy.com/v1/locations/{locationId}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ridergy.com/v1/locations/{locationId}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2026-06-12T08:00:00Z',
'endTime' => '2026-06-12T18:00:00Z',
'limitKw' => 50,
'priority' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ridergy.com/v1/locations/{locationId}/schedules"
payload := strings.NewReader("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ridergy.com/v1/locations/{locationId}/schedules")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ridergy.com/v1/locations/{locationId}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}"
response = http.request(request)
puts response.read_body{
"locationId": "3632155",
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"permanentLimitKw": 100,
"effectiveLimitKw": 50
}位置
创建或替换位置优先级限制配置文件
为指定位置在给定优先级下创建一个带时间窗口的功率限制配置文件。 如果该位置在该优先级下已存在配置文件,将被替换。生效限制 会立即重新计算并写入到该位置。
POST
/
locations
/
{locationId}
/
schedules
Create or replace a location priority limit profile
curl --request POST \
--url https://api.ridergy.com/v1/locations/{locationId}/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
}
'import requests
url = "https://api.ridergy.com/v1/locations/{locationId}/schedules"
payload = {
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startTime: '2026-06-12T08:00:00Z',
endTime: '2026-06-12T18:00:00Z',
limitKw: 50,
priority: 5
})
};
fetch('https://api.ridergy.com/v1/locations/{locationId}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ridergy.com/v1/locations/{locationId}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2026-06-12T08:00:00Z',
'endTime' => '2026-06-12T18:00:00Z',
'limitKw' => 50,
'priority' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ridergy.com/v1/locations/{locationId}/schedules"
payload := strings.NewReader("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ridergy.com/v1/locations/{locationId}/schedules")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ridergy.com/v1/locations/{locationId}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}"
response = http.request(request)
puts response.read_body{
"locationId": "3632155",
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"permanentLimitKw": 100,
"effectiveLimitKw": 50
}授权
按租户分配的 API 密钥。租户信息从密钥中获取——绝不来自请求本身。
路径参数
请求体
application/json
ISO-8601 UTC 时间戳。必填。
示例:
"2026-06-12T08:00:00Z"
ISO-8601 UTC 时间戳。必须晚于 startTime 且为未来时间。必填。
示例:
"2026-06-12T18:00:00Z"
功率限制,单位为 kW。必须大于 0。必填。
示例:
50
OCPP 协议栈风格的优先级级别,0(最低)到 10(最高)。 如果该目标对象在此优先级下已存在配置文件,再次提交将 替换该配置文件。
必填范围:
0 <= x <= 10示例:
5
⌘I

