Flip Energy API
  1. Commissioning
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
        POST
    • 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. Commissioning

Commission Site And Devices

Cloud Mock
https://mock.apidog.com/m1/479670-0-default
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
POST
/v1/commission
commission
Note that you need the client authentication token (not the site token) to access the API.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
site
object (Site) 
required
id
string 
Id
required
The ID of the site in your system.
Example:
abc-789
first_name
string  | null 
optional
Example:
John
last_name
string  | null 
optional
Example:
Doe
company_name
string  | null 
optional
Ony if the customer is a company
Example:
ABC Co.
email
string <email> | null 
optional
state_code
enum<string>  | enum<null> 
State code
optional
Two-character code representing a US state or territory.
Allowed values:
AKALARAZCACOCTDEFLGAHIIAIDILINKSKYLAMAMDMEMIMNMOMSMTNCNDNENHNJNMNVNYOHOKORPAPRRISCSDTNTXUTVAVTWAWIWVWY
city
string  | null 
City
optional
Example:
San Francisco
zip_code
string  | null 
Zip Code
optional
In the sandbox, use zip codes 88800, 88801 or 88802 to match with test programs.
Examples:
888008880188802
street_address
string  | null 
Street Address
optional
Example:
123 Main St
street_address2
string  | null 
Street Address2
optional
service_account_id
string  | null 
Service Account Id
deprecated
An ID assigned to the residential customer by the utility. Can typically be found on the utility bill.
Example:
deprecated
devices
array[object (DeviceCreateIn) {9}] 
required
id
string 
Id
required
Example:
xyz-123
site_id
string 
required
Example:
abc-789
manufacturer_name
string 
Manufacturer Name
required
Example:
DeviceMaker
product_name
string 
Product Name
required
Example:
Model 1
serial_number
string 
Serial Number
required
Example:
123456789
type
enum<string> 
required
Allowed values:
BATTERYEV_CHARGER
attributes
object (DeviceBatteryAttributes) 
required
Structure depends on type. They are not user-adjustable and should be configured during installation / commissioning.
configuration
object (DeviceBatteryConfig) 
deprecated
Deprecated. Values will be accepted but ignored.
install_date
string <date-time>
required
The date the device was installed at the customer's site, or the date it received permission to operate from the utility, if different.
Example:
2022-02-22
can_auto_enroll
boolean 
Is Opt Out
required
Example
{
  "site": {
    "id": "abc-789",
    "first_name": "John",
    "last_name": "Doe",
    "company_name": "ABC Co.",
    "email": "[email protected]",
    "state_code": "AK",
    "city": "San Francisco",
    "zip_code": "88800",
    "street_address": "123 Main St",
    "street_address2": "string",
    "service_account_id": "deprecated"
  },
  "devices": [
    {
      "id": "xyz-123",
      "site_id": "abc-789",
      "manufacturer_name": "DeviceMaker",
      "product_name": "Model 1",
      "serial_number": "123456789",
      "type": "BATTERY",
      "attributes": {
        "battery_capacity_wh": 15000,
        "battery_power_input_w": 6000,
        "battery_power_output_w": 7500
      },
      "configuration": {
        "reserve_percentage": 20
      },
      "install_date": "2022-02-22"
    }
  ],
  "can_auto_enroll": true
}

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 POST 'https://mock.apidog.com/m1/479670-0-default/v1/commission' \
--header 'Content-Type: application/json' \
--data-raw '{
    "site": {
        "id": "abc-789",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "ABC Co.",
        "email": "[email protected]",
        "state_code": "AK",
        "city": "San Francisco",
        "zip_code": "88800",
        "street_address": "123 Main St",
        "street_address2": "string",
        "service_account_id": "deprecated"
    },
    "devices": [
        {
            "id": "xyz-123",
            "site_id": "abc-789",
            "manufacturer_name": "DeviceMaker",
            "product_name": "Model 1",
            "serial_number": "123456789",
            "type": "BATTERY",
            "attributes": {
                "battery_capacity_wh": 15000,
                "battery_power_input_w": 6000,
                "battery_power_output_w": 7500
            },
            "configuration": {
                "reserve_percentage": 20
            },
            "install_date": "2022-02-22"
        }
    ],
    "can_auto_enroll": true
}'

