{"info":{"_postman_id":"a47cb292-99c0-4af6-9ecc-543127f5ea39","name":"Roommatik KYC API","description":"<html><head></head><body><h1 id=\"roommatik-kyc-api-identity-document-verification\">Roommatik KYC API - Identity Document Verification</h1>\n<p>This collection allows you to verify identity documents (ID cards, passports, residence permits) by sending document images to the Roommatik KYC API.</p>\n<h2 id=\"getting-started\">Getting Started</h2>\n<ol>\n<li><p><strong>Set your credentials</strong> in the collection variables:</p>\n<ul>\n<li><code>apiUrl</code>: Your KYC API base URL (e.g. <code>https://kyc.roommatik.com</code>)</li>\n<li><code>apiKey</code>: Your API key provided by Roommatik</li>\n<li><code>accountName</code>: Your account name</li>\n</ul>\n</li>\n<li><p><strong>Prepare your document image</strong>: Convert your document image to Base64 format (without the <code>data:image/...;base64,</code> prefix). You can use online tools or the following command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>base64 -i document.png\n</code></pre></li>\n<li><p><strong>Send a request</strong>: Use the \"Verify Document - Front Side\" request to verify a document. For two-sided documents (ID cards, residence permits), send a second request with the back side using \"Verify Document - Back Side\".</p>\n</li>\n</ol>\n<h2 id=\"document-types\">Document Types</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Document</th>\n<th>Sides</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Identity Card (DNI)</td>\n<td>2 (front + back)</td>\n<td>Send two separate requests</td>\n</tr>\n<tr>\n<td>Passport</td>\n<td>1 (data page)</td>\n<td>Send one request</td>\n</tr>\n<tr>\n<td>Residence Permit</td>\n<td>2 (front + back)</td>\n<td>Send two separate requests</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"authentication\">Authentication</h2>\n<p>All requests require the <code>X-Api-Key</code> header with your API key. Optionally, include <code>X-Account-Name</code> with your account name.</p>\n<h2 id=\"response-codes\">Response Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Data extracted successfully</td>\n</tr>\n<tr>\n<td>204</td>\n<td>No data could be extracted (low quality or unrecognized document)</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad request (invalid parameters)</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized (invalid or missing API key)</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden (account blocked, license expired, IP not whitelisted, or rate limit exceeded)</td>\n</tr>\n<tr>\n<td>429</td>\n<td>Too many requests (rate limit exceeded)</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal server error</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"rate-limits\">Rate Limits</h2>\n<p>Rate limits are configured per account (per minute and per day). Contact your Roommatik account manager for details on your limits.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Roommatik KYC API - Identity Document Verification","slug":"roommatik-kyc-api-identity-document-verification"}],"owner":"14975409","collectionId":"a47cb292-99c0-4af6-9ecc-543127f5ea39","publishedId":"2sBXijJBVF","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-03-21T09:55:04.000Z"},"item":[{"name":"Document Verification","item":[{"name":"Verify Document - OCR Only (fastest)","id":"6c8ff03e-bdac-44ce-a303-232ff5d7bb04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","description":"<p>Request content type</p>\n","value":"application/json"},{"key":"X-Api-Key","description":"<p>API key for authentication (required)</p>\n","value":""},{"key":"X-Account-Name","description":"<p>Account name (optional, improves routing)</p>\n","value":""}],"body":{"mode":"raw","raw":"{\"image\": \"\", \"returnType\": [\"Data\"], \"isMappingApplied\": true}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---ocr-only-fastest\">Verify Document - OCR Only (fastest)</h2>\n<p>Extract text data from a document image. This is the <strong>fastest and lightest</strong> configuration: it only returns extracted text fields without facial photo or signature images.</p>\n<h3 id=\"request-body-fields\">Request Body Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>image</code></td>\n<td>string</td>\n<td>—</td>\n<td><strong>Required.</strong> Base64 encoded image without the <code>data:image/...;base64,</code> prefix.</td>\n</tr>\n<tr>\n<td><code>returnType</code></td>\n<td>string[]</td>\n<td><code>[\"Data\"]</code></td>\n<td>What to return. <code>\"Data\"</code> = text fields, <code>\"Face\"</code> = facial photo, <code>\"Signature\"</code> = signature image.</td>\n</tr>\n<tr>\n<td><code>isMappingApplied</code></td>\n<td>boolean</td>\n<td><code>false</code></td>\n<td>When <code>true</code>, normalizes raw OCR field names (e.g. <code>MRZ_DocumentNumber</code> → <code>documentNumber</code>). <strong>Strongly recommended.</strong></td>\n</tr>\n<tr>\n<td><code>detect_orientation</code></td>\n<td>boolean</td>\n<td><code>false</code></td>\n<td>Auto-detect and correct document orientation.</td>\n</tr>\n<tr>\n<td><code>debug</code></td>\n<td>boolean</td>\n<td><code>false</code></td>\n<td>Include <code>MappingDebug</code> details in the response.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"performance-note\">Performance Note</h3>\n<p><code>returnType: [\"Data\"]</code> is the fastest option. The API skips face and signature extraction, returning a smaller response with only text fields.</p>\n<p>To also get the facial photo, use <code>returnType: [\"Data\", \"Face\"]</code> (see the \"With Face Embedding\" request).</p>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[{"id":"b7ab88a2-5c11-491b-8978-fd345425a3d0","name":"200 - Successful extraction (Spanish ID Card front)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""},{"key":"X-Account-Name","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<base64-encoded-image>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"Surname\": \"ESPAÑOLA ESPAÑOLA\",\n        \"ExpirationDate\": \"02 06 2031\",\n        \"Sex\": \"F\",\n        \"Name\": \"CARMEN\",\n        \"FullName\": \"CARMEN ESPAÑOLA ESPAÑOLA\",\n        \"DateOfBirth\": \"01/01/1980\",\n        \"Front Doc No.\": \"99999999R\",\n        \"DocumentNumber\": \"99999999R\",\n        \"DaysUntilExpiration\": \"1900\",\n        \"Age\": \"46\",\n        \"DateOfIssue\": \"02/06/2021\",\n        \"PhysicalCardNumber\": \"CAA000000\",\n        \"DocumentIdentification\": \"Spain - Id Card (2021)\",\n        \"DateOfExpiry\": \"02/06/2031\",\n        \"DocumentType\": \"D\",\n        \"DocumentSide\": \"Front\"\n    },\n    \"responseTime\": 291,\n    \"faceMatchAccuracy\": null,\n    \"face\": \"\",\n    \"signature\": \"\",\n    \"description\": \"Spain - Id Card (2021) #2\",\n    \"faceVector\": \"\"\n}"},{"id":"c7d8e45c-f242-4d01-b99d-446de8224a79","name":"204 - No data extracted","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<low-quality-or-non-document-image>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"No Content","code":204,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""},{"id":"0c0efa9a-679a-4674-ab8f-c9a3289661db","name":"401 - Unauthorized (invalid API key)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":"invalid-key"}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<base64>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unauthorized. Invalid or missing API key.\"\n}"},{"id":"4caf85bb-62e9-43d1-a9aa-d860a71b3549","name":"403 - License expired","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<base64>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"License Expired. Please contact your administrator to renew your license.\"\n}"},{"id":"eb767f95-3de6-484d-93e3-1c417d04c88f","name":"429 - Rate limit exceeded","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<base64>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"Too Many Requests","code":429,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Rate limit exceeded. Please wait for the next window.\"\n}"}],"_postman_id":"6c8ff03e-bdac-44ce-a303-232ff5d7bb04"},{"name":"Verify Document - Back Side","id":"d32eeeaf-98a8-49be-a84d-74aaa3923609","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","description":"<p>Request content type</p>\n"},{"key":"X-Api-Key","value":"","description":"<p>API key for authentication (required)</p>\n"},{"key":"X-Account-Name","value":"","description":"<p>Account name (optional, improves routing)</p>\n"}],"body":{"mode":"raw","raw":"{\n    \"image\": \"\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---back-side\">Verify Document - Back Side</h2>\n<p>Send the <strong>back side</strong> of a two-sided identity document for data extraction.</p>\n<h3 id=\"when-to-use-this\">When to use this</h3>\n<p>Use this request after verifying the front side for:</p>\n<ul>\n<li><strong>Identity Cards (DNI)</strong>: back side contains the MRZ and additional data</li>\n<li><strong>Residence Permits</strong>: back side contains additional fields</li>\n</ul>\n<p><strong>Not needed for passports</strong> (single-sided).</p>\n<h3 id=\"merging-front--back-data\">Merging Front + Back Data</h3>\n<p>After receiving both responses, merge the <code>data</code> objects:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const fullData = { ...frontResponse.data, ...backResponse.data };\n</code></pre>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[{"id":"125518ca-2f40-4eac-a164-b7c0e57c7481","name":"200 - Successful back side extraction","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"<base64-encoded-back-image>\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}"},"url":"https://kyc.roommatik.com/api/kyc"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"MRZ\": \"IDESP99999999R<<<<<<<<<<<<<<<\\n8001010F3106024ESP<<<<<<<<<<<8\\nESPANOLA<ESPANOLA<<CARMEN<<<<<\",\n        \"DocumentNumber\": \"99999999R\",\n        \"DateOfBirth\": \"01/01/1980\",\n        \"DateOfExpiry\": \"02/06/2031\",\n        \"Sex\": \"F\",\n        \"Nationality\": \"ESP\",\n        \"DocumentSide\": \"Back\",\n        \"DocumentIdentification\": \"Spain - Id Card (2021)\",\n        \"DocumentType\": \"D\"\n    },\n    \"responseTime\": 185,\n    \"faceMatchAccuracy\": null,\n    \"face\": \"\",\n    \"signature\": \"\",\n    \"description\": \"Spain - Id Card (2021) #2\",\n    \"faceVector\": \"\"\n}"}],"_postman_id":"d32eeeaf-98a8-49be-a84d-74aaa3923609"},{"name":"Verify Document - With Face & Signature","id":"93424a24-fe96-3b58-0b5a-61e013467ec3","request":{"method":"POST","header":[{"key":"Content-Type","description":"<p>Request content type</p>\n","value":"application/json"},{"key":"X-Api-Key","description":"<p>API key for authentication (required)</p>\n","value":""},{"key":"X-Account-Name","description":"<p>Account name (optional, improves routing)</p>\n","value":""}],"body":{"mode":"raw","raw":"{\"image\": \"\", \"returnType\": [\"Data\", \"Face\", \"Signature\"], \"isMappingApplied\": true}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---with-face--signature\">Verify Document - With Face &amp; Signature</h2>\n<p>Extract text data <strong>plus</strong> the cropped facial photograph and signature image from the document.</p>\n<h3 id=\"when-to-use\">When to use</h3>\n<p>Use this when you need the document photo (e.g. to display to the user, for visual verification, or as a prerequisite for face embedding). This is slightly slower than OCR-only because the API also extracts and crops the face and signature regions.</p>\n<h3 id=\"response\">Response</h3>\n<p>Same as OCR-only, but with:</p>\n<ul>\n<li><code>face</code>: Base64-encoded cropped facial photograph</li>\n<li><code>signature</code>: Base64-encoded cropped signature image</li>\n</ul>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"93424a24-fe96-3b58-0b5a-61e013467ec3"},{"name":"Verify Document - With Face Embedding","id":"e60e4409-cdda-54eb-f181-857bd45feb5f","request":{"method":"POST","header":[{"key":"Content-Type","description":"<p>Request content type</p>\n","value":"application/json"},{"key":"X-Api-Key","description":"<p>API key for authentication (required)</p>\n","value":""},{"key":"X-Account-Name","description":"<p>Account name (optional, improves routing)</p>\n","value":""}],"body":{"mode":"raw","raw":"{\"image\": \"\", \"returnType\": [\"Data\", \"Face\"], \"isMappingApplied\": true, \"face_vector\": true}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---with-face-embedding\">Verify Document - With Face Embedding</h2>\n<p>Extract text data and compute a <strong>512-dimensional face embedding vector</strong> from the document photo. This vector can be used for biometric face matching (e.g. comparing the document photo against a live selfie).</p>\n<h3 id=\"important\">Important</h3>\n<p><code>returnType</code> <strong>must</strong> include <code>\"Face\"</code>. Without it, the API does not extract the facial photograph and <code>FaceVector</code> will always be <code>null</code>.</p>\n<h3 id=\"additional-request-fields\">Additional Request Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>face_vector</code></td>\n<td>boolean</td>\n<td>Set to <code>true</code> to compute the face embedding.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response</h3>\n<p>Same as standard verification, plus:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>FaceVector</code></td>\n<td>number[]</td>\n<td>Array of 512 float values (ArcFace embedding, L2-normalized). <code>null</code> if no face detected.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"comparing-vectors\">Comparing Vectors</h3>\n<p>Use <strong>cosine similarity</strong> to compare two face vectors. A score above <strong>0.5</strong> generally indicates the same person:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">function cosineSimilarity(a, b) {\n  let dot = 0, normA = 0, normB = 0;\n  for (let i = 0; i &lt; a.length; i++) {\n    dot += a[i] * b[i];\n    normA += a[i] * a[i];\n    normB += b[i] * b[i];\n  }\n  return dot / (Math.sqrt(normA) * Math.sqrt(normB));\n}\n</code></pre>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e60e4409-cdda-54eb-f181-857bd45feb5f"},{"name":"Verify Document - Multipart Upload","id":"4606e425-e7a8-a210-42cf-9b281daa4a70","request":{"method":"POST","header":[{"description":"<p>API key for authentication (required)</p>\n","value":"","key":"X-Api-Key"},{"description":"<p>Account name (optional, improves routing)</p>\n","value":"","key":"X-Account-Name"}],"body":{"mode":"formdata","formdata":[{"description":"<p>Document image file (JPEG, PNG)</p>\n","key":"file","value":"","type":"file"},{"description":"<p>Comma-separated return types: Data, Face, Signature</p>\n","key":"returntype","value":"Data","type":"text"},{"description":"<p>Normalize field names</p>\n","key":"IsMappingApplied","value":"true","type":"text"},{"description":"<p>Set to true to compute face embedding (requires Face in returntype)</p>\n","key":"face_vector","value":"false","type":"text"}]},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---multipart-file-upload\">Verify Document - Multipart File Upload</h2>\n<p>Send the document as a file instead of Base64. Useful when you have the image as a file and want to avoid base64 encoding overhead.</p>\n<h3 id=\"form-fields\">Form Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>file</code></td>\n<td>file</td>\n<td>The document image file</td>\n</tr>\n<tr>\n<td><code>returntype</code></td>\n<td>string</td>\n<td>Comma-separated: <code>Data</code>, <code>Data,Face</code>, <code>Data,Face,Signature</code></td>\n</tr>\n<tr>\n<td><code>IsMappingApplied</code></td>\n<td>string</td>\n<td><code>true</code> to normalize field names</td>\n</tr>\n<tr>\n<td><code>face_vector</code></td>\n<td>string</td>\n<td><code>true</code> to compute face embedding (requires <code>Face</code> in returntype)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Note:</strong> Do not set the <code>Content-Type</code> header manually. Postman sets it automatically with the multipart boundary.</p>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"4606e425-e7a8-a210-42cf-9b281daa4a70"},{"name":"Verify Document - Dual Image (Front & Back)","id":"a694db3c-77ff-1f37-820f-120bf9d7e9ff","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","description":"<p>Request content type</p>\n"},{"key":"X-Api-Key","value":"","description":"<p>API key for authentication (required)</p>\n"},{"key":"X-Account-Name","value":"","description":"<p>Account name (optional, improves routing)</p>\n"}],"body":{"mode":"raw","raw":"{\"image1\": \"\", \"image2\": \"\", \"returnType\": [\"Data\", \"Face\", \"Signature\"], \"isMappingApplied\": true, \"combineBothSides\": false, \"detect_orientation\": true}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/v1/kyc","description":"<h2 id=\"verify-document---dual-image-front--backnnsend-both-sides-of-a-two-sided-identity-document-in-a-single-request-the-api-processes-each-side-independently-and-returns-separate-results-allowing-more-granular-control-over-field-prioritiesnnuse-this-endpoint-instead-of-making-two-separate-requests-to-apikycnn-endpointnnnpost-api_urlapiv1kycnnn-request-body-fieldsnn-field--type--default--description-n-----------------------------------n-image1--string-base64-or-file----required-front-side-of-the-document-base64-encoded-or-file-upload-n-image2--string-base64-or-file----required-back-side-of-the-document-base64-encoded-or-file-upload-n-image1url--string----alternative-s3-presigned-url-for-image-1-instead-of-image1-n-image2url--string----alternative-s3-presigned-url-for-image-2-instead-of-image2-n-combinebothsides--boolean--false--when-true-the-server-combines-both-images-into-one-before-processing-server-side-stitching-when-false-each-side-is-processed-independently-n-returntype--string--data--same-as-standard-endpoint-data-face-signature-n-ismappingapplied--boolean--false--when-true-normalizes-field-names-and-merges-fields-from-both-sides-keeping-the-highest-scoring-value-for-each-field-strongly-recommended-n-face_vector--boolean--false--compute-512-dimensional-face-embedding-requires-face-in-returntype-n-detect_orientation--boolean--false--auto-detect-and-correct-document-orientation-nn-response-when-combinebothsides-falsenneach-side-is-processed-independentlynnjsonnn--image1response-n----keyvalues--viz_surname-doe--n----keyscores--viz_surname-095--n----documentinfo--nationality-gbr-documenttype-uk---id-card-documentside-1-n----face-dataimagejpegbase64n--n--image2response-n----keyvalues--mrz_surname-doe--n----keyscores--mrz_surname-10--n----documentinfo--nationality-gbr-documenttype-uk---id-card-documentside-2-n--nnnnwhen-ismappingapplied-true-the-gateway-automatically-merges-fields-from-both-sides-keeping-the-highest-scoring-value-for-each-fieldnn-response-when-combinebothsides-truennthe-server-combines-both-images-into-one--the-response-is-identical-to-the-standard-apikyc-endpointnn-when-to-use-each-modenn-scenario--combinebothsides-n------------------------------n-need-to-know-which-side-each-field-came-from--false-n-different-field-priorities-per-side--false-n-simple-integration-server-side-combination--true-n-single-sided-documents-passports--use-standard-apikyc-instead-\">Verify Document - Dual Image (Front &amp; Back)\\n\\nSend <strong>both sides</strong> of a two-sided identity document in a single request. The API processes each side independently and returns separate results, allowing more granular control over field priorities.\\n\\nUse this endpoint instead of making two separate requests to <code>/api/kyc</code>.\\n\\n### Endpoint\\n\\n<code>\\nPOST {API_URL}/api/v1/kyc\\n</code>\\n\\n### Request Body Fields\\n\\n| Field | Type | Default | Description |\\n|-------|------|---------|-------------|\\n| <code>image1</code> | string (base64) or File | — | <strong>Required.</strong> Front side of the document. Base64 encoded or file upload. |\\n| <code>image2</code> | string (base64) or File | — | <strong>Required.</strong> Back side of the document. Base64 encoded or file upload. |\\n| <code>image1Url</code> | string | — | Alternative: S3 presigned URL for image 1 (instead of <code>image1</code>). |\\n| <code>image2Url</code> | string | — | Alternative: S3 presigned URL for image 2 (instead of <code>image2</code>). |\\n| <code>combineBothSides</code> | boolean | <code>false</code> | When <code>true</code>, the server combines both images into one before processing (server-side stitching). When <code>false</code>, each side is processed independently. |\\n| <code>returnType</code> | string[] | <code>[\\\"Data\\\"]</code> | Same as standard endpoint: <code>\\\"Data\\\"</code>, <code>\\\"Face\\\"</code>, <code>\\\"Signature\\\"</code>. |\\n| <code>isMappingApplied</code> | boolean | <code>false</code> | When <code>true</code>, normalizes field names and <strong>merges fields from both sides</strong>, keeping the highest-scoring value for each field. <strong>Strongly recommended.</strong> |\\n| <code>face_vector</code> | boolean | <code>false</code> | Compute 512-dimensional face embedding. Requires <code>\\\"Face\\\"</code> in <code>returnType</code>. |\\n| <code>detect_orientation</code> | boolean | <code>false</code> | Auto-detect and correct document orientation. |\\n\\n### Response when <code>combineBothSides: false</code>\\n\\nEach side is processed independently:\\n\\n<code>json\\n{\\n  \\\"Image1Response\\\": {\\n    \\\"keyValues\\\": { \\\"VIZ_Surname\\\": \\\"DOE\\\", ... },\\n    \\\"keyScores\\\": { \\\"VIZ_Surname\\\": 0.95, ... },\\n    \\\"documentInfo\\\": { \\\"nationality\\\": \\\"GBR\\\", \\\"documentType\\\": \\\"UK - Id Card\\\", \\\"documentSide\\\": 1 },\\n    \\\"face\\\": \\\"data:image/jpeg;base64,...\\\"\\n  },\\n  \\\"Image2Response\\\": {\\n    \\\"keyValues\\\": { \\\"MRZ_Surname\\\": \\\"DOE\\\", ... },\\n    \\\"keyScores\\\": { \\\"MRZ_Surname\\\": 1.0, ... },\\n    \\\"documentInfo\\\": { \\\"nationality\\\": \\\"GBR\\\", \\\"documentType\\\": \\\"UK - Id Card\\\", \\\"documentSide\\\": 2 }\\n  }\\n}\\n</code>\\n\\nWhen <code>isMappingApplied: true</code>, the gateway automatically <strong>merges fields from both sides</strong>, keeping the highest-scoring value for each field.\\n\\n### Response when <code>combineBothSides: true</code>\\n\\nThe server combines both images into one — the response is identical to the standard <code>/api/kyc</code> endpoint.\\n\\n### When to use each mode\\n\\n| Scenario | <code>combineBothSides</code> |\\n|----------|--------------------|\\n| Need to know which side each field came from | <code>false</code> |\\n| Different field priorities per side | <code>false</code> |\\n| Simple integration, server-side combination | <code>true</code> |\\n| Single-sided documents (passports) | Use standard <code>/api/kyc</code> instead |</h2>\n","urlObject":{"path":["api","v1","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[{"id":"d7f67e1c-96e2-f42a-55df-65de10a4b48b","name":"200 - Dual image, independent processing","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","description":"Request content type"},{"key":"X-Api-Key","value":"","description":"API key for authentication (required)"},{"key":"X-Account-Name","value":"","description":"Account name (optional, improves routing)"}],"body":{"mode":"raw","raw":"{\"image1\": \"\", \"image2\": \"\", \"returnType\": [\"Data\", \"Face\", \"Signature\"], \"isMappingApplied\": true, \"combineBothSides\": false, \"detect_orientation\": true}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/v1/kyc","description":"## Verify Document - Dual Image (Front & Back)\\n\\nSend **both sides** of a two-sided identity document in a single request. The API processes each side independently and returns separate results, allowing more granular control over field priorities.\\n\\nUse this endpoint instead of making two separate requests to `/api/kyc`.\\n\\n### Endpoint\\n\\n```\\nPOST {API_URL}/api/v1/kyc\\n```\\n\\n### Request Body Fields\\n\\n| Field | Type | Default | Description |\\n|-------|------|---------|-------------|\\n| `image1` | string (base64) or File | — | **Required.** Front side of the document. Base64 encoded or file upload. |\\n| `image2` | string (base64) or File | — | **Required.** Back side of the document. Base64 encoded or file upload. |\\n| `image1Url` | string | — | Alternative: S3 presigned URL for image 1 (instead of `image1`). |\\n| `image2Url` | string | — | Alternative: S3 presigned URL for image 2 (instead of `image2`). |\\n| `combineBothSides` | boolean | `false` | When `true`, the server combines both images into one before processing (server-side stitching). When `false`, each side is processed independently. |\\n| `returnType` | string[] | `[\\\"Data\\\"]` | Same as standard endpoint: `\\\"Data\\\"`, `\\\"Face\\\"`, `\\\"Signature\\\"`. |\\n| `isMappingApplied` | boolean | `false` | When `true`, normalizes field names and **merges fields from both sides**, keeping the highest-scoring value for each field. **Strongly recommended.** |\\n| `face_vector` | boolean | `false` | Compute 512-dimensional face embedding. Requires `\\\"Face\\\"` in `returnType`. |\\n| `detect_orientation` | boolean | `false` | Auto-detect and correct document orientation. |\\n\\n### Response when `combineBothSides: false`\\n\\nEach side is processed independently:\\n\\n```json\\n{\\n  \\\"Image1Response\\\": {\\n    \\\"keyValues\\\": { \\\"VIZ_Surname\\\": \\\"DOE\\\", ... },\\n    \\\"keyScores\\\": { \\\"VIZ_Surname\\\": 0.95, ... },\\n    \\\"documentInfo\\\": { \\\"nationality\\\": \\\"GBR\\\", \\\"documentType\\\": \\\"UK - Id Card\\\", \\\"documentSide\\\": 1 },\\n    \\\"face\\\": \\\"data:image/jpeg;base64,...\\\"\\n  },\\n  \\\"Image2Response\\\": {\\n    \\\"keyValues\\\": { \\\"MRZ_Surname\\\": \\\"DOE\\\", ... },\\n    \\\"keyScores\\\": { \\\"MRZ_Surname\\\": 1.0, ... },\\n    \\\"documentInfo\\\": { \\\"nationality\\\": \\\"GBR\\\", \\\"documentType\\\": \\\"UK - Id Card\\\", \\\"documentSide\\\": 2 }\\n  }\\n}\\n```\\n\\nWhen `isMappingApplied: true`, the gateway automatically **merges fields from both sides**, keeping the highest-scoring value for each field.\\n\\n### Response when `combineBothSides: true`\\n\\nThe server combines both images into one — the response is identical to the standard `/api/kyc` endpoint.\\n\\n### When to use each mode\\n\\n| Scenario | `combineBothSides` |\\n|----------|--------------------|\\n| Need to know which side each field came from | `false` |\\n| Different field priorities per side | `false` |\\n| Simple integration, server-side combination | `true` |\\n| Single-sided documents (passports) | Use standard `/api/kyc` instead |"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\"Image1Response\": {\"keyValues\": {\"VIZ_Surname\": \"ESPAÑOLA ESPAÑOLA\", \"VIZ_GivenNames\": \"CARMEN\", \"VIZ_DocumentNumber\": \"99999999R\", \"VIZ_DateOfBirth\": \"01/01/1980\", \"VIZ_DateOfExpiry\": \"02/06/2031\", \"VIZ_Sex\": \"F\"}, \"keyScores\": {\"VIZ_Surname\": 0.95, \"VIZ_GivenNames\": 0.97, \"VIZ_DocumentNumber\": 0.99, \"VIZ_DateOfBirth\": 0.93, \"VIZ_DateOfExpiry\": 0.94, \"VIZ_Sex\": 0.98}, \"documentInfo\": {\"nationality\": \"ESP\", \"documentType\": \"Spain - Id Card (2021)\", \"documentSide\": 1}, \"face\": \"data:image/jpeg;base64,/9j/4AAQSkZJRg...\"}, \"Image2Response\": {\"keyValues\": {\"MRZ_Surname\": \"ESPANOLA ESPANOLA\", \"MRZ_GivenNames\": \"CARMEN\", \"MRZ_DocumentNumber\": \"99999999R\", \"MRZ_DateOfBirth\": \"800101\", \"MRZ_DateOfExpiry\": \"310602\", \"MRZ_Sex\": \"F\", \"MRZ_Nationality\": \"ESP\"}, \"keyScores\": {\"MRZ_Surname\": 1.0, \"MRZ_GivenNames\": 1.0, \"MRZ_DocumentNumber\": 1.0, \"MRZ_DateOfBirth\": 1.0, \"MRZ_DateOfExpiry\": 1.0, \"MRZ_Sex\": 1.0, \"MRZ_Nationality\": 1.0}, \"documentInfo\": {\"nationality\": \"ESP\", \"documentType\": \"Spain - Id Card (2021)\", \"documentSide\": 2}}}"}],"_postman_id":"a694db3c-77ff-1f37-820f-120bf9d7e9ff"}],"id":"325adcbc-a4a0-49f0-90d3-5e81a9d91b45","description":"<p>Endpoints for verifying identity documents. Send a document image encoded in Base64 and receive extracted data fields (name, document number, expiry date, etc.).</p>\n","_postman_id":"325adcbc-a4a0-49f0-90d3-5e81a9d91b45"},{"name":"Utilities","item":[{"name":"Health Check","id":"5832976c-0a7f-43f3-bf8d-72232fcaa4bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://kyc.roommatik.com/health","description":"<h2 id=\"health-check\">Health Check</h2>\n<p>Check if the KYC API server is online and healthy.</p>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><strong>200 OK</strong>: Server is healthy and ready to process requests</li>\n<li><strong>503 Service Unavailable</strong>: Server is under maintenance or not ready</li>\n</ul>\n","urlObject":{"path":["health"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[{"id":"f12ef24d-a20b-48ac-98be-fd8b19ac4fbd","name":"200 - Healthy","originalRequest":{"method":"GET","header":[],"url":"https://kyc.roommatik.com/health","description":"## Health Check\n\nCheck if the KYC API server is online and healthy.\n\n### Response\n\n- **200 OK**: Server is healthy and ready to process requests\n- **503 Service Unavailable**: Server is under maintenance or not ready"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":"Healthy"}],"_postman_id":"5832976c-0a7f-43f3-bf8d-72232fcaa4bf"},{"name":"Verify Document - From File (Pre-request Script)","event":[{"listen":"prerequest","script":{"exec":["// This pre-request script reads a file and converts it to Base64.","// To use it:","// 1. Set the 'filePath' variable below to your local file path","// 2. Or use Postman's file picker in the Body tab","","// Note: For large files, it's recommended to use an external tool","// to convert the image to Base64 and paste it directly.","","console.log('Tip: Convert your image to Base64 externally and paste it');","console.log('into the frontImageBase64 collection variable.');","console.log('');","console.log('Linux/macOS: base64 -i document.png | tr -d \"\\\\n\"');","console.log('Windows PowerShell: [Convert]::ToBase64String([IO.File]::ReadAllBytes(\"document.png\"))');"],"type":"text/javascript","id":"cb7a0e6b-e301-4647-bfcf-7e9f83d4d139"}}],"id":"73544888-da4a-4dfa-a5d5-9faa4ba20611","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Api-Key","value":""},{"key":"X-Account-Name","value":""}],"body":{"mode":"raw","raw":"{\n    \"image\": \"\",\n    \"returnType\": [\"Data\"],\n    \"isMappingApplied\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/kyc","description":"<h2 id=\"verify-document---using-collection-variables\">Verify Document - Using Collection Variables</h2>\n<p>This request uses the <code>frontImageBase64</code> collection variable. To use it:</p>\n<h3 id=\"option-1-set-the-variable-manually\">Option 1: Set the variable manually</h3>\n<ol>\n<li>Go to the <strong>Variables</strong> tab of this collection</li>\n<li>Paste your Base64-encoded image into the <code>frontImageBase64</code> variable</li>\n<li>Send the request</li>\n</ol>\n<h3 id=\"option-2-convert-from-command-line\">Option 2: Convert from command line</h3>\n<p><strong>Linux/macOS:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">base64 -i document.png | tr -d '\\n' | pbcopy\n</code></pre>\n<p><strong>Windows PowerShell:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-powershell\">[Convert]::ToBase64String([IO.File]::ReadAllBytes(\"document.png\")) | Set-Clipboard\n</code></pre>\n<p>Then paste the result into the <code>frontImageBase64</code> variable.</p>\n","urlObject":{"path":["api","kyc"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"73544888-da4a-4dfa-a5d5-9faa4ba20611"},{"name":"Verify miDNI QR Code","id":"59a924d2-a898-0f7f-7cc0-05831ed7d173","request":{"method":"POST","header":[{"value":"application/json","description":"<p>Request content type</p>\n","key":"Content-Type"},{"value":"","description":"<p>API key for authentication (required)</p>\n","key":"X-Api-Key"}],"body":{"mode":"raw","raw":"{\"Base64Data\": \"{{qrBase64Data}}\"}","options":{"raw":{"language":"json"}}},"url":"https://kyc.roommatik.com/api/qr/midni","description":"<h2 id=\"verify-midni-qr-code\">Verify miDNI QR Code</h2>\n<p>Decode and verify a QR code generated by the Spanish miDNI mobile app.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Base64Data</code></td>\n<td>string</td>\n<td>Yes*</td>\n<td>Raw QR binary content encoded as Base64</td>\n</tr>\n<tr>\n<td><code>HexData</code></td>\n<td>string</td>\n<td>Yes*</td>\n<td>Raw QR binary content as hex string</td>\n</tr>\n</tbody>\n</table>\n</div><p>*Exactly one of <code>Base64Data</code> or <code>HexData</code> must be provided.</p>\n<p><strong>Important:</strong> This endpoint expects the <strong>raw binary data</strong> from the QR code, not an image of the QR. Use a QR scanning library to extract the payload first.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response uses the <strong>same normalized field names</strong> as the OCR endpoint (<code>firstName</code>, <code>lastName</code>, <code>documentNumber</code>, etc.), plus QR-specific fields like <code>signatureValid</code>, <code>dataExpired</code>, <code>address</code>, and <code>birthPlace</code>.</p>\n<h3 id=\"validation\">Validation</h3>\n<p>The API automatically validates:</p>\n<ul>\n<li><strong>Digital signature</strong>: Rejects QR codes with invalid signatures (400)</li>\n<li><strong>Expiration</strong>: Rejects expired QR codes (400)</li>\n</ul>\n","urlObject":{"path":["api","qr","midni"],"host":["https://kyc.roommatik.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"59a924d2-a898-0f7f-7cc0-05831ed7d173"}],"id":"0b9dcf88-5d3c-4cd0-a5d7-f7a69dcdc613","description":"<p>Helper requests for testing and debugging.</p>\n","_postman_id":"0b9dcf88-5d3c-4cd0-a5d7-f7a69dcdc613"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["// Ensure API URL doesn't have trailing slash","let apiUrl = pm.collectionVariables.get('apiUrl');","if (apiUrl && apiUrl.endsWith('/')) {","    pm.collectionVariables.set('apiUrl', apiUrl.slice(0, -1));","}"],"id":"87f2a920-b9d5-4b73-8b0e-792ad6a8e055"}},{"listen":"test","script":{"type":"text/javascript","exec":["// Common tests for all requests","pm.test('Response time is acceptable', function () {","    pm.expect(pm.response.responseTime).to.be.below(60000);","});","","if (pm.response.code === 200) {","    pm.test('Response has data object', function () {","        const json = pm.response.json();","        pm.expect(json).to.have.property('data');","        pm.expect(json).to.have.property('responseTime');","    });","","    pm.test('Document side is identified', function () {","        const json = pm.response.json();","        pm.expect(json.data).to.have.property('DocumentSide');","    });","}"],"id":"07f917bb-9d74-4821-8a38-811bab70117e"}}],"variable":[{"key":"apiUrl","value":"https://kyc.roommatik.com","type":"string","description":"KYC API base URL. Provided by Roommatik."},{"key":"apiKey","value":"","type":"string","description":"Your API key for authentication. Provided by Roommatik."},{"key":"accountName","value":"","type":"string","description":"Your account name (optional, improves request routing)."},{"key":"frontImageBase64","value":"","type":"string","description":"Base64-encoded front side image (without data:image prefix). Paste your image here."},{"key":"backImageBase64","value":"","type":"string","description":"Base64-encoded back side image (without data:image prefix). Paste your image here."}]}