Skip to main content
POST
/
devices
Create a device
curl --request POST \
  --url https://api.flatpeak.com/devices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reference_id": "DEV1234567890",
  "type": "BATTERY_SYSTEM",
  "locations": [
    "loc_641b90b758fb8e6293716e40"
  ],
  "manufacturer": "Nova Systems",
  "model_code": "PICOXN2",
  "model_name": "Pico Ultimate",
  "properties": {
    "power_rating_import_kwh": 14.2,
    "capacity_kwh": 123,
    "power_rating_export_kwh": 7,
    "pv_azimuth": 0,
    "pv_tilt": 23,
    "pv_terrain_shading": false,
    "pv_forecasts_enabled": false,
    "install_date": "2022-03-22T11:12:21Z"
  }
}
'
{
  "id": "dev_63a6087272941ef077a8fd3e",
  "object": "device",
  "live_mode": true,
  "reference_id": "DEV1234567890",
  "locations": [
    "loc_641b90b758fb8e6293716e40"
  ],
  "manufacturer": "Nova Systems",
  "model_code": "PICOXN2",
  "model_name": "Pico Ultimate",
  "time_created": "2022-01-24T14:15:22Z",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "properties": {
    "power_rating_import_kwh": 14.2,
    "capacity_kwh": 123,
    "power_rating_export_kwh": 7,
    "pv_azimuth": 0,
    "pv_tilt": 23,
    "pv_terrain_shading": false,
    "pv_forecasts_enabled": false,
    "install_date": "2022-03-22T11:12:21Z"
  },
  "last_seen": "2022-03-22T11:12:21Z"
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Body

application/json

Creates a device

reference_id
string
required

A reference that is meaningful to you, for example, an ID from your system.

Example:

"DEV1234567890"

type
string
required

Type of system you are connecting. Supported values: EV_CHARGER, ELECTRIC_VEHICLE, BATTERY_SYSTEM, PV_SYSTEM, OTHER

Example:

"BATTERY_SYSTEM"

locations
string[]
required

Flatpeak Location IDs where this device may be located.

manufacturer
string

Name of device or system manufacturer.

Example:

"Nova Systems"

model_code
string

Model code as declared by the manufacturer

Example:

"PICOXN2"

model_name
string

Model name as declared by the manufacturer

Example:

"Pico Ultimate"

properties
DeviceProperties · object

Response

This object represents a device or another asset of a compatible type.

id
string
required

Flatpeak unique object id.

Example:

"dev_63a6087272941ef077a8fd3e"

object
string
required

Represents the object’s type.

Example:

"device"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

reference_id
string
required

A reference that is meaningful to you, for example, an ID from your system.

Example:

"DEV1234567890"

locations
string[]
required

Flatpeak Location IDs where this device may be located.

manufacturer
string
required

Name of device manufacturer.

Example:

"Nova Systems"

model_code
string
required

Device model code, as declared by the manufacturer.

Example:

"PICOXN2"

model_name
string
required

Model name, as declared by the manufacturer.

Example:

"Pico Ultimate"

time_created
string
required

Time when the object was created, in UTC.

Example:

"2022-01-24T14:15:22Z"

account_id
string
required

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

properties
DeviceProperties · object
last_seen
string<date-time>

Timestamp of when the device has last queried the service.

Example:

"2022-03-22T11:12:21Z"