Skip to main content

API 3: Blockchain Tx Trigger

Blockchain transaction trigger

Send string (encrypted/text) to blockchain. This API is responsible for triggering an event on blockchain every time it is called. This API can be called for the following scenarios when the verify page is hosted on the client's domain:

  • Supply Chain: To update the blockchain at each step in the supply chain, recording data such as time and location. Information for each event can be showed in Events Table on client's domain. Consumers can then verify each step on the blockchain by scanning the QR code using their mobile device.

  • Mail Delivery Receipt: To sign for goods that have been delivered. A unique ID, time and location stamp is recorded on the blockchain.

  • Message Read Receipt: To open an email or a private message. A unique ID, time and location stamp is recorded on the blockchain.

  • Change of Ownership: To record change of ownership on the blockchain, when an item is gifted or sold to someone else.

  • Track and Trace: to update the blockchain whenever an item changes hands, recording data such as a unique ID, time and location.

  • Prepaid Services: to use a service, attend a gym class or sign in to an event. The blockchain is updated to verify when and where it took place as well as how many sessions the customer has remaining.

ItemDescription
Provider End Point URIhttps://my.veridocglobal.com/api/blockchaintxtrigger
Interface descriptionAllow to trigger a new blockchain transaction
Mode of InterfaceRESTFUL API (JSON)
SecurityAuthorization Header: Access Key
Supports Multi-RecordsNo
Method(s)POST
Request Body Content-TypeApplication/JSON

Sample blockchain-tx-trigger request header:

Content-Type: application/x-www-form-urlencoded
Content-Length: 0
apikey: < To enter API Key as provided by VeriDoc Global >
payload: < SHA256 HASH of (APIKEY(All parameter’s data as included in your request body between double quotes without any extra spaces or characters in the order as given in the body below)SECRETKEY) >

Sample blockchain-tx-trigger request body:

{
"blockchaindata": "Sample Data | UHV",
"ischild": "1",
"parentid": "6b6192b7-0dcf-4cbe-bf36-db41588adc19"
}
Field NameDescriptionMandatory Comments
blockchaindataData/UHV string to be sent to blockchainYesMaximum characters allowed: 2000 characters (with spaces)
Ischild0 or 1

0 means it is a parent Transaction Trigger/ independent transaction

1 means it is child QR code
NoIf the blockchain transaction trigger is a Change of State event for an existing QR code (parent document/verify page) then it should be set as child and parentid should be passed.

If left blank, 0 by default, no parentid required.

Sample blockchain-tx-trigger response:

{
"guid": "Unique Identifier ID for Transaction",
"returncode": "1",
"message": "Data submitted successfully.”
}
Field NameDescriptionMandatory Comments
returncodeRefers to the status1 - Success
Any other returncode (e.g. 2,3,4… means Authorization failed or parameters are missing/empty)
guidUnique Identifier ID for TransactionStore this in your DB for verification (if required)
messageMessage describing the return codeAll possible message from our servers
General (for testnet/mainet both)
- You are not authorized to perform this Action
- No data found. Please enter data to be submitted in the blockchain transaction
- Add data in blockchain limit exceeded. Maximum characters allowed=2000 (with spaces)
- Hash does not matched
- Internal server error occured
- Data submitted successfully.
Mainnet only
- Mainnet wallet not found.
- You are not mapped to Blockchain Trigger template or Blockhaintype.
- You have insufficient balance to generate any more QR codes. Please contact admin@veridocglobal.com to request more credit.