Skip to main content
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
      ]
    }
  }
}
'
{
  "data": {
    "id": "1",
    "type": "charge_windows",
    "attributes": {
      "frequency": "Day",
      "id": 1,
      "name": "Weekly Monday",
      "numbers": [
        1
      ]
    }
  }
}

Request Structure

{
  "data": {
    "type": "charge_windows",
    "attributes": {
      "name": "Updated Window",
      "numbers": [1, 3, 5]
    }
  }
}

Key Fields

FieldRequiredDescription
frequencyNoUpdate frequency type (Day/Month)
nameNoUpdate the display name
numbersNoUpdate the day/date numbers

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the charge window to update

Body

application/json
data
object
required

Response

Charge Window updated successfully

data
object