{"info":{"_postman_id":"aeef556f-2ef8-42f4-85a2-47e3ab9fde48","name":"Nanonets Whitelabel","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"13272317","collectionId":"aeef556f-2ef8-42f4-85a2-47e3ab9fde48","publishedId":"TVsxA6Bc","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"546FFF"},"publishDate":"2020-12-24T16:45:57.000Z"},"item":[{"name":"Predict On Image","id":"c7222af8-968c-47bb-9e54-64403c877842","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{YOUR_API_KEY}}"},{"key":"password","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"/Users/temp.png"}]},"url":"https://app.nanonets.com/api/v2/OCR/Model/{{YOUR_MODEL_ID}}/LabelFile/?async=true","description":"<p>This returns a <code>request_file_id</code> which is used in the next query <code>Get Validation Url</code></p>\n","urlObject":{"protocol":"https","path":["api","v2","OCR","Model","{{YOUR_MODEL_ID}}","LabelFile",""],"host":["app","nanonets","com"],"query":[{"key":"async","value":"true"}],"variable":[]}},"response":[{"id":"7c335dbf-1d25-4f11-b2a0-5d851d085ac3","name":"Predict On Image","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"/Users/temp.png"}]},"url":{"raw":"https://app.nanonets.com/api/v2/OCR/Model/{{YOUR_MODEL_ID}}/LabelFile/?async=true","protocol":"https","host":["app","nanonets","com"],"path":["api","v2","OCR","Model","{{YOUR_MODEL_ID}}","LabelFile",""],"query":[{"key":"async","value":"true"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.16.1"},{"key":"Date","value":"Thu, 24 Dec 2020 09:39:30 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization"},{"key":"Access-Control-Expose-Headers","value":"DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Success\",\n    \"result\": [\n        {\n            \"message\": \"Success\",\n            \"input\": \"temp.png\",\n            \"prediction\": [],\n            \"page\": 0,\n            \"request_file_id\": \"d205c5fe-0e63-48a1-997a-23272546946f\",\n            \"filepath\": \"uploadedfiles/{{YOUR_MODEL_ID}}/PredictionImages/1491606602.jpeg\",\n            \"id\": \"{{Id}}\"\n        }\n    ]\n}"}],"_postman_id":"c7222af8-968c-47bb-9e54-64403c877842"},{"name":"Get Validation Url","id":"301a2ada-058b-40bf-845d-7e9e03bd0489","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{YOUR_API_KEY}}"},{"key":"password","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://preview.nanonets.com/Inferences/Model/{{YOUR_MODEL_ID}}/ValidationUrl/{{request_file_id}}?redirect={{REDIRECT_URL}}&expires=1608843564&callback=your.url.com/where_you_want_to_receive_a_callback","description":"<p>This takes the field <code>request_file_id</code> returned from <code>Predict On Image</code> along with the params <code>redirect</code> which redirects the user to a particular url post completion of validation and <code>expires</code> which sets the time the user has to validate the image, <code>expires</code> is in the format seconds since epoch. <code>callback</code> will send a Post request to the url you specify in <code>callback</code> when the user completes verification and exits.</p>\n","urlObject":{"protocol":"https","path":["Inferences","Model","{{YOUR_MODEL_ID}}","ValidationUrl","{{request_file_id}}"],"host":["preview","nanonets","com"],"query":[{"key":"redirect","value":"{{REDIRECT_URL}}"},{"key":"expires","value":"1608843564"},{"key":"callback","value":"your.url.com/where_you_want_to_receive_a_callback"}],"variable":[]}},"response":[{"id":"b95efe2e-f63e-46d9-bf87-0bbf01311206","name":"Get Validation Url","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://preview.nanonets.com/Inferences/Model/{{YOUR_MODEL_ID}}/ValidationUrl/{{Id}}?redirect={{REDIRECT_URL}}&expires=1608843564","protocol":"https","host":["preview","nanonets","com"],"path":["Inferences","Model","{{YOUR_MODEL_ID}}","ValidationUrl","{{Id}}"],"query":[{"key":"redirect","value":"{{REDIRECT_URL}}"},{"key":"expires","value":"1608843564"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Thu, 24 Dec 2020 09:45:10 GMT"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Length","value":"725"},{"key":"Connection","value":"keep-alive"},{"key":"Www-Authenticate","value":"Basic realm=\"Restricted\""}],"cookie":[],"responseTime":null,"body":"https://preview.nanonets.com/Verify/?key=nLH1WHl2EtsJjw75VXvJrFCl3j9tCyNYbjSD3BaOmOjRmnQEmCZ61XqTJyTz51-6EoH8Ih_aHanZlum_jdxVODIRv77x3LrbOBs_mcSAWlk37yxe_OuwcFwjctjNjmp9UJ52ph7CSkaV28_CjdlJHdBZvmWufVaF2njJREpfS7a2ApJC70HXvKzcT8H_Z6fAftHD2DS_YajvQeeWbQDurgdVynroOZ4Qs5Ic6q1v9LXySFWJhdHfD5JBmjBM2ocP8z2IwnNWcNUFF5q4q9XBXZbB4B0Y9PcM0VH7ZmiJJngSVhM_iAeSE8R8ZhtYvvwrIJBzxsUNXvtAR5YJ9-1BhK94Q_7K-fREwOAgn-61NweqWawe_s8IcABDsp8d7eAljO3HGNZHSbhoJEvPFFwxVEDvO8KNJjtfo2FMwdvgzHcCUqxLPiTDbzyXfFgN655jw0yPb6KpPq3NdezrRByOwo5i5iBOz7RuGEhWC9E427un8TbqF2NVf8B6joi6YLDI9hnaaWwaWsAhWunDPg0oOEUhZM-1QFhn3BgGySRbi6KRFO_N0eWYBOQkMH8VwLRas2uxjl3oTPFuZeVayivQPIM_t7_f5krNgyHQxIrpqtyNatejcbcdSKcuRVJ1W6RzO9MCaAz1cPcBBasB-wuWfimhL5OIkzC4DVKcvRAt33Y="}],"_postman_id":"301a2ada-058b-40bf-845d-7e9e03bd0489"},{"name":"Retreive Prediction","id":"614d2813-cb15-4d64-ab3f-0fbaf46b6002","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{YOUR_API_KEY}}"},{"key":"password","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://app.nanonets.com/api/v2/Inferences/Model/{{YOUR_MODEL_ID}}/ImageLevelInferences/{{Id}}","description":"<p>This endpoint can be used to retreieve the prediction for a particular image, it requires the <code>id</code> parameter passed in the url</p>\n","urlObject":{"protocol":"https","path":["api","v2","Inferences","Model","{{YOUR_MODEL_ID}}","ImageLevelInferences","{{Id}}"],"host":["app","nanonets","com"],"query":[],"variable":[]}},"response":[{"id":"35774951-a5e4-4975-a968-0fb69cdcbdca","name":"Retreive Prediction","originalRequest":{"method":"GET","header":[],"url":"https://app.nanonets.com/api/v2/Inferences/Model/{{YOUR_MODEL_ID}}/ImageLevelInferences/{{Id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.16.1"},{"key":"Date","value":"Thu, 24 Dec 2020 16:34:45 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization"},{"key":"Access-Control-Expose-Headers","value":"DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Success\",\n    \"result\": [\n        {\n            \"message\": \"\",\n            \"input\": \"\",\n            \"prediction\": [\n                {\n                    \"label\": \"label\",\n                    \"ocr_text\": \"ocr_text\",\n                    \"score\": 1,\n                    \"xmin\": 2766,\n                    \"xmax\": 3036,\n                    \"ymin\": 229,\n                    \"ymax\": 254\n                },\n            ],\n            \"page\": 0,\n            \"request_file_id\": \"00000000-0000-0000-0000-000000000000\",\n            \"filepath\": \"\",\n            \"id\": \"{{Id}}\",\n            \"is_moderated\": false\n        }\n    ]\n}"}],"_postman_id":"614d2813-cb15-4d64-ab3f-0fbaf46b6002"},{"name":"Whitelabel Domain","id":"0a556f93-7d24-478a-9714-ffc15f776582","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{YOUR_API_KEY}}"},{"key":"password","value":""}]},"isInherited":false},"method":"POST","header":[],"url":"https://preview.nanonets.com/add-domain/{{Model Id}}/{{WhiteLabelDomain}}","urlObject":{"protocol":"https","path":["add-domain","{{Model Id}}","{{WhiteLabelDomain}}"],"host":["preview","nanonets","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0a556f93-7d24-478a-9714-ffc15f776582"}],"event":[{"listen":"prerequest","script":{"id":"3a16024d-5d39-4464-a461-fa49d75dfb57","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5b2d5c97-4709-45f3-8245-393d25cb917d","type":"text/javascript","exec":[""]}}],"variable":[{"key":"ModelId","value":"{{YOUR_MODEL_ID}}"},{"key":"APIKey","value":"{{YOUR_API_KEY}}"},{"key":"Id","value":"{{Id}}"},{"key":"Password","value":""},{"key":"REDIRECT_URL","value":"{{REDIRECT_URL}}"},{"key":"request_file_Id","value":"{{request_file_id}}"}]}