Get encrypted PIN
This operation returns the encrypted PIN block in ISO format 1. The PIN block is encrypted using a pre-shared\ndouble-length 3DES key.
GET
/
v2
/
{plasticId}
Get encrypted PIN
curl --request GET \
--url 'https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}' \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"pinBlock": "<string>"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Example
var pinResponse = pinApiClient.get()
.uri("/pin/v2/{plasticId}?zpkIndex={zpk}&auditUser={user}", 123456, 0, "test")
.retrieve()
.bodyToMono(PinResponse.class)
.block();
// preshared zpk
var zpk = Hex.decode("00112233445566778899AABBCCDDEEFF0011223344556677");
// decrypt pinBlock with zpk
var des = Cipher.getInstance("DESede/ECB/NoPadding");
des.init(Cipher.DECRYPT_MODE, new SecretKeySpec(zpk, "DESede"));
var decryptedPinBlock = Hex.toHexString(des.doFinal(Hex.decode(pinResponse.getPinBlock())));
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The plastic id for given card
Query Parameters
The audit user to log the request
The PIN encryption key (ZPK) index. This index is used to point out which key to use in case there are multiple keys available.
Example:
"0"
Response
Successful lookup of the card
3DES encrypted ISO format 1 PIN block in hexadecimal.
Was this page helpful?
⌘I
Get encrypted PIN
curl --request GET \
--url 'https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}' \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"pinBlock": "<string>"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
