Skip to main content

API 6: Private Documents

Private documents API

Use this API to keep private files in an AWS S3 bucket. VeriDoc Global then reads those files so they can be secured on the blockchain.

This API works with AWS only. Other storage can be set up when you move to MainNet.

You must send your AWS key pair ID and private key. Follow this guide to create a private bucket and those keys:

https://docs.google.com/document/d/131WHSiEJb-swtBEVIeYQIgfYzqCS0KwxiaDGcz92Ae0/edit?usp=sharing

ItemDescription
Provider Endpoint URIhttps://my.veridocglobal.com/api/privatedocuments
Interface descriptionSubmit private files
Mode of InterfaceRESTFUL API (JSON)
SecurityAuthorization Header: Access Key
Supports Multi-RecordsNo
Method(s)POST
Request Body Content-TypeApplication/JSON

Sample private-documents request header:

Request Header

Content-Type: application/x-www-form-urlencoded
Content-Length: 0
apikey: < To enter API Key as provided by VeriDoc Global >
payload: < SHA256 HASH of APIKEYKEYPAIRIDPRIVATEKEYSECRETKEY) >

Sample private-documents request body:

Request Body

{
"keypairid": "Enter your AWS keypair ID here",
"privatekey": "Enter your AWS bucket private key here",
}
Field NameDescriptionMandatory Comments
keypairidYou will get this from your AWS bucket.YesPlease include keypairid as payload.
privatekeyYou will get this from your AWS bucket.YesPlease include privatekey as payload.

Sample private-documents response:

{
"message": "Data saved successfully.",
"returncode": "1"
}
Field NameDescriptionMandatory Comments
returncodeRefers to the status1 - Success “message”: “Data saved successfully.”

10 - Error
“message”: ”Error: Please pass all required parameters.”
OR
“Message”: ”Error: Unable to save data. Please re-check the parameters before sending it again.”