Skip to main content
Version: 1.0.2

Complete Device Registration

Completing the Mobile device registration is done through CompleteRegisterDevice API.

  1. Invoke the CompleteRegisterDevice API with OTP, OTP_TOKEN, PublicKey, DeviceInfo details

  2. On invoking the CompleteRegisterDevice API,

    • the mobile device is successfully registrated in ledger

    • the API returns a success status with a KeyId to the Mobile device App

Once the registration is done, all other APIs are signed using the private key stored in the mobile device.

Method: POST

{{URL}}/jsonrpc

Example

Payload Parameters
ParameterDescription

method

Mandatory

String

API method that is being called to complete device registration through key service

Constant value – "KeyService.CompleteRegisterDevice"

Id

Mandatory

String

Unique ID of API request

Sample value – "1"

params

Mandatory

Object

api

Mandatory

Object

signature

Mandatory

String

Signature for request validation

Sample value – "signature"

keyId

Mandatory

String

API key used for request authentication

Sample value – "ApplicationKeyId"

credential

Mandatory

String

API credential provided by NetXD

Sample value – "Credential"

payload

Mandatory

Object

UserName

Mandatory

String

Registered username to login the device

Sample value – "admin@NetXD.com"

OtpToken

Mandatory

String

Token generated during OTP generation process

Sample value – "046efb3807bd4ba28a37934d66cf802d"

Otp

Mandatory

String

One Time Password that is used for verification

Sample value – "533842"

PublicKey

Optional

String

Public key of the device that is registered

Sample value – "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESpbiJQYGSqM69yHXMJmjWH5rmY2v\nchq8bxm5hZ6/lt+ZstgVm0HiqjU25wEtGcbIVLVJoQHilV6ikoIoqjj9Ow==\n-----END PUBLIC KEY-----"

MFP

Optional

Object

ISOcountryCode

Optional

String

Country code of the country where the device is located

Sample value – "IN"

AndroidInfo

Optional

Object

AndroidVersion

Optional

String

Android operating system version of the device

Sample value – "9"

Brand

Optional

String

Brand of the device

Sample value – "HONOR"

Device

Optional

String

Name of the device

Sample value – "HWHRY-HF"

Id

Optional

String

Unique ID of the device model

Sample value – "HONORHRY-AL00"

Imei

Optional

String

IMEI number of the device

Sample value – "866344040493624"

Incremental

Optional

String

Incremental version of the device software

Sample value – "275C675"

Manufacturer

Optional

String

Manufacturer of the device

Sample value – "HUAWEI"

Product

Optional

String

Product code of the device

Sample value – "HRY-AL00"

Area

Optional

String

Area name where the device is located

Sample value – "Perungudi"

Country

Optional

String

Country name where the device is located

Sample value – "India"

Latitude

Optional

String

Geographical latitude of the location where the device is located

Sample value – "12.9703498"

Locality

Optional

String

Locality or city where the device is located

Sample value – "Chennai"

LocatedAt

Optional

String

Full address of the location where the device is registered

Sample value – "8/60, Sai Ayush Puja Avenue, Thiruvengadam Nagar, Perungudi, Chennai, Tamil Nadu 600096, India"

Longitude

Optional

String

Geographical longitude of the location where the device is located

Sample value – "80.2458975"

Model

Optional

String

Model of the device

Sample value – "HRY-AL00"

PostalCode

Optional

String

Postal code of the location where the device is registered

Sample value – "600096"

SubLocality

Optional

String

Sub-locality within the locality or city

Sample value – "Perungudi"


curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"KeyService.CompleteRegisterDevice","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{"UserName":"admin@NetXD.com","OtpToken":"046efb3807bd4ba28a37934d66cf802d","Otp":"533842","PublicKey":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESpbiJQYGSqM69yHXMJmjWH5rmY2v\nchq8bxm5hZ6/lt+ZstgVm0HiqjU25wEtGcbIVLVJoQHilV6ikoIoqjj9Ow==\n-----END PUBLIC KEY-----","MFP":{"ISOcountryCode":"IN","AndroidInfo":{"AndroidVersion":"9","Brand":"HONOR","Device":"HWHRY-HF","Id":"HONORHRY-AL00","Imei":"866344040493624","Incremental":"275C675","Manufacturer":"HUAWEI","Product":"HRY-AL00"},"Area":"Perungudi","Country":"India","Latitude":"12.9703498","Locality":"Chennai","LocatedAt":"8/60, Sai Ayush Puja Avenue, Thiruvengadam Nagar, Perungudi, Chennai, Tamil Nadu 600096, India","Longitude":"80.2458975","Model":"HRY-AL00","PostalCode":"600096","SubLocality":"Perungudi"}}}}'

Body


{
"method": "KeyService.CompleteRegisterDevice",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {
"UserName": "admin@NetXD.com",
"OtpToken": "046efb3807bd4ba28a37934d66cf802d",
"Otp": "533842",
"PublicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESpbiJQYGSqM69yHXMJmjWH5rmY2v\nchq8bxm5hZ6/lt+ZstgVm0HiqjU25wEtGcbIVLVJoQHilV6ikoIoqjj9Ow==\n-----END PUBLIC KEY-----",
"MFP": {
"ISOcountryCode": "IN",
"AndroidInfo": {
"AndroidVersion": "9",
"Brand": "HONOR",
"Device": "HWHRY-HF",
"Id": "HONORHRY-AL00",
"Imei": "866344040493624",
"Incremental": "275C675",
"Manufacturer": "HUAWEI",
"Product": "HRY-AL00"
},
"Area": "Perungudi",
"Country": "India",
"Latitude": "12.9703498",
"Locality": "Chennai",
"LocatedAt": "8/60, Sai Ayush Puja Avenue, Thiruvengadam Nagar, Perungudi, Chennai, Tamil Nadu 600096, India",
"Longitude": "80.2458975",
"Model": "HRY-AL00",
"PostalCode": "600096",
"SubLocality": "Perungudi"
}
}
}
}

Response: 200

Response Parameters
ParameterDescription

id

String

Response ID echoed from the request ID

Sample value: "1"

result

Object

StatusString

Status of completing the device registration process

Sample value: SUCCESS

KeyIdString

Unique key ID of the device registration process

Sample value: 56978


{
"id": "1",
"result": {
"Status": "SUCCESS",
"KeyId": "{{ApplicationKeyId}}"
}
}