Set up a device for a product
Assigns a device to a product at a trading, enrolling the trading if needed.
Every check runs before any change, so a refused request changes
nothing and a repeat is safe. Next, set the device's parameters
with
PUT /integration/v1/devices/{id}/applications/{application_id}/parameters
and issue an activation code.
integrationKeyAuthorizationBearer <token>Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>.
Narya issues it.
id*stringuuidproduct_code*string^[a-z][a-z0-9_]{0,63}$application/json- body
Name the trading by trading_id or trading_external_ref, and the acquirer
by acquirer_id or acquirer_external_ref: one of each is required, and
sending both of a pair is a 400 with invalid_params[].code exclusive.
trading_id?stringuuidtrading_external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128vendor_id?stringRequired only when the product has more than one vendor.
uuidacquirer_id?stringuuidacquirer_external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128The device is set up; each step says whether this request did it
application/json- response
The result of each step: enrollment enrolls the trading in the product,
and assignment assigns the device to that enrollment. existing means the
step was already done.
enrollment*assignment*curl -X PUT 'https://api-narya-staging.pmadvisors.my/integration/v1/devices/497f6eca-6276-4993-bfeb-53cbbbba6f08/products/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "enrollment": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "outcome": "created" }, "assignment": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "outcome": "created" }}