- 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
Sessions
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
Cloud Mock
https://mock.apidog.com/m1/479670-0-default
POST
/v1/sessions
commission
If a site already exists, it is possible to only provide
site.id
in the body, otherwise the schema is as described below.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
required
id
string
Id
Example:
abc-789
first_name
string | null
optional
Example:
John
last_name
string | null
optional
Example:
Doe
company_name
string | null
optional
Example:
ABC Co.
email
string <email> | null
optional
state_code
enum<string> | enum<null>
State code
Allowed values:
AKALARAZCACOCTDEFLGAHIIAIDILINKSKYLAMAMDMEMIMNMOMSMTNCNDNENHNJNMNVNYOHOKORPAPRRISCSDTNTXUTVAVTWAWIWVWY
city
string | null
City
Example:
San Francisco
zip_code
string | null
Zip Code
Examples:
888008880188802
street_address
string | null
Street Address
Example:
123 Main St
street_address2
string | null
Street Address2
devices
array[object (DeviceCreateIn) {9}]
required
id
string
Id
Example:
xyz-123
site_id
string
required
Example:
abc-789
manufacturer_name
string
Manufacturer Name
Example:
DeviceMaker
product_name
string
Product Name
Example:
Model 1
serial_number
string
Serial Number
Example:
123456789
type
enum<string>
required
Allowed values:
BATTERYEV_CHARGER
attributes
object (DeviceBatteryAttributes)
required
type
. They are not user-adjustable and should be configured during installation / commissioning.configuration
object (DeviceBatteryConfig)
deprecated
install_date
string <date-time>
required
Example:
2022-02-22
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"
},
"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"
}
]
}
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/sessions' \
--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"
},
"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"
}
]
}'
Responses
🟢200OK
application/json
Body
token
string
required
Example:
xyz-abc
Example
{
"token": "xyz-abc"
}
🟠400Invalid input