- Overview
- Important concepts
- Authentication
- Enrollment process
- End-user app design
- Monitoring / Telemetry
- Control
- Change log
- Mobile App API
- Cloud API
- Sites
- Commissioning
- Sessions
- Commands
- Programs
- Telemetry
- Webhooks
Update Command Status
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
PATCH
/v1/command/{id}
device_status
to OK
, otherwise set it to FAILED
.Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
id
string <uuid>
required
Body Params application/json
device_status
enum<string>
required
Allowed values:
FAILED_OFFLINEFAILED_FAULTOK
Example:
OK
device_status_reason
string
optional
Example:
Command scheduled
Example
{
"device_status": "FAILED_OFFLINE",
"device_status_reason": "Command scheduled"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://mock.apidog.com/m1/479670-0-default/v1/command/' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_status": "FAILED_OFFLINE",
"device_status_reason": "Command scheduled"
}'
Responses
🟢200Success
application/json
Body
id
string <uuid>
read-onlyrequired
event_id
string <uuid> | null
read-onlyrequired
device_id
string
required
Example:
xyz-123
starts_at
string <date-time>
read-onlyrequired
Example:
2025-04-30 12:00:00.000Z
ends_at
string <date-time> | null
read-onlyrequired
Example:
2025-04-30 14:00:00.000Z
duration_s
number | null
read-onlyrequired
Example:
7200
is_preparatory_action
boolean
read-onlyrequired
battery_commands
object (BatteryCommand)
read-onlyrequired
mode
enum<string>
required
Allowed values:
BACKUPCHARGEDISCHARGESAVINGSSELF_CONSUMPTIONSTANDBY
power_mode
enum<string> | enum<null>
read-onlyoptional
CHARGE
or DISCHARGE
onlyAllowed values:
FOLLOW_LOADSETPOINT
setpoint_w
integer | null
read-onlyoptional
power_mode
is SETPOINT
. In Watts, always a non-zero positive integer.Example:
5000
enable_grid_import
boolean | null
read-onlyoptional
enable_grid_export
boolean | null
deprecated
backup_reserve_percentage
integer | null
optional
>= 0<= 100
Example:
20
maximum_charge_percentage
integer | null
deprecated
>= 0<= 100
Example:
90
status
enum<string>
read-onlyrequired
OK
means that the command is happening.Allowed values:
CANCELEDOKOPT_OUT
Example:
OK
device_status
enum<string>
required
OK
means that the device is ready to perform the command.Allowed values:
FAILED_OFFLINEFAILED_FAULTOKPENDING
Example:
OK
device_status_reason
string | null
optional
device_status
. We will use it when we set device_status
to PENDING
, and feel free to use it as well when setting to OK
or FAILED
.Example:
Command scheduled
created_at
string <date-time>
read-onlyrequired
updated_at
string <date-time>
read-onlyrequired
Example
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
"device_id": "xyz-123",
"starts_at": "2025-04-30 12:00:00.000Z",
"ends_at": "2025-04-30 14:00:00.000Z",
"duration_s": 7200,
"is_preparatory_action": true,
"battery_commands": {
"mode": "BACKUP",
"power_mode": "FOLLOW_LOAD",
"setpoint_w": 5000,
"enable_grid_import": true,
"enable_grid_export": true,
"backup_reserve_percentage": 20,
"maximum_charge_percentage": 90
},
"status": "CANCELED",
"device_status": "FAILED_OFFLINE",
"device_status_reason": "Command scheduled",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
🟠400Invalid input
🟠404Record not found