Introduction

This documentation is a reference guide for the implementation of all Tetrium's APIs. Developers making API calls should have a developer account with Tetrium. You may sign up a free developer account at https://dashboard.tetrium.io. Tetrium works exclusively through RESTful APIs.


URL Prefix

All API calls must be prefixed with the following domain URL:

https://api.tetrium.io/tokenize

API Call Header

You must include your API Token in all of your API call header in the format below (You may retrieve your API Token from your dashboard):

api-token : Your-API-Token

This is to:

  • Ensure only developers with active accounts are allowed to make any API calls.
  • Track usage for billing purposes (except for GET calls).
  • Provide analytics tracking.

Any API calls without a valid call header will be rejected by Tetrium.

Please take note that additional call headers may be required by certain API calls. Please refer to the individual API documents for details.


API Call Type

Only four types of API calls exist in Tetrium:

  • GET calls
  • POST calls
  • PUT calls
  • DELETE calls

All POST calls (except GET calls) may have a request body with parameters (inputs) in JSON format as shown below:

{
    "passphrase":"ywbat5567jGGH"
}

API Call Response

All Tetrium API calls shall return a response message in JSON format. The following is an example of a response message:

{
   "status":"success",
   "message":"wallet generated",
   "walletInformation":{
      "mnemonics":"industry fossil shove certain rail hold mix ostrich tongue minor hotel affair",
      "walletAddress":"0xc7731ba1b2cfb4e5fdbce6492928a7c7787e211e",
      "walletKey":"ece36969cf09e9a4527c37cac6b7597d5b038dc8a5b8ab25f6e4d1a0eb90f31c"
   }
}

Any API call that returns a response that contains a transactionHash is a transaction that requires sealing by Tetrium. An example of this is shown below:

{
   "status":"success",
   "message":"create-currency initiated",
   "transactionHash":"0x5ff710ede5f75f07002f6b3b4f3298159ae05bf6d6ce81d21af8c111e03f8c51"
}

Sealing is a blockchain process that ensures transactions to be immutable and irreversible once completed. Sealing in Tetrium usually takes 3 seconds to complete and a check on its status is very important before you can conclude that your transaction has been completely finalised.

You may verify any transaction status through the check-transaction-status API.

results matching ""

    No results matching ""