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
| Item | Description |
|---|---|
| Provider Endpoint URI | https://my.veridocglobal.com/api/privatedocuments |
| Interface description | Submit private files |
| Mode of Interface | RESTFUL API (JSON) |
| Security | Authorization Header: Access Key |
| Supports Multi-Records | No |
| Method(s) | POST |
| Request Body Content-Type | Application/JSON |
Sample private-documents request header:
Request Header
Content-Type: application/x-www-form-urlencodedContent-Length: 0apikey: < 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 Name | Description | Mandatory | Comments |
|---|---|---|---|
| keypairid | You will get this from your AWS bucket. | Yes | Please include keypairid as payload. |
| privatekey | You will get this from your AWS bucket. | Yes | Please include privatekey as payload. |
Sample private-documents response:
{"message": "Data saved successfully.","returncode": "1"}
| Field Name | Description | Mandatory | Comments |
|---|---|---|---|
| returncode | Refers to the status | 1 - 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.” |