POST /api/notarize
Request notarization of given hash with its attributes. Tha hash must be a SHA256 type with 0x prefix.
Params
The body of the request must be a JSON object with the following fields:
| Param | Description | Required | 
|---|---|---|
| hash | Hash of document to notarize | Yes | 
| name | Name of the document | Yes | 
| signature | Signature of the owner's wallet | Yes | 
| description | Description of the file | No | 
| tags | Array of tags to improve research | No | 
Return
The GET request return an object containing the follow properties:
| Param | Type | Description | 
|---|---|---|
| msg | string | Result message | 
| id | string | Notarization id usefull to request status data | 
Usage
const axios = require('axios');
const endpoint = https://api.demo.bcode.cloud
const authToken = '<your-jwt>'
const hash = "0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2"
const notarizationData = {
    hash,
    "name": "test notarization API",
    "signature": "0x63d2ad3b133a0c0e95hdbbe2011d6248cb1ee087a2aa50e0fc75ae2db292aa6d",
    "description": 'here it goes your description',
    "tags": ['test','important'],
}
let { status } = await axios.post(
    `${endpoint}/api/notarize`,
    notarizationData,
    {
        headers: {
            Authorization : `${authToken}`
        }
    }
);
if(status == 200) console.log('success');