GET /api/notarization/:id
Request notarization data of given id.
Params
The body of the request must be a JSON object with the following fields:
Param | Description | Required |
---|---|---|
id | Notarization id inserted as query param | Yes |
Return
The GET request return an object containing the follow properties:
Param | Type | Description |
---|---|---|
date | number | Creation timestamp (ms) |
description | string | Description inserted from request, private storage |
notes | string | Additional note for creator |
externalUrl | string | Document url if inserted |
hash | string | Document hash |
ipfsUri | string | Document url if loaded on IPFS |
name | string | Notarization name inserted from request |
ownerAddress | string | Worskpace owner's address |
senderAddress | string | Wallet address of who sent the notarization |
signature | string | Signed hash |
tags | string[] | Tags inserted |
receipt | object | Blockchain receipt's data |
In detail , the receipt
property is composed by this fields:
Param | Type | Description |
---|---|---|
date | number | Creation timestamp (ms) |
merkleRoot | string | Merkle root of all bundled notarizations |
merkleTreeURI | string | URI where notarizations merkle tree are stored |
status | string | Notarization status |
tx | object | Blockchain related data |
The tx
object is composed by:
Param | Type | Description |
---|---|---|
blockHash | string | Block hash of transaction on blockchain |
blockNumer | number | Number of blockchain block |
from | string | Address of Bcode sender waller |
to | string | Notarizarion contract's address |
transactionHash | string | Hash of transaction |
Usage
const axios = require('axios');
const endpoint = https://api.demo.bcode.cloud
const authToken = '<your-jwt>'
const id = "1f6d7218-dae5-4941-8391-8a1c9a8184b3"
let response = await axios.post(
`${endpoint}/api/notarization/${id}`,
{},
{
headers: {
Authorization : `${authToken}`
}
}
);
console.log(response);