Commission Site And Devices
Cloud Mock
Cloud Mock
POST
/v1/commission
commission
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
first_name
string | null
optional
last_name
string | null
optional
email
string <email> | null
optional
state_code
string | null
State
>= 2 characters<= 2 characters
city
string | null
City
zip_code
string | null
Zip Code
Examples:
888008880188802
street_address
string | null
Street Address
street_address2
string | null
Street Address2
service_account_id
string | null
Service Account Id
devices
array [object {8}]
required
id
string
Id
manufacturer_name
string
Manufacturer Name
product_name
string
Product Name
serial_number
string
Serial Number
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> | null
optional
can_auto_enroll
boolean
Is Opt Out
Example
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 ''
Responses
🟢200OK
application/json
Body
programs
array[object (Program) {14}]
Programs
id
string <uuid>
Id
name
string
Name
description
string
required
eligible_device_types
array[string]
Eligible Device Types
Allowed values:
BATTERYEV_CHARGER
can_auto_enroll
boolean
required
minimum_commitment_months
integer | null
required
participation_months
array[integer]
required
earnings_for_site_upfront
integer
required
earnings_for_site_yearly
integer
required
created_at
string <date-time>
Created At
updated_at
string <date-time>
Updated At
enrollment_form
array [object {3}]
required
terms_and_conditions_version
string | null
required
terms_and_conditions_text
string | null
required
enrollment
object (Enrollment)
read-onlyoptional
id
string <uuid>
Id
device_ids
array[string]
required
site_id
string
required
program_id
string <uuid>
Program Id
enroll_method
enum<string>
required
Allowed values:
AUTO_ENROLLUSER_ACTION
status
enum<string>
required
Allowed values:
ACTIVENEEDS_ACTIONPENDINGREJECTEDUNENROLLED
status_reason
string | null
read-onlyrequired
enrolled_at
string <date-time> | null
Enrolled At
unenrolled_at
string <date-time> | null
Unenrolled At
program_specific_attributes
array [object {2}]
required
has_agreed_to_terms_and_conditions
boolean | null
required
terms_and_conditions_version
string | null
required
Example
{
"programs": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"eligible_device_types": [
"BATTERY"
],
"can_auto_enroll": true,
"minimum_commitment_months": 0,
"participation_months": [
0
],
"earnings_for_site_upfront": 0,
"earnings_for_site_yearly": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"enrollment_form": [
{
"name": "string",
"label": "string",
"type": "boolean"
}
],
"terms_and_conditions_version": "string",
"terms_and_conditions_text": "string"
}
],
"enrollment": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"device_ids": [
"string"
],
"site_id": "string",
"program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",
"enroll_method": "AUTO_ENROLL",
"status": "ACTIVE",
"status_reason": "string",
"enrolled_at": "2019-08-24T14:15:22Z",
"unenrolled_at": "2019-08-24T14:15:22Z",
"program_specific_attributes": [
{
"name": "string",
"value": "string"
}
],
"has_agreed_to_terms_and_conditions": true,
"terms_and_conditions_version": "string"
}
}
🟠400Invalid input
🟠409Conflict
Modified at 2024-05-21 17:43:09