Onboarding

Once a user has given us permission to manage the devices on their account, partner ought to invoke assets list and registration enpoint provided by Hanchu, which device(s) needed to be selected for control. We will do this via your endpoints that we've defined below.

List devices

get

This endpoint enables customers to determine which device they would like to register.

Required scopes
This endpoint requires the following scopes:
  • : all privileges
  • : all privileges
Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL:
Path parameters
orgIdstringRequired

Organization id

Example: hanchu
Responses
200

Operation was successful

application/json
get
/{orgId}/v1/devices
GET /portal/{orgId}/v1/devices HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "devices": [
    {
      "assetId": "H01X1****0032",
      "make": "HANCHU",
      "model": "HESS-HY-S-3.68K",
      "maximumImportPower": 1500,
      "maximumExportPower": 2000,
      "batteries": [
        {
          "make": "HANCHU",
          "model": "Home-ESS-LV-3.2K",
          "usableCapacity": 3200,
          "cycleLimit": 10,
          "maximumChargePower": 1500,
          "maximumDischargePower": 1500,
          "gridImportRestricted": false,
          "gridExportRestricted": false
        }
      ],
      "solarArrays": [
        {
          "maximumPower": 5000,
          "orientation": "n",
          "tilt": 15,
          "independentlyControlled": false
        }
      ]
    }
  ]
}

Register device

post

Once partner have called the register endpoint, we will configure backend to to send any telemetry data or events relating to that device, and to be able to receive any control signals.

Path parameters
orgIdstringRequired

Organization id

Example: hanchu
Body
assetIdstringRequired

Unique identifier of the device

Example: H01X1****0032
Responses
200

Operation was successful

application/json
post
/{orgId}/v1/devices
POST /portal/{orgId}/v1/devices HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "assetId": "H01X1****0032"
}
{
  "devices": [
    {
      "assetId": "H01X1****0032",
      "make": "HANCHU",
      "model": "HESS-HY-S-3.68K",
      "maximumImportPower": 1500,
      "maximumExportPower": 2000,
      "batteries": [
        {
          "make": "HANCHU",
          "model": "Home-ESS-LV-3.2K",
          "usableCapacity": 3200,
          "cycleLimit": 10,
          "maximumChargePower": 1500,
          "maximumDischargePower": 1500,
          "gridImportRestricted": false,
          "gridExportRestricted": false
        }
      ],
      "solarArrays": [
        {
          "maximumPower": 5000,
          "orientation": "n",
          "tilt": 15,
          "independentlyControlled": false
        }
      ]
    }
  ]
}

Last updated