openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 14.9 kB
JSON
{"openapi":"3.0.2","servers":[{"url":"Your API URL"}],"info":{"contact":{"email":"support@digitallocker.gov.in"},"description":"This document provides detailed specification of the Digital Locker Pull APIs. The Pull model of integration with Digital Locker enables a Digital Locker user to search a document/certificate from issuer repository and fetch (pull) it into Digital Locker. The issuer departments can use these APIs for the documents that are not Aadhaar seeded. The issuer organization integrating with Digital Locker maintains the documents/certificates in its own repository (database or file system). The issuer application provides APIs to Digital Locker to access the documents in this repository. Each issuer organization will have to implement 2 APIs to integrate with the Digital Locker system.","termsOfService":"https://ndh.digitallocker.gov.in/terms.php","title":"DigiLocker Issuer APIs","version":"3.0.0","x-apisguru-categories":["open_data"],"x-origin":[{"format":"openapi","url":"https://apisetu.gov.in/api_specification_v8/issuer.yaml","version":"3.0"}],"x-providerName":"apisetu.gov.in","x-serviceName":"issuer"},"paths":{"/Your Pull DOC Request API Path":{"post":{"description":"The Pull Doc Request API has to be implemented by the issuers and will be consumed by Digital Locker system. This API will be invoked when the resident clicks on the URI displayed in the Issued documents section of DigLocker. The issuer API will by sending the certificate data. The certificate data should be sent in one of the two formats depending on the request send by Digital Locker:|- a. PDF document format b. XML format for machine readable metadata","operationId":"Pull Doc","parameters":[{"description":"application/xml","in":"header","name":"Content-Type","required":false,"schema":{"type":"string"}},{"description":"This is used for authentication and to verify the integrity of the request. DigiLocker calculates the hash message authentication code (hmac) of the HTTP request body using SHA256 hashing algorithm and the API Key provided by the issuer as the hashing key. The API Key is specified by the issuer while configuring the Pull Doc API in DigiLocker Partner Portal. The resulting hmac is converted to Base64 format and sent in this parameter. It is strongly recommended that the issuer API calculates the hmac of the HTTP request body, convert it to Base64 and match it with this parameter to ensure authenticity of the request.","in":"header","name":"x-digilocker-hmac","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/PullDocRequest"}}}},"responses":{"200":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/PullDocResponse"}}},"description":"successful operation"}},"summary":"Pull Doc Request API.","tags":["APIs"]}},"/Your Pull URI Request API Path":{"post":{"description":"The Pull URI Request API has to be implemented by the issuers and will be consumed by Digital Locker application. This API will be invoked when a citizen searches the issuer repository for his/her certificate. If the certificate data is Aadhaar seeded, the issuer may choose to use Aadhaar number as the search parameter. Digital Locker provides Aadhaar number, name and date of birth as on Aadhaar to the issuer API as additional parameters. The option for these Aadhaar based parameters can be selected while configuring this API in Digital Locker Partner’s Portal. If the certificate data is not Aadhaar seeded then the issuer may use any other unique parameter e.g. driving license number to search for a driving license. These custom parameters will be passed in the UDF elements as shown in the sample request below. The custom parameter(s) can be configured while configuring the API in the DigiLocker Partner’s Portal. The Digital Locker system will query the issuer repository to fetch the URI for any document that match the search criteria. The citizen can save this URI in his/her Digital Locker. It is strongly recommended that the issuer API validate that the name, date of birth details sent by DigiLocker in Aadhaar parameters match with the corresponding details on the certificate before returning the certificate data. This will ensure that only authentic owners get access to a certificate.","operationId":"Pull Uri","parameters":[{"description":"application/xml","in":"header","name":"Content-Type","required":false,"schema":{"type":"string"}},{"description":"This is used for authentication and to verify the integrity of the request. DigiLocker calculates the hash message authentication code (hmac) of the HTTP request body using SHA256 hashing algorithm and the API Key provided by the issuer as the hashing key. The API Key is specified by the issuer while configuring the Pull Doc API in DigiLocker Partner Portal. The resulting hmac is converted to Base64 format and sent in this parameter. It is strongly recommended that the issuer API calculates the hmac of the HTTP request body, convert it to Base64 and match it with this parameter to ensure authenticity of the request.","in":"header","name":"x-digilocker-hmac","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/PullURIRequest"}}}},"responses":{"200":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/PullURIResponse"}}},"description":"successful operation"}},"summary":"Pull URI Request API .","tags":["APIs"]}}},"components":{"schemas":{"PullDocRequest":{"properties":{"DocDetails":{"properties":{"DOB":{"description":"Date of birth of the DigiLocker user accessing the document/certificate as in Aadhaar in DD-MM-YYYY format. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":"31-12-1990","minLength":1,"type":"string"},"DigiLockerId":{"description":"A unique 36 character DigiLocker Id of the user account.","example":"123e4567-e89b-12d3-a456-426655440000","minLength":1,"type":"string"},"FullName":{"description":"Name of the DigiLocker user accessing the document/certificate as in Aadhaar. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":"Sunil Kumar","minLength":1,"type":"string"},"UID":{"description":"Aadhaar number of the DigiLocker user accessing the document/certificate. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":123456789012,"minLength":1,"type":"string"},"URI":{"description":"URI identifies the document uniquely.","example":"in.gov.kerala.edistrict-INCER-123456","minLength":1,"type":"string"}},"required":["URI","DigiLockerId","UID","FullName","DOB"],"type":"object"},"format":{"description":"The certificate data in the response. Possible values of this attribute are:\n xml: for certificate data in machine readable xml format\n pdf: for certificate data in printable pdf format\n both: for certificate data in both xml and pdf format. If the format attribute is not present in the request, then the API must return Base64 encoded PDF data in the response. Please see the response section below for more details.","minLength":1,"type":"string","xml":{"attribute":true}},"orgId":{"description":"Org Id is the user id provided to the Digital Locker application by the issuer application for accessing the API.","type":"string","xml":{"attribute":true}},"ts":{"description":"A timestamp value. This will be used to decode the keyHash element described below.","minLength":1,"type":"string","xml":{"attribute":true}},"txn":{"description":"Transaction id.","type":"string","xml":{"attribute":true}},"ver":{"description":"API version.","minLength":1,"type":"string","xml":{"attribute":true}}},"required":["ver","ts","txn","orgId","format","DocDetails"],"type":"object"},"PullDocResponse":{"properties":{"DocDetails":{"description":"Issuer can add meta content specific to document here.","properties":{"DataContent":{"description":"Enclose the Base64 byte encoded certificate metadata in XML format. The DataContent element should be sent only if the original request contains format attribute as “xml” or “both”.","minLength":1,"type":"string"},"DocContent":{"description":"Enclose the Base64 byte encoded contents of PDF file in this element. The DocContent element should be sent only if the format attribute in the original request is sent as “pdf” or “both” or is absent.","minLength":1,"type":"string"}},"required":["DocContent","DataContent"],"type":"object"},"ResponseStatus":{"properties":{"Status":{"description":"1 for success, 0 for error.","minLength":1,"type":"string","xml":{"attribute":true}},"ts":{"description":"A timestamp value as sent in the request.","minLength":1,"type":"string","xml":{"attribute":true}},"txn":{"description":"Transaction id value as sent in the request.","type":"string","xml":{"attribute":true}}},"required":["Status","ts","txn"],"type":"object"}},"required":["ResponseStatus","DocDetails"],"type":"object"},"PullURIRequest":{"properties":{"DocDetails":{"properties":{"DOB":{"description":"Date of birth of the DigiLocker user searching for the document/certificate as on Aadhaar in DD-MM-YYYY format. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":"09-08-1989","items":{"properties":{}},"type":"string"},"DigiLockerId":{"description":"A unique 36 character DigiLocker Id of the user account.","example":"123e4567-e89b-12d3-a456-426655440000","items":{"properties":{}},"type":"string"},"DocType":{"description":"Digital Locker will pass the document type being searched in this parameter.","example":"Pdf","items":{"properties":{}},"type":"string"},"FullName":{"description":"Name of the DigiLocker user searching for the document/certificate as on Aadhaar. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":"Sunil","items":{"properties":{}},"type":"string"},"Photo":{"description":"The base 64 encoded contents of JPEG photograph as on Aadhaar. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","items":{"properties":{}},"type":"string"},"UDF1":{"description":"User defined search parameters to search a unique document/certificate. The <UDF> may be <RollNo> for CBSE, <RegistrationNo> for Transportation Dept. and <PAN> for Income Tax Dept. The search parameters for the API will be configured in the issuer portal of Digital Locker while configuring this API.","items":{"properties":{}},"type":"string"},"UDF2":{"items":{"properties":{}},"type":"string"},"UDF3":{"items":{"properties":{}},"type":"string"},"UDFn":{"items":{"properties":{}},"type":"string"},"UID":{"description":"Aadhaar number of the DigiLocker user searching for the document/certificate. This is an optional parameter and will be sent only if the issuer opts for it while configuring the API on Digital Locker Issuer Portal.","example":123443211122,"items":{"properties":{}},"type":"string"}},"required":["DocType","DigiLockerId","UID","FullName","DOB","Photo","UDF1","UDF2","UDF3","UDFn"],"type":"object"},"format":{"description":"Indicates the desired format of the certificate data in the response. Possible values of this attribute are:\n xml: for certificate data in machine readable xml format.\n pdf: for certificate data in printable pdf format\n both: for certificate data in both xml and pdf format. If the format attribute is not present in the request, then the API must return Base64 encoded PDF data in the response. Please see the response section below for more details","minLength":1,"type":"string","xml":{"attribute":true}},"orgId":{"description":"Org Id is the user id provided to the Digital Locker application by the issuer application for accessing the API.","type":"string","xml":{"attribute":true}},"ts":{"description":"A timestamp value. This will be used to decode the keyHash element described below.","minLength":1,"type":"string","xml":{"attribute":true}},"txn":{"description":"Transaction id.","minLength":1,"type":"string","xml":{"attribute":true}},"ver":{"description":"API version.","minLength":1,"type":"string","xml":{"attribute":true}}},"required":["ver","ts","txn","orgId","format","DocDetails"],"type":"object"},"PullURIResponse":{"properties":{"DocDetails":{"description":"Issuer can add meta content specific to document here.","properties":{"DOB":{"description":"The date of birth if sent in the original request.","example":"31-12-1990","minLength":1,"type":"string"},"DataContent":{"description":"Enclose the base64 byte encoded certificate metadata in XML format. The DataContent element should be sent only if the original request contains format attribute as “xml” or “both”.","minLength":1,"type":"string"},"DigiLockerId":{"description":"A unique 36 character DigiLocker Id as sent in the original request.","example":"123e4567-e89b-12d3-a456-426655440000","minLength":1,"type":"string"},"DocContent":{"description":"Enclose the Base64 byte encoded contents of PDF file in this element.","minLength":1,"type":"string"},"DocType":{"description":"The document type sent in the original request.","example":"INCER","minLength":1,"type":"string"},"FullName":{"description":"The full name if sent in the original request.","example":"Sunil Kumar","minLength":1,"type":"string"},"UDF1":{"description":"Search parameters sent in the original request.","example":1333,"minLength":1,"type":"string"},"UDF2":{"description":"Search parameters sent in the original request.","example":2016,"minLength":1,"type":"string"},"UID":{"description":"The Aadhaar number if sent in the original request.","example":123412341234,"minLength":1,"type":"string"},"URI":{"description":"URI corresponding to the search criteria that identifies the document uniquely.","example":"in.gov.dept.state-INCER-1234567","minLength":1,"type":"string"}},"required":["DocType","DigiLockerId","UID","FullName","DOB","UDF1","UDF2","URI","DocContent","DataContent"],"type":"object"},"ResponseStatus":{"properties":{"Status":{"description":"1 for success, 0 for error and 9 for pending.","minLength":1,"type":"string","xml":{"attribute":true}},"ts":{"description":"A timestamp value as sent in the request.","minLength":1,"type":"string","xml":{"attribute":true}},"txn":{"description":"Transaction id value as sent in the request.","minLength":1,"type":"string","xml":{"attribute":true}}},"required":["Status","ts","txn"],"type":"object"}},"required":["ResponseStatus","DocDetails"],"type":"object"}}}}