# CommercioAPI introduction
CommercioAPI is a RESTful web service that allows anyone to create transactions with the set of permitted messages on the commercio.network Blockchain and to query it.
# Getting Started
In order to operate with the CommercioAPI two environements are available
- Develop & Test: to test the API and get familiar with the system in the Test-net
- Official: to operate with the real CommercioAPI in the Main-net
The following services are envolved with the CommercioAPI usage
- Web App: to obtain and manage your membership, generate and manage your hostedwallet, get your account address, see the accountability of your transactions
- CommercioAPI base url: to have access to the documentation of the Web RESTful services and interact with the API in the proper subpath
- IDM(OpenID): The IDentity Management service to be used for proper auhentication in the APIs services
- Explorer: The web application "Almerico" that permits to get the transaction information from the Commercio.network blockchain ledger
These are the endpoints of the services in the Develop & Test environment and Official (Production) one.
|Develop & Test||Official||Note|
|dev-api.commercio.app/v1/ (opens new window)||api.commercio.app/v1/ (opens new window)||CommercioAPI base url|
|dev-api.commercio.app/v1/swagger/index.html (opens new window)||api.commercio.app/v1/swagger/index.html (opens new window)||Swagger|
|devlogin.commercio.app/auth/realms/commercio/protocol/openid-connect/token||login.commercio.app/auth/realms/commercio/protocol/openid-connect/token||IDM(OpenID) authentication URL|
# Develop & Test
Is a playground where everyone can test the characteristics of the commercio.network blockchain.
Memberships can be bought once registered using a sandbox credit card provided by Stripe
In the https://testnet.commercio.network chain, a tool that allows to recharge a wallet (with COM token) is available.
A destination address (
addr) and the amount to be recharged with (
amount expressed in ucommercio) must be provided to the faucet endpoint (https://faucet-testnet.commercio.network/give).
Suppose you want to recharge with
10 COM your wallet address
This is the request you need to make:
amount : There is a limit in the amount value of
ATTENTION : A
faucet for CCC is not available. The Buy function (
coming soon) in the dev.commercio.app must be used
Is the real-world environment where real credit card transactions are requested and real tokens (COM and CCC) are spent
To use the APIs you need to:
- Register and Login on the web App (dev.commercio.app or commercio.app)
- Own a valid membership (Bronze,Silver,Gold) and get your
ID account(or your own wallet address, e.g. :
- Own enough CCCs (Commerce Cash Credits) to pay for the transaction fees.
# CommercioAPIs overview
Brief overview of the available functions. Refer to the specific APIs guide for more details.
For any support or questions regarding the APIs or the documentation, please open an Issue
# Swagger environement
In the CommercioAPI base url in the path
/swagger/ the documentation of the set of released API is available, and a Tryout is possible through the Swagger interface.
NB: Any Examples in the documentation refers to the Develop & Test environement
# Hint : Basic Client for Major script Languages
openapi.yaml file from the Swagger interface page you can upload it in the https://editor.swagger.io/ (opens new window)
Using the Generate Client menu you can obtain a basic stack software for the language you choose
# Authentication process
In order to gain proper access to the API an authetication process should be performed.
- AUTHORIZE : Permit to authenticate through the IDM and get permission to API usage
# Available API
The following APIs are available
ID (coming next): the eID. To Create and manage Self Sovereign Identities
SIGN (coming next) : the eSignature. to Electronically Sign any PDF e XML digital document