Subscriptions API
Management
Creating a subscription
Register partner webhookUrl to HanChuESS under specified event types.
Partner client id
H03Z****SY37The HTTPS URL that subscription payloads shouldbe sent to
https://partner.tech/api/callbackList of events which subscribe to, default ["*"]
["inverter:data:telemetry","hanchuess:subscription:test"]A cryptographically secure secret, generated and provided by your platform
JSrruXM******yrWaTzThe version of the webhooks, HanChuESS will set in http header by key X-Api-Version when invoke
1.0.0List of device identifiers which subscribe to
["H01****G1H","H02****D6C"]Operation was successful
Bad Request
Unauthorized
Device Does Not Exist
Internal error
POST /portal/v1/oem/subscribe HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 225
{
"oem": "H03Z****SY37",
"webhookUrl": "https://partner.tech/api/callback",
"events": [
"inverter:data:telemetry",
"hanchuess:subscription:test"
],
"secret": "JSrruXM******yrWaTz",
"version": "1.0.0",
"devices": [
"H01****G1H",
"H02****D6C"
]
}{
"errno": "text",
"msg": "text",
"data": {
"oem": "H03Z****SY37",
"subscriptionId": "72PX****j6j",
"webhookUrl": "https://partner.tech/api/callback",
"events": [
"inverter:data:telemetry",
"hanchuess:subscription:test"
],
"version": "1.0.0",
"status": "inactive",
"lastSuccessfulMessage": "2025-03-01T12:08:59Z",
"createAt": "2025-03-01T11:25:02Z",
"devices": [
"H01****G1H",
"H02****D6C"
]
}
}List current subscriptions
Get your subscription list.
Partner client id
H03Z****SY37Operation was successful
Bad Request
Unauthorized
Partner Does Not Exist
Internal error
POST /portal/v1/oem/subscriptions HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 22
{
"oem": "H03Z****SY37"
}{
"devices": [
{
"errno": "text",
"msg": "text",
"data": {
"oem": "H03Z****SY37",
"subscriptionId": "72PX****j6j",
"webhookUrl": "https://partner.tech/api/callback",
"events": [
"inverter:data:telemetry",
"hanchuess:subscription:test"
],
"version": "1.0.0",
"status": "inactive",
"lastSuccessfulMessage": "2025-03-01T12:08:59Z",
"createAt": "2025-03-01T11:25:02Z",
"devices": [
"H01****G1H",
"H02****D6C"
]
}
}
]
}Update subscription
Modify your subscriptions.
Partner client id
H03Z****SY37Subscribe id
RD*****ZrWOThe HTTPS URL that subscription payloads shouldbe sent to
https://partner.tech/api/callbackList of events which subscribe to, default ["*"]
["inverter:data:telemetry","hanchuess:subscription:test"]A cryptographically secure secret, generated and provided by your platform
JSrruXM******yrWaTzThe version of the webhooks, HanChuESS will set in http header by key X-Api-Version when invoke
1.0.0List of device identifiers which subscribe to
["H01****G1H","H02****D6C"]Operation was successful
Bad Request
Unauthorized
Subscription Does Not Exist
Internal error
POST /portal/v1/oem/resubscribe HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 256
{
"oem": "H03Z****SY37",
"subscriptionId": "RD*****ZrWO",
"webhookUrl": "https://partner.tech/api/callback",
"events": [
"inverter:data:telemetry",
"hanchuess:subscription:test"
],
"secret": "JSrruXM******yrWaTz",
"version": "1.0.0",
"devices": [
"H01****G1H",
"H02****D6C"
]
}{
"errno": "text",
"msg": "text",
"data": {
"oem": "H03Z****SY37",
"subscriptionId": "72PX****j6j",
"webhookUrl": "https://partner.tech/api/callback",
"events": [
"inverter:data:telemetry",
"hanchuess:subscription:test"
],
"version": "1.0.0",
"status": "inactive",
"lastSuccessfulMessage": "2025-03-01T12:08:59Z",
"createAt": "2025-03-01T11:25:02Z",
"devices": [
"H01****G1H",
"H02****D6C"
]
}
}Delete subscription
Unsubscribe oem webhookUrl which already registered in HanChuESS.
Partner client id
H03Z****SY37The unique identifier for the subscription
72PX****j6jOperation was successful
Bad Request
Unauthorized
Subscription Does Not Exist
Internal error
DELETE /portal/v1/oem/{oem}/unsubscribe/{subscriptionId} HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"errno": 200,
"msg": "The operation has been successful",
"data": {
"...": null
}
}Test subscription
Test your subscription and active its status when succeeded.
Partner client id
H03Z****SY37Subscribe id
72PX****6jOperation was successful
Bad Request
Unauthorized
Subscription Does Not Exist
Internal error
POST /portal/v1/oem/subscriptions/test HTTP/1.1
Host: idaas-sandbox.hanchuess.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"oem": "H03Z****SY37",
"subscriptionId": "72PX****6j"
}{
"testStatus": "SUCCEEDED",
"data": {
"code": 200,
"body": "pong"
}
}Last updated