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.
| Item | Description |
|---|---|
| Provider End Point URI | https://my.veridocglobal.com/api/blockchaintxtrigger |
| Interface description | Allow to trigger a new blockchain transaction |
| Mode of Interface | RESTFUL API (JSON) |
| Security | Authorization Header: Access Key |
| Supports Multi-Records | No |
| Method(s) | POST |
| Request Body Content-Type | Application/JSON |
Sample blockchain-tx-trigger request header:
Content-Type: application/x-www-form-urlencodedContent-Length: 0apikey: < 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 Name | Description | Mandatory | Comments |
|---|---|---|---|
| blockchaindata | Data/UHV string to be sent to blockchain | Yes | Maximum characters allowed: 2000 characters (with spaces) |
| Ischild | 0 or 1 0 means it is a parent Transaction Trigger/ independent transaction 1 means it is child QR code | No | If 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 Name | Description | Mandatory | Comments |
|---|---|---|---|
| returncode | Refers to the status | 1 - Success Any other returncode (e.g. 2,3,4… means Authorization failed or parameters are missing/empty) | |
| guid | Unique Identifier ID for Transaction | Store this in your DB for verification (if required) | |
| message | Message describing the return code | All 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. |