Get Stamped File Details
To get the details of a stamp file with the bStamp API, utilize the getStampDetail
method from the SDK.
Sample Code Snippet
Here is a JavaScript code snippet demonstrating the use of the getStampDetail
method:
import { Bstamp, Network } from 'edeXa-sdk';
async function getStampDetail() {
const bstamp = new Bstamp({
...settings,
authorization: `Bearer ${token}`,
});
const settings = {
network: Network.SANDBOX, // or Network.MAINNET for the mainnet network
};
const stampedFileId = {
id: 'STAMPED_FILE_ID'
}
const version = {
version: API_VERSION.VERSION_1 // or API_VERSION.VERSION_2 for version 2
}
try {
const stampDetails = await bstamp.getStampDetail(stampedFileId, version);
// Handle success
} catch (error) {
// Handle error
}
}
Key Points to Note
- Asynchronous Function: The
getStampDetail
function operates as an asynchronous (async
) function, leveragingawait
to hold execution until thebstamp.getStampDetail
promise completes. - Token Replacement: Make sure to replace
token
used inAuthorization
with yourtoken
, which you will get in response of authentication method - Stamped File ID: The identifier for the stamped file can be acquired via the addStamp method or through the getAllStamp method.
Request Parameters
Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | Number | Enter the id of the stamp you want to read details from |
version | Yes | String | Use a specific available version of bStamp |
Response Format
Key | Type | Description |
---|