Skip to main content

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, leveraging await to hold execution until the bstamp.getStampDetail promise completes.
  • Token Replacement: Make sure to replace token used in Authorization with your token, 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

ParameterRequiredTypeDescription
idYesNumberEnter the id of the stamp you want to read details from
versionYesStringUse a specific available version of bStamp

Response Format

KeyTypeDescription