POST
/
v2
/
{plasticId}
curl --request POST \
  --url https://integration-api-cat1./%7B{environment}%7D.ext.%7B{realm}%7D.cia.enfuce.com/pin/v2/{plasticId} \
  --header 'Content-Type: application/json' \
  --data '{
  "zpkIndex": "0",
  "pinBlock": "0123456789ABCDEF"
}'
{}

Example

// PIN 1234 in ISO format 1
var pinBlock = "141234AAAAAAAAAA";
// pre-shared zpk
var zpk = Hex.decode("00112233445566778899AABBCCDDEEFF0011223344556677");
// encrypt pinBlock with zpk
var des = Cipher.getInstance("DESede/ECB/NoPadding");
des.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(zpk, "DESede"));
var encryptedPinBlock = Hex.toHexString(des.doFinal(Hex.decode(pinBlock)));
// make request
pinApiClient.post()
        .uri("/pin/v2/{plasticId}?auditUser={user}", 123456, "test")
        .bodyValue(Map.of(
                "zpkIndex", "0",
                "pinBlock", encryptedPinBlock
        ))
        .retrieve()
        .bodyToMono(Object.class)
        .block();

Path Parameters

plasticId
string
required

The plastic id for given card

Query Parameters

auditUser
string
required

The audit user to log the request

Body

application/json
The related PIN control request data

The body is of type object.

Response

200
application/json
PIN set successfully

The response is of type object.