{"info":{"_postman_id":"f2c0dbdd-e9e7-4d81-8564-4e667c33c82f","name":"digilocker","description":"<html><head></head><body><p>#Introduction</p>\n<p>A Bridge Api That let`s you fetch documents from Digilocker api service.</p>\n<p>#Authentication</p>\n<p>To use this api you shold be a digilocker partner and have clientId and client Secret from the digilocker.</p>\n<p>#Error Codes</p>\n<p>500: Internal Server error.</p>\n<p>400: Bad Request.</p>\n<p>401: Unauthorized.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8508284","collectionId":"f2c0dbdd-e9e7-4d81-8564-4e667c33c82f","publishedId":"Szt5eW7V","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-05-19T07:19:21.000Z"},"item":[{"name":"Fetch Search parameters for the documents","id":"f981cad3-d2a8-4e2d-af81-5730c9225412","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"organizationId\": \"001891\",\n    \"docType\": \"PANCR\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/search_param","description":"<p>Returns:</p>\n<p>A list of parameters required to search a document/certificate of an issuer\norganization registered with DigiLocker. These parameters are used to pull a document\nfrom issuer’s repository using Pull Document</p>\n<p>Parameters:</p>\n<p>organizationId: The organization id for the issuer in DigiLocker.It can be obtained from issuer api</p>\n<p>docType: docType: A 5 character unique document type provided by DigiLocker. The doctype is returned in Get List of Documents API mentioned above</p>\n<p>Error:</p>\n<p>500: Internal server error </p>\n<p>400: Organization Id is missing.</p>\n<p>400: docType is missing.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","search_param"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f981cad3-d2a8-4e2d-af81-5730c9225412"},{"name":"Fetch list of document type issued by Issuers.","id":"55ccba95-2516-4547-8586-ae8da94fc362","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"organssizationId\": \"001891\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/doc_type","description":"<p>Returns:</p>\n<p>A list of documents/certificates issued by an issuer organization registered with\nDigiLocker.</p>\n<p>Parameters:</p>\n<p>organizationId: The organization id for the issuer in DigiLocker.It can be obtained from issuer api.</p>\n<p>Error:</p>\n<p>500: Internal server error.</p>\n<p>400: Organization Id is missing.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","doc_type"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"55ccba95-2516-4547-8586-ae8da94fc362"},{"name":"Pull documents to user`s digilocker.","id":"33db3a62-6470-4c6a-a244-bd6642bd8d2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"digiLockerId\": \"4d38e214-5376-507d-80be-8f9503f28886\",\n    \"organizationId\": \"001891\",\n    \"docType\": \"PANCR\",\n        \"docParam\": {\n        \t\"panno\": \"FYRPM5143N\",\n        \t\"PANFullName\": \"AVINASH KUMAR MISHRA\"\n        },\n    \"consent\": \"Y\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/pull_documents","description":"<p>This API allows a client application to search a document/certificate from issuer’s\nrepository using the parameters provided by a user. The searched document is saved in\nuser’s issued document section of DigiLocker if the search is successful. </p>\n<p>Parameters:</p>\n<p>organizationId: The organization id for the issuer in DigiLocker.It can be obtained from issuer api </p>\n<p>docType:  A 5 character unique document type provided by DigiLocker. The doctype\nis returned in Get List of Documents API mentioned above</p>\n<p>docParam: Parameters required to fetch the documents.It can be obtained from document parameter api.</p>\n<p>consent: The consent indicator from the user for sharing his Aadhaar details with\nthe issuer for pulling the document into his/her DigiLocker. The Partner Application\nmust capture the consent from the user. The possible values are “Y” and “N”. The\npull request will be processed only when this indicator is “Y”. The client application\nmust display following consent text to the user and capture user’s consent:\nI provide my consent to share my Aadhaar Number, Date of Birth and Name from my\nAadhaar eKYC information with the  for the purpose of fetching my &lt;\nCertificate Name&gt; into DigiLocker.\nThe  in above text will be replaced by the name of the issuer as\nreturned in Get List of Issuers API. The  will be replaced by the\ndescription returned in Get List of Documents API.</p>\n<p>Returns:</p>\n<p>If a document/certificate is found in issuer’s repository with the given criteria, the\ncorresponding URI of the document will be saved in Issued Documents section of\nDigiLocker and HTTP status code 200 will be returned.</p>\n<p>Sample Response:\nuri: indicates URI of the pulled document.\n{\n\"uri\": \"in.gov.cbse-HSCER-201412345678\"\n}</p>\n<p>Error:</p>\n<p>invalid_orgid[400]: The orgid parameter is missing or invalid</p>\n<p>invalid_doctype[400]: The doctype parameter is missing or invalid</p>\n<p>400: consent is missing.</p>\n<p>400: docParam is missing.</p>\n<p>401: digiLockerId is missing.</p>\n<p>repository_service_configerror[500]: The issuer service is not available. Please contact\nDigiLocker support.</p>\n<p>pull_response_pending: The details provided above do not exactly match with the\ndetails on the certificate.Your request has been forwarded to the Issuer department. The Issuer department will verify the details provided above. If the verification is successful, your certificate will be made available in the Issued Documents section of your DigiLocker.</p>\n<p>uri_exists[400]: This document already exists in your Issued Documents.</p>\n<p>record_not_found[404]: No record found in issuer database for given criteria.Please check the details and try again. If problem persists,see the FAQ section for\npossible causes.</p>\n<p>aadhaar_not_linked[400]: To access issued documents,please link your Aadhaar number to your DigiLocker account.</p>\n<p>unexpected_error[500]: Internal server error.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","pull_documents"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"33db3a62-6470-4c6a-a244-bd6642bd8d2e"},{"name":"Download documents in json format.","id":"ba783632-57d3-470c-baf0-28419fde1790","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"digiLockerId\": \"4d38e214-5376-507d-80be-8f9503f28886\",\n\t\"fileUrl\": \"in.gov.pan-PANCR-FYRPM5143N\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/document_json","description":"<p>This API can be used to download the file data in json form.</p>\n<p>PARAMETERS</p>\n<p> fileUrl: The URI of the file to download. This is sent as a part of the url.\n digiLockerId: the digilockerId of the user whose documents has to be downloaded.</p>\n<p>RETURNS</p>\n<p>Returns data of the file in pdf format.</p>\n<p>Error:</p>\n<p>400: fileUrl is missing.</p>\n<p>401: digiLockerId is missing.</p>\n<p>invalid_uri[404]: No file found for given URI.</p>\n<p>repository_service_unresponsive[500]: Internal server error.</p>\n<p>repository_service_unpublished[503]: Internal server error.</p>\n<p>repository_service_inactive[503]: Internal server error.</p>\n<p>repository_service_configerror[500]: Internal server error.</p>\n<p>repository_service_resperror[500]: Internal server error.</p>\n<p>repository_service_exception[500]: Internal server error.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","document_json"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ba783632-57d3-470c-baf0-28419fde1790"},{"name":"Take User Authorization to access it`s data","id":"12a795e8-3192-454d-8cb3-078025214c3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/digilocker/user_authorization","description":"<p>This isn't an API call — it's a DigiLocker web page that lets the user sign in to DigiLocker and authorize your application to access user’s data.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","user_authorization"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"12a795e8-3192-454d-8cb3-078025214c3c"},{"name":"Fetch Uploaded documents","id":"8195a6ba-06a8-40e7-ab76-97d2215367bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"digiLockerId\": \"4d38e214-5376-507d-80be-8f9503f28886\",\n\t\"folderId\": \"278979410\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/uploaded_documents","description":"<p>Returns the list of meta-data about documents or folders in user’s DigiLocker in a specific location.</p>\n<p>PARAMETERS</p>\n<p> folderId: The id of the folder to list. To list the files of root folder of a user’s locker, do not send this parameter.</p>\n<p> digiLockerId: The digilockerId of the user.</p>\n<p>RETURNS\nReturns meta-data about contents of a given folder in JSON format containing following\nfields in response:\n name: The name of the file or folder.</p>\n<p> type: String dir for folder and string file for file.</p>\n<p> id: The id if this item is a folder.</p>\n<p> size: Size of file or folder.</p>\n<p> date: This contains the date of file upload in case of self uploaded documents.\n parentThe id of the parent folder.</p>\n<p> mime: The mime type of the file. This field will contain “application/PDF” for PDF\nfiles; “image/png” for PNG files and “image/jpg” or “image/jpeg” for JPG/JPEG files.\nThis will be blank in case of folder.</p>\n<p> uri: This is the unique identifier of the document shared by the user in\nDigiLocker. You will use this identifier to get the actual file from DigiLocker using\nthe API. URI will be blank in case of folder.</p>\n<p> description: This is the descriptive document type stored in DigiLocker such as\n‘Income Certificate’ or ‘Driving License’.</p>\n<p> issuer: The name of the issuer. This is blank in case of uploaded documents and\nfolders.</p>\n<p>Error:</p>\n<p>invalid_id[404]: The folder does not exist.</p>\n<p>unexpected_error[500]: Internal server error.</p>\n<p>401: digilockerId is missing.</p>\n<p>400: folderId is missing.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","uploaded_documents"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8195a6ba-06a8-40e7-ab76-97d2215367bf"},{"name":"Fetch List of Issued documents.","id":"21c4d7ee-e587-4190-acf4-ffc20008e312","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"digiLockerId\": \"4d38e214-5376-507d-80be-8f9503f28886\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/issued_documents","description":"<p>Returns the list of meta-data about issued documents in user’s DigiLocker.</p>\n<p>Parameters:</p>\n<p>digilockerId: The digilocker Id of the user.</p>\n<p>RETURNS:</p>\n<p>Returns meta-data about issued documents in JSON format containing following fields in\nresponse:</p>\n<p> name: The name of the file.</p>\n<p> type: String file.</p>\n<p> size: This will be blank.</p>\n<p> date: This contains the date of issue of the document.</p>\n<p> parent: This will be blank.</p>\n<p> mime: The mime type of the file. This field will contain “application/PDF”.</p>\n<p> uri: This is the unique identifier of the document shared by the user in\nDigiLocker. You will use this identifier to get the actual file from DigiLocker using\nthe API.</p>\n<p> description: This is the descriptive document type stored in DigiLocker such as\n‘Income Certificate’ or ‘Driving License’.</p>\n<p> issuer: The name of the issuer.</p>\n<p>Error:</p>\n<p>partner_service_unresponsive[500]: Internal server error.</p>\n<p>unexpected_error[500]: Internal server error.</p>\n<p>401: digiLockerId is missing.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","issued_documents"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"21c4d7ee-e587-4190-acf4-ffc20008e312"},{"name":"Download File from URL","id":"a88e5c3d-4e73-473f-a7d1-ec392e4a0c8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"digiLockerId\": \"4d38e214-5376-507d-80be-8f9503f28886\",\n\t\"fileUrl\": \"in.gov.pan-PANCR-FYRPM5143N\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/digilocker/download_documents","description":"<p>Returns a file from URI. This API can be used to fetch both issued document and uploaded\ndocument.</p>\n<p>PARAMETERS</p>\n<p> fileUrl: The URI of the file to download. This is sent as a part of the url.\n digiLockerId: the digilockerId of the user whose documents has to be downloaded.</p>\n<p>RETURNS</p>\n<p>Returns data of the file in pdf format.</p>\n<p>Error:</p>\n<p>400: fileUrl is missing</p>\n<p>invalid_uri[404]: No file found for given URI.</p>\n<p>repository_service_unresponsive[500]: Internal server error.</p>\n<p>repository_service_unpublished[503]: Internal server error.</p>\n<p>repository_service_inactive[503]: Internal server error.</p>\n<p>repository_service_configerror[500]: Internal server error.</p>\n<p>repository_service_resperror[500]: Internal server error.</p>\n<p>repository_service_exception[500]: Internal server error.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","download_documents"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a88e5c3d-4e73-473f-a7d1-ec392e4a0c8d"},{"name":"Get list of Issuer","id":"2fd352c2-ed2a-4e89-bf7e-75c81a199da6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/digilocker/issuer","description":"<p>Returns the issuers affiliated with the digilocker.</p>\n<p>Returns HTTP status code 200 along with a JSON list of issuers containing following fields:</p>\n<p> orgid: A unique identifier of the issuer organization.</p>\n<p> name: Name of the issuer organization.</p>\n<p> category: A comma separated list of categories that define this issuer. The\npredefined issuer categories are Central Government, State Government, Education\nand Insurance.</p>\n<p> description: A description about the issuer organization and the document it\nprovides.</p>\n<p>Error:</p>\n<p>unexpected_error[500]: Internal server error.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["digilocker","issuer"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2fd352c2-ed2a-4e89-bf7e-75c81a199da6"}]}