Quickstart
Before you start
nik_<prefix>_<secret>.List the devices your key can reach. Send the key as a bearer token on every request.
curl 'https://api-narya-staging.pmadvisors.my/integration/v1/devices?page=1&limit=20' \
-H 'Authorization: Bearer nik_<prefix>_<secret>'A 200 response returns the devices in data, with page, limit, total_count and has_more.
Create a company. This needs a key for your whole organisation. With a key limited to a business unit, create the company under an enterprise: send enterprise_id or enterprise_external_ref. Set external_ref to your own identifier for it. Send an Idempotency-Key so that a retry returns the first response instead of creating a second company.
curl -X POST https://api-narya-staging.pmadvisors.my/integration/v1/companies \
-H 'Authorization: Bearer nik_<prefix>_<secret>' \
-H 'Idempotency-Key: 0192f6c4-8a20-7d31-b4c5-d6e7f8a9b0c1' \
-H 'Content-Type: application/json' \
-d '{"name": "Kedai Ali Sdn Bhd", "external_ref": "HQ-C-1001"}'A 201 response returns the company with its Narya id.
Find it by your reference.
curl 'https://api-narya-staging.pmadvisors.my/integration/v1/companies?external_ref=HQ-C-1001' \
-H 'Authorization: Bearer nik_<prefix>_<secret>'Next, read Merchants and devices for how merchants, enrollments and devices fit together, and Device lifecycle for what each device status means.