Update a charge window
curl --request PATCH \
--url https://clarus-api.com/api/charge_windows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"name": "Weekly Monday",
"numbers": [
1
]
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_windows/{id}"
payload = { "data": {
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"name": "Weekly Monday",
"numbers": [1]
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_windows',
attributes: {frequency: 'Day', name: 'Weekly Monday', numbers: [1]}
}
})
};
fetch('https://clarus-api.com/api/charge_windows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"id": 1,
"name": "Weekly Monday",
"numbers": [
1
]
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Charging: Configuration
Update a charge window
Update an existing charge window’s attributes.
PATCH
/
api
/
charge_windows
/
{id}
Update a charge window
curl --request PATCH \
--url https://clarus-api.com/api/charge_windows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"name": "Weekly Monday",
"numbers": [
1
]
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_windows/{id}"
payload = { "data": {
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"name": "Weekly Monday",
"numbers": [1]
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_windows',
attributes: {frequency: 'Day', name: 'Weekly Monday', numbers: [1]}
}
})
};
fetch('https://clarus-api.com/api/charge_windows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "charge_windows",
"attributes": {
"frequency": "Day",
"id": 1,
"name": "Weekly Monday",
"numbers": [
1
]
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "charge_windows",
"attributes": {
"name": "Updated Window",
"numbers": [1, 3, 5]
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
frequency | No | Update frequency type (Day/Month) |
name | No | Update the display name |
numbers | No | Update the day/date numbers |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The unique identifier of the charge window to update
Body
application/json
Show child attributes
Show child attributes
Response
Charge Window updated successfully
Show child attributes
Show child attributes
⌘I

