KKonsol Developers
API referenceDevice set-up

Set up a device for a product

PUT
/integration/v1/devices/{id}/products/{product_code}

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.

Authorization

integrationKey
headerAuthorizationBearer <token>

Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>. Konsol issues it.

Path Parameters

id*string
Formatuuid
product_code*string
Match^[a-z][a-z0-9_]{0,63}$

Request Body

application/json
  1. 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?string
Formatuuid
trading_external_ref?ExternalRef

Your 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.

Match^\S(.*\S)?$
Length1 <= length <= 128
vendor_id?string

Required only when the product has more than one vendor.

Formatuuid
acquirer_id?string
Formatuuid
acquirer_external_ref?ExternalRef

Your 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.

Match^\S(.*\S)?$
Length1 <= length <= 128

Response Body

The device is set up; each step says whether this request did it

application/json
  1. 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*
Example Request
curl -X PUT 'https://api.konsol.my/integration/v1/devices/497f6eca-6276-4993-bfeb-53cbbbba6f08/products/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "enrollment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "outcome": "created"  },  "assignment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "outcome": "created"  }}