Skip to content

Warranty

Activate and look up warranties.

Every call needs the project’s API key in x-header-apikey. See Authentication. Errors use the codes in Error codes.

Record that something is now under warranty

Section titled “Record that something is now under warranty”
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/activate

Idempotent. Activating the same token twice returns the first activation with alreadyActivated: true rather than failing — a retry after a timeout must not become a second warranty or an error your user sees. The first activation keeps the record: a later call cannot reassign its user or change its term.

Body

Field Type Required Description
typeActive serial \ mac Yes
activationId string Yes The token itself — the serial, or the MAC. Unique per partner: activating the same one twice returns the first activation rather than creating a second.
userId string Yes The end user, as you identify them. Stored as given and never changed afterwards, so it stays the person who activated even if the device later changes hands.
typeDevice smart \ nonsmart Yes
activatedAt string No ISO-8601. Defaults to now.
expiredAt string No ISO-8601, when your own system already resolved the end of the term. Send this or durationMonths, never both. Sending neither records a warranty whose length is not yet known.
durationMonths number No Whole months from the activation, when we are the ones who must work it out.
source app-add-device \ app-qr \ import \
productId string No
batchId string No
factoryId string No
externalRef object No Whatever your own system answered, kept verbatim so a disagreement later can be traced to what it actually said.
meta object No Anything specific to you — for a consumable, which unit it went into.
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/activate" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"typeActive":"serial","activationId":"string","userId":"string","typeDevice":"smart","activatedAt":"2026-10-14T03:00:00.000Z","expiredAt":"2028-10-14T03:00:00.000Z","durationMonths":0,"source":"app-add-device","productId":"string","batchId":"string","factoryId":"string","externalRef":{},"meta":{}}'
Status Meaning
201 Recorded, or already recorded — both answer 201. alreadyActivated is what tells them apart, not the status code.
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty

With userId, the warranties of that customer, newest first — this is what a warranty screen asks for. Without it, an operations listing for one month.

Parameter In Type Required Description
userId query string Yes
status query string Yes
month query string Yes
productId query string Yes
limit query string Yes
cursor query string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
GET https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/{typeActive}/{activationId}

Nothing found means nothing was activated under this token. It does not mean the token is counterfeit — only whoever holds the inventory can answer that.

Parameter In Type Required Description
typeActive path string Yes
activationId path string Yes
Terminal window
curl -X GET "https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/<typeActive>/<activationId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
200
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/{typeActive}/{activationId}/revoke

Marks it no longer honoured and keeps the original term, because the term is history.

Parameter In Type Required Description
typeActive path string Yes
activationId path string Yes

Body

Field Type Required Description
reason string Yes Why. Required, because a revoked warranty is something a customer may ask about months later and “no reason recorded” is not an answer.
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/warranty/<typeActive>/<activationId>/revoke" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"reason":"string"}'
Status Meaning
201