GetID (direct integration)
Direct integration or Standalone
The GetID solution can be integrated directly without using the Checkin.com SDK.
The main differences between integrating GetID Direct and via the Checkin.com SDK are:
- Get started with the integration quicker using Direct integration as the setup time is minimal
- GetID Direct integration is only available as an embedded solution
- This gives additional flexibility on how to display the flow, but also requires you to make sure it is displayed optimally for each device type (in comparison with the Checkin.com SDK which is already optimized to drive user interaction across all device types and screen sizes)
- Checkin.com SDK offers more flexibility when it comes to out-of-the-box support for additional services and adding customized screens to your flow
- Checkin.com SDK comes with customized data sets adjusted for your requirements, whereas Direct Integration comes with a default set of data
- GetID Direct requires an authentication key or JWT for initialization
Integrating GetID (IDScan) using direct integration
1. Obtain authentication keys
There are two keys you need for authentication: API key and a SDK key, both will be handed to you by your partner or integration manager. API key is used to communicate with the API (e.g. to fetch images or application data) and SDK to generate a JWT that is needed in your GetID config.
2. Integration
For added security we recommend that you generate and include a short-lived JSON Web Token (JWT) every time you initialize the SDK. It's also possible to use your SDK key as authentication for 2.2. , but we recommend that this option is only used during your internal integration / test phase.
2.1. Generate JWT
curl -H "X-SDK-Key: [KEY]" -H "Content-Type: application/json" -X POST https://[PARTNER].getid.ee/sdk/v2/token\`
2.2. Setting up the GetID config object
const config = {
apiUrl: 'https://[PARTNER].getid.ee', // URL to your env
jwt: jwtToken, // jwt token from step 2.1. , it's also possible to use sdkKey instead of jwt
containerId: 'checkin-component', // naming the container
flowName: '[FLOW]', // flow name
locale: 'en', // pre-selected ui language
profile: // If you have pre-collected data you want to cross-reference with the collected documents
[{
value: 'Joe',
category: 'First name',
},
{
value: 'Doe',
category: 'Last name',
},
{
value: '1990-01-20',
category: 'Date of birth',
}],
metadata:
{
externalId: '123456', // if you have an internal identifier you can use externalId to easily link applications to your internal systems
},
onComplete( data ) { // actions to perform if application was successfully completed
console.log("All was good")
console.log( data.applicationId );
},
onFail( data ) {
console.log("Something failed") // actions to perform if something failed
console.log(data.code, data.message);
},
};
window.getidWebSdk.init(config);
2.3. Specify where you want to display the GetID flow
And the HTML part where you specify the <div>
where you want to display the GetID flow.
<body>
<div id='checkin-component'></div> // name used for container in 2.2.
</body>
</html>
3. Fetch results from the GetID API
The API allows you to receive the results from applications.
Request and response format
You should use a Content-Type: application/json header with all requests. Responses return JSON with a consistent structure.
Authentication
The GetID API uses token-based authentication. API tokens must be included in the header of all requests made to the API.
curl --location 'https://[PARTNER].getid.ee/api/v1/application/{ApplicationID} \
--header 'X-API-Key: {YourAPIKey}' \
--header 'Content-Type: application/json' \
--data ''
{
"id": "645cae276a9ba02a2daa09ff",
"application": {
"fields": [],
"documents": [
{
"issuingCountry": "unknown",
"documentType": "unknown",
"files": [
{
"id": "645cae2c6a9ba02a2daa1021",
"kind": "front",
"mediaType": "image/jpeg",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/17f70.....jpeg?t=168....442"
},
{
"id": "645cae2c6a9ba02a2daa1022",
"kind": "back",
"mediaType": "image/jpeg",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/fb133......jpeg?t=1683796112029&s=4fb...b247"
}
]
}
],
"selfie": {
"files": []
}
},
"processingState": "done",
"verificationTypes": [
"data-extraction"
],
"metadata": {
"platform": "web",
"sdkVersion": "v7.1.0",
"labels": {
"detectionModel": "https://cdn.getid.cloud/gecko/doc-detector/v15_4_10/uint8/model.json"
},
"ipAddress": "85.253.24.175",
"country": "SWE",
"city": "Stockholm",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"savedRequestId": "0092b2d23215236b9e1c876efabadb8ab9b67eb8ebc29edf0ed27e1cadc2c3ed",
"createdAt": "2023-05-11T08:58:15.605Z",
"serverVersion": "v1.4.0",
"livenessSchemaVersion": "0.5",
"locale": "en",
"flowName": "[FLOW]"
},
"additionalFiles": [],
"overallResult": {
"status": "approved",
"comments": [
{
"service": "doc-check",
"status": "approved",
"comment": "No issues found."
}
],
"concerns": [],
"validationDate": "2023-05-11T08:58:19.562Z"
},
"servicesResults": {
"docCheck": {
"serviceType": "doc-check",
"verifier": "Doc-checker",
"comment": "No issues found.",
"processingState": "done",
"status": "approved",
"extracted": {
"ocr": [
{
"category": "Document number",
"content": "SPECI2021",
"contentType": "string"
},
{
"category": "Date of expiry",
"content": "2031-08-02",
"contentType": "date"
}
],
"mrz": [
{
"category": "Issue country",
"content": "NLD",
"contentType": "country",
"valid": true
},
{
"category": "Document number",
"content": "SPECI2021",
"contentType": "string",
"valid": true
}
],
"nfc": [],
"images": [
{
"kind": "front",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/d73c......jpeg?t=1683796112030&s=659....b53"
},
{
"kind": "back",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/d2132.....jpeg?t=1683796112030&s=3d33...4ed"
},
{
"kind": "barcode",
"uri": "https:/[PARTNER].getid.ee/files/proxy/images/3dcb.....jpeg?t=1683796112030&s=a6a02...2c4"
},
{
"kind": "portrait",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/c9d2....jpeg?t=1683796112031&s=70da61...1a8"
},
{
"kind": "signature",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/e000....jpeg?t=1683796112031&s=e2359d...627"
},
{
"kind": "ghost-portrait",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/84ae....jpeg?t=1683796112031&s=25f472...f55"
},
{
"kind": "mrz",
"uri": "https://[PARTNER].getid.ee/files/proxy/images/13f4....jpeg?t=1683796112031&s=1708b1...9f7"
}
]
},
"documentDataChecking": [
{
"equal": true,
"valid": true,
"category": "Document number",
"conflicts": [],
"message": "Value is ok",
"status": "approved",
"ocr": "SPECI2021",
"mrz": "SPECI2021",
"nfc": "",
"barcode": ""
},
{
"equal": true,
"valid": true,
"category": "Date of expiry",
"conflicts": [],
"message": "Value is ok",
"status": "approved",
"ocr": "2031-08-02",
"mrz": "2031-08-02",
"nfc": "",
"barcode": ""
}
],
"dataExtractionConsistency": {
"group": "dataExtractionConsistency",
"description": "Consistency and validity of extracted data",
"considers": [
{
"name": "documentValidation",
"type": "clear",
"status": "approved",
"description": "Data extracted from the document is consistent and valid."
}
]
},
"documentPhotoQuality": {
"group": "documentPhotoQuality",
"description": "Document photo quality",
"considers": [
{
"name": "supportedDocument",
"type": "clear",
"status": "approved",
"description": "Document is supported for check."
}
]
}
}
},
"archivePolicy": {},
"logs": [
{
"action": "application_created",
"time": "2023-05-11T08:58:15.982Z",
"user": "System",
"comment": "The application is created"
},
{
"action": "verifications_completed",
"time": "2023-05-11T08:58:19.767Z",
"user": "System",
"comment": "Verification(s) are completed"
},
{
"action": "application_processed",
"time": "2023-05-11T08:58:20.406Z",
"user": "System",
"comment": "The application is processed"
}
],
"responseCode": 200
}
Download collected documents via the API
The URL for downloading can be taken from different places in a response:
- Application->documents->files - Document pictures
- servicesResults->docCheck->extracted->images - Document pictures and Security elements
curl --location 'https://[PARTNER].getid.ee/files/proxy/images/13f4eeb0a573bf6c15cf2954c87a7f6fb7a872d279dbe249f2e1f009c712f8b0.jpeg?t=1683797273107&s=f2988897cb74c858f76c89d81cdb95268adcbdb0de935b3bb145249c1a24c878' \
--header 'x-sdk-key: {SDKKey}' \
--header 'Content-Type: application/json'
Updated 5 months ago