Issue an activation code
Issues a one-time code that activates the device.
An activated device can be issued a code too, to pair it again after a reinstall, a factory reset or a hardware swap. It keeps working until the new code is used, so issuing one does not interrupt it, and a code that is never used changes nothing.
A new code replaces any earlier unused one. Narya does not keep the
code, so a retry issues a new code that replaces the first, even with
the same Idempotency-Key.
A suspended or decommissioned device is refused with 409, and the
problem's detail says which. A suspended device must be resumed in
the Narya portal first.
integrationKeyAuthorizationBearer <token>Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>.
Narya issues it.
id*stringuuidThe code was issued
application/json- response
activation_code*stringThe 8-digit code. Keep it a string; it can begin with zero.
issued_at*stringdate-timeexpires_at?|date-timesuperseded_previous*booleanTrue when an earlier unused code was replaced.
curl -X POST 'https://api-narya-staging.pmadvisors.my/integration/v1/devices/497f6eca-6276-4993-bfeb-53cbbbba6f08/activation-codes'{ "activation_code": "string", "issued_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "superseded_previous": true}