{"info":{"_postman_id":"5ed576f8-c4d1-465c-8426-8b79abc78609","name":"Benekiva GATEWAYS - OCR","description":"<html><head></head><body><p>Benekiva Gateways for OCR offers maximum flexibility to allow API to be consumed by Benekiva in its most natural way without any changes expected. OCR gateways can be turned into two way jobs where Benekiva initiates a job and client expects to pass down the job status when its ready to be picked up by Benekiva again.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5328875","collectionId":"5ed576f8-c4d1-465c-8426-8b79abc78609","publishedId":"TzXtGKcy","public":true,"customColor":{"top-bar":"066327","right-sidebar":"066327","highlight":"1A6FD0"},"publishDate":"2021-05-21T04:59:16.000Z"},"item":[{"name":"FAX OCR JOB WEBHOOK","event":[{"listen":"prerequest","script":{"id":"8852abfb-6530-4f1a-92de-af78f9d5fdc5","exec":["var webhookKey = postman.getEnvironmentVariable(\"BKV_WEBHOOK_KEY\"); ","var payload = {","    \"jobId\": \"fa637679-1914-4d98-b83a-f231827fc1a9\",","    \"status\": \"ready\"","};","","postman.setEnvironmentVariable(\"PAYLOAD\", JSON.stringify(payload));","","var message = JSON.stringify(payload);","var prehash = CryptoJS.enc.Utf8.parse(message);","var key =  CryptoJS.enc.Utf8.parse(webhookKey);","var hash = CryptoJS.HmacSHA1(prehash, key);","var payloadHash = hash.toString(CryptoJS.enc.Base64);","","postman.setEnvironmentVariable(\"PAYLOAD_HASH\", payloadHash);",""],"type":"text/javascript"}}],"id":"7ad08da5-76b6-44f7-b409-cc0b90167e1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-bkv-signature","value":"{{PAYLOAD_HASH}}","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"payload\": {{PAYLOAD}}\n}","options":{"raw":{"language":"json"}}},"url":"{{DOMAIN}}/api/webhook/gateways/process-ocr","description":"<p>Once the OCR job has been initiated by Benekiva, it internally holds jobId that is client's unique identifier of the job. This webhook is called by client and expects jobId which is basically the unique identifier that was originated in client's system.</p>\n","urlObject":{"path":["api","webhook","gateways","process-ocr"],"host":["{{DOMAIN}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ad08da5-76b6-44f7-b409-cc0b90167e1d"},{"name":"FAX OCR JOB WEBHOOK WITH TOKEN PARAM","event":[{"listen":"prerequest","script":{"id":"3032e29d-af83-4c68-8cfc-f3573d9c40b5","exec":["var webhookKey = postman.getEnvironmentVariable(\"BKV_WEBHOOK_KEY\"); ","var payload = {","    \"jobId\": \"fa637679-1914-4d98-b83a-f231827fc1a9\",","    \"status\": \"ready\"","};","","var message = JSON.stringify(payload);","postman.setEnvironmentVariable(\"PAYLOAD\", message);","","var hashKey = CryptoJS.AES.encrypt(message, webhookKey);","postman.setEnvironmentVariable(\"PAYLOAD_HASH\", encodeURIComponent(hashKey));",""],"type":"text/javascript"}}],"id":"ea28fdde-6a1c-493b-a90b-231e2a113a00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"payload\": {{PAYLOAD}}\n}","options":{"raw":{"language":"json"}}},"url":"{{DOMAIN}}/api/webhook/gateways/process-ocr?token={{PAYLOAD_HASH}}","description":"<p>Once the OCR job has been initiated by Benekiva, it internally holds jobId that is client's unique identifier of the job. This webhook is called by client and expects jobId which is basically the unique identifier that was originated in client's system.</p>\n","urlObject":{"path":["api","webhook","gateways","process-ocr"],"host":["{{DOMAIN}}"],"query":[{"key":"token","value":"{{PAYLOAD_HASH}}"}],"variable":[]}},"response":[],"_postman_id":"ea28fdde-6a1c-493b-a90b-231e2a113a00"}]}