Responses

🟢200OK
application/json
Body
programs
array[object (Program) {15}] 
Programs
required
id
string <uuid>
Id
required
name
string 
Name
required
Example:
Demo Program
description
string 
required
Example:
This demo program is for demo purposes.
eligible_device_types
array[string]
Eligible Device Types
required
Allowed values:
BATTERYEV_CHARGER
can_auto_enroll
boolean 
required
minimum_reserve_percentage
integer 
required
The lowest SOC the battery can reach during events
Example:
20
minimum_commitment_months
integer  | null 
required
Can be null if the minimum commitment is currently not known.
Example:
12
participation_months
array[integer]
required
List of calendar months (range 1-12) in which the program is active
earnings_for_site_upfront
integer 
required
Estimated one-time upfront earnings in the program, based on the site information
Example:
1000
earnings_for_site_yearly
integer 
required
Estimated yearly recurring earnings in the program, based on the site information
Example:
500
created_at
string <date-time>
Created At
required
updated_at
string <date-time>
Updated At
required
enrollment_form
array [object {4}] 
required
A program might require special information from the end user on enrollment. If it does, this array will contain each of them. They should be used to dynamically convert into form fields.
terms_and_conditions_version
string  | null 
required
If a program requires terms and conditions to be agreed with, the current version will be provided here. It should not be displayed to the user.
Example:
2025-01-01
terms_and_conditions_text
string  | null 
required
If a program requires terms and conditions to be agreed with, the full text of the current version, in Markdown format, will be provided here. It should be displayed to the user.
Example:
**Terms and conditions** You agree to these mock terms.
enrollment
object (Enrollment) 
read-onlyoptional
id
string <uuid>
Id
required
device_ids
array[string]
required
site_id
string 
required
Example:
abc-123
program_id
string <uuid>
Program Id
required
enroll_method
enum<string> 
required
Allowed values:
AUTO_ENROLLUSER_ACTION
status
enum<string> 
required
Allowed values:
ACTIVENEEDS_ACTIONPENDINGREJECTEDUNENROLLED
status_reason
string  | null 
read-onlyrequired
Example:
Enrollment approved by utility
enrolled_at
string <date-time> | null 
Enrolled At
read-onlyrequired
unenrolled_at
string <date-time> | null 
Unenrolled At
read-onlyrequired
program_specific_attributes
array [object {2}] 
required
has_agreed_to_terms_and_conditions
boolean  | null 
required
terms_and_conditions_version
string  | null 
required
Example:
2025-01-01
Example
{
  "programs": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "Demo Program",
      "description": "This demo program is for demo purposes.",
      "eligible_device_types": [
        "BATTERY"
      ],
      "can_auto_enroll": true,
      "minimum_reserve_percentage": 20,
      "minimum_commitment_months": 12,
      "participation_months": [
        1
      ],
      "earnings_for_site_upfront": 1000,
      "earnings_for_site_yearly": 500,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "enrollment_form": [
        {
          "name": "account_id",
          "label": "Utility Account Number",
          "type": "boolean",
          "hint": "You can find it on your utility bill. [Learn more](https://example.com)"
        }
      ],
      "terms_and_conditions_version": "2025-01-01",
      "terms_and_conditions_text": "**Terms and conditions** You agree to these mock terms."
    }
  ],
  "enrollment": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "device_ids": [
      "xyz-123"
    ],
    "site_id": "abc-123",
    "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",
    "enroll_method": "AUTO_ENROLL",
    "status": "ACTIVE",
    "status_reason": "Enrollment approved by utility",
    "enrolled_at": "2019-08-24T14:15:22Z",
    "unenrolled_at": "2019-08-24T14:15:22Z",
    "program_specific_attributes": [
      {
        "name": "account_id",
        "value": "123456-0"
      }
    ],
    "has_agreed_to_terms_and_conditions": true,
    "terms_and_conditions_version": "2025-01-01"
  }
}
🟠400Invalid input
🟠409Conflict
Modified at 2024-05-21 17:43:09
Previous
Get Sites
Next
Sessions
Built with