Quickstart#

This is the fastest way to go from console to working API.

You will:

  1. Create a project
  2. Create a contract from template
  3. Deploy it
  4. Call one invoke and one query endpoint

Base URL:

https://api.velarics.com/v1

What you need#

  • Console access
  • One deployed contract
  • Runtime API key from the project

Use these placeholders:

  • YOUR_PROJECT_ID
  • YOUR_CONTRACT_ID
  • YOUR_API_KEY

1. Create project (UI)#

In console:

  • Open Projects
  • Click Create Project
  • Enter a name, for example SupplyChain Demo
  • Save

2. Create contract from template (UI)#

In the same project:

  • Open Contracts
  • Click Create Contract
  • Select template Asset Tracking
  • Name it AssetContract
  • Click Create

3. Deploy (UI)#

In contract page:

  • Open Deployments
  • Click Deploy
  • Wait until status becomes Active

When active, open Functions tab and copy:

  • projectId
  • contractId
  • Endpoint names

4. Call runtime API#

Invoke CreateAsset:

bash
curl -X POST https://api.velarics.com/v1/projects/YOUR_PROJECT_ID/contracts/YOUR_CONTRACT_ID/invoke/CreateAsset \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "params": {
      "id": "asset-1001",
      "owner": "alice"
    }
  }'

Query GetAsset:

bash
curl -X GET "https://api.velarics.com/v1/projects/YOUR_PROJECT_ID/contracts/YOUR_CONTRACT_ID/query/GetAsset?id=asset-1001" \
  -H "X-API-Key: YOUR_API_KEY"

Expected result#

  • CreateAsset returns status: committed
  • GetAsset returns status: evaluated
  • Response includes the asset you created

What just happened#

  • You created everything from the UI.
  • Velarics generated runtime endpoints for your deployed contract.
  • You wrote data with invoke and read it with query.