Flip Energy API
  1. Schemas
Flip Energy API
  • Overview
  • Important concepts
  • Authentication
  • Enrollment process
  • End-user app design
  • Monitoring / Telemetry
  • Control
  • Change log
  • Mobile App API
    • Devices
      • Create Device
      • Read Devices
      • Read Device
      • Update Device
      • Delete Device
    • Enrollments
      • Create Enrollment
      • Read Enrollments
      • Read Enrollment
      • Delete Enrollment
    • Events
      • Read Events
      • Read Event
      • Update Event Participation
    • Programs
      • Read Programs
      • Read Program
    • Sites
      • Read Site
      • Update Site
  • Cloud API
    • Sites
      • Get Site Token
      • Get Sites
    • Commissioning
      • Commission Site And Devices
    • Sessions
      • Sessions
    • Commands
      • Command Created
      • Update Command Status
    • Programs
      • Read Programs
    • Telemetry
      • Report Battery Telemetry
    • Webhooks
      • Overview
      • List of events
      • Webhook headers
      • Schemas
        • Command
        • Enrollment
        • Event
  1. Schemas

Command

Webhook - Command
event_type
enum<string> 
required
Allowed values:
command.canceledcommand.createdcommand.endedcommand.startedcommand.updated
event_object
object (Command) 
required
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
Time at which the action should start. Note that this may be before the event itself has started. For instance, in order to pre-charge a battery prior to a discharge event.
Example:
2025-04-30 12:00:00.000Z
ends_at
string <date-time> | null 
read-onlyrequired
Time at which the action should stop. If null, the action should continue until replaced by another one.
Example:
2025-04-30 14:00:00.000Z
duration_s
number  | null 
read-onlyrequired
Duration of the action, in seconds. If null, the action should continue until replaced by another one.
Example:
7200
is_preparatory_action
boolean 
read-onlyrequired
Whether the command is not part of the event itself but in preparation for the event. For instance, charging a battery before a discharging event.
battery_commands
object (BatteryCommand) 
read-onlyrequired
status
enum<string> 
read-onlyrequired
The status of the command itself. Only OK means that the command is happening.
Allowed values:
CANCELEDOKOPT_OUT
Example:
OK
device_status
enum<string> 
required
The acknowledgment of the command by the device. Only OK means that the device is ready to perform the command.
Allowed values:
FAILED_OFFLINEFAILED_FAULTOKPENDING
Example:
OK
device_status_reason
string  | null 
optional
It helps to share more human-readable information when setting the 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
Your server must respond to the event with code 204 (No content).
In order to respond to the command, use Update Command.
Modified at 2024-07-26 08:38:35
Previous
Webhook headers
Next
Enrollment
Built with