NNarya Developers

Device lifecycle

Every device has a status. It tells you whether the terminal is in use, and what you can do with it next.

DeactivateDeactivateRegisternot_activatedwaiting for its terminalactivatedin usesuspendedpausedActivateterminal enters its codeSuspendResumeDecommissionDecommissiondecommissionedretiredFinalYou, through the APIThe terminalIn the Narya portal
Only the terminal can activate a device. Suspend, resume and deactivate are done in the Narya portal, so your integration sees these changes but cannot make them.

Statuses

not_activated

Registered, but the terminal has not entered an activation code yet. A deactivated device is also not_activated.

You can: issue an activation code, set it up for a product or release it, and decommission it once it is released from every product.

activated

The terminal entered its code and is in use.

You can: issue a new code, set it up for a product or release it, and decommission it once it is released from every product.

A new code lets you pair the device again after a reinstall, a factory reset or a hardware swap. The terminal keeps working until the new code is entered, so issuing one does not interrupt it, and a code that is never used changes nothing.

suspended

Paused in the Narya portal. The terminal comes back as it was when it is resumed.

You can: set it up for a product or release it, and decommission it once it is released from every product. You cannot issue a code until it is resumed in the Narya portal.

decommissioned (final)

Retired. It cannot connect to Narya and nothing changes its status again. To use the hardware again, register it as a new device.

You can: read it. Nothing else.

Tracking status changes

Narya does not send device events yet. Read the device to see its current status, or list devices ordered by their last change.

GET /integration/v1/devices/{id}
GET /integration/v1/devices?sort=-updated_at

The device's updated_at changes when its status changes, and when you set it up for a product or release it. activated_at is when the terminal first entered a code.

Requests

ChangeRequestNotes
RegisterPOST /integration/v1/devices or POST /integration/v1/devices/batchThe device starts as not_activated.
Issue a codePOST /integration/v1/devices/{id}/activation-codesA new code replaces any unused one. Returns 409 if the device is suspended or decommissioned; the error's detail says which. You can retry a 503, or a 409 whose detail says to retry shortly.
DecommissionPOST /integration/v1/devices/{id}/decommission409 while the device is set up for a product. Release it first with DELETE /integration/v1/devices/{id}/products/{product_code}. Repeating the call returns the device unchanged.

See the API reference for each request's body and responses.

On this page