Subscriptions API

Management

Creating a subscription

post

Register partner webhookUrl to HanChuESS under specified event types.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
oemstringRequired

Partner client id

Example: H03Z****SY37
webhookUrlstringRequired

The HTTPS URL that subscription payloads shouldbe sent to

Example: https://partner.tech/api/callback
eventsstring[]Optional

List of events which subscribe to, default ["*"]

Example: ["inverter:data:telemetry","hanchuess:subscription:test"]
secretstringRequired

A cryptographically secure secret, generated and provided by your platform

Example: JSrruXM******yrWaTz
versionstringOptional

The version of the webhooks, HanChuESS will set in http header by key X-Api-Version when invoke

Example: 1.0.0
devicesstring[]Required

List of device identifiers which subscribe to

Example: ["H01****G1H","H02****D6C"]
Responses
chevron-right
200

Operation was successful

application/json
post
/v1/oem/subscribe

List current subscriptions

post

Get your subscription list.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
oemstringRequired

Partner client id

Example: H03Z****SY37
Responses
chevron-right
200

Operation was successful

application/json
post
/v1/oem/subscriptions

Update subscription

post

Modify your subscriptions.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
oemstringRequired

Partner client id

Example: H03Z****SY37
subscriptionIdstringRequired

Subscribe id

Example: RD*****ZrWO
webhookUrlstringOptional

The HTTPS URL that subscription payloads shouldbe sent to

Example: https://partner.tech/api/callback
eventsstring[]Optional

List of events which subscribe to, default ["*"]

Example: ["inverter:data:telemetry","hanchuess:subscription:test"]
secretstringOptional

A cryptographically secure secret, generated and provided by your platform

Example: JSrruXM******yrWaTz
versionstringOptional

The version of the webhooks, HanChuESS will set in http header by key X-Api-Version when invoke

Example: 1.0.0
devicesstring[]Optional

List of device identifiers which subscribe to

Example: ["H01****G1H","H02****D6C"]
Responses
chevron-right
200

Operation was successful

application/json
post
/v1/oem/resubscribe

Delete subscription

delete

Unsubscribe oem webhookUrl which already registered in HanChuESS.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
oemstringRequired

Partner client id

Example: H03Z****SY37
subscriptionIdstringRequired

The unique identifier for the subscription

Example: 72PX****j6j
Responses
chevron-right
200

Operation was successful

application/json
delete
/v1/oem/{oem}/unsubscribe/{subscriptionId}

Test subscription

post

Test your subscription and active its status when succeeded.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
oemstringRequired

Partner client id

Example: H03Z****SY37
subscriptionIdstringRequired

Subscribe id

Example: 72PX****6j
Responses
chevron-right
200

Operation was successful

application/json
post
/v1/oem/subscriptions/test

Last updated