Updates a device registration.
Endpoint | Supported methods | Full URL |
---|---|---|
/api/v1/projects/<PROJECT_ID>/mpinids/{mpinId} | PUT | api.mpin.io/api/v1/projects/<PROJECT_ID>/mpinids/{mpinId} |
# Endpoint Authentication
- Basic - The client ID and secret are used as a username:password pair for the HTTP Basic authentication of the request.
# Parameters
Name | Type | Required | Description |
---|---|---|---|
deviceName | Body | True | A human-readable name for the device registration. It is used in the MIRACL Trust PIN Pad and can be used in a Client-Hosted PIN Pad implementation. |
labels | Body | False | List of labels attached to the device. It can be used in a Client-Hosted PIN Pad implementation. |
# Request Example
curl \
--request PUT \
--user "${YOUR_CLIENT_ID}:${YOUR_CLIENT_SECRET}" \
--data '{
"deviceName":"'"${NEW_DEVICE_NAME}"'",
"labels": ["'"${LABEL_A}"'", "'"${LABEL_B}"'"]}'
}' \
"https://api.mpin.io/api/v1/projects/${YOUR_PROJECT_ID}/mpinids/${MPIN_ID}"
# Response Example
{
"mpinId": "c324f5e55e377de0343f37019ad5b77b8b01bdfee40014a54d76fd934e36a792",
"userId": "test@example.com",
"deviceName": "<NEW_DEVICE_NAME>",
"labels": ["<LABEL_A>", "<LABEL_B>"],
"ip": "87.227.194.151",
"country": "UK",
"dvs": false,
"createdAt": "2023-05-17T13:07:24.59692Z",
"updatedAt": "2023-05-17T13:07:24.597557Z",
"revoked": false
}
# Errors
# INVALID_REQUEST_PARAMETERS
Missing or invalid parameters from the request. You can see the affected
parameter(s) in the context
of the error. For information about the possible
parameters, see the Parameters section above.
{
"error": "INVALID_REQUEST_PARAMETERS",
"info": "Missing or invalid parameters from the request.",
"context": {
"params": "deviceName"
}
}
# INVALID_REQUEST_PAYLOAD
Request payload doesn’t match the schema. For information about the possible parameters, see the Parameters section above.
{
"error": "INVALID_REQUEST_PAYLOAD",
"info": "Request payload doesn't match schema."
}
# INVALID_REQUEST_BODY
The request payload needs to be a valid JSON.
{
"error": "INVALID_REQUEST_BODY",
"info": "The request payload is invalid JSON."
}