code
REST API v1
开发者API
将区块链认证和可追溯性集成到您的应用程序中。完整的文档和使用示例。
Base URL:
https://api.proovik.com/v1
verified
认证
在区块链上盖章文件
POST
/certify
认证文件
提交要记录在Kaspa区块链上的文件哈希。返回交易ID和证书数据。
#
请求
curl -X POST https://api.proovik.com/v1/certify \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "hash": "e3b0c44298fc1c149afbf4c8996fb924...", "filename": "contract.pdf", "metadata": {"client": "Acme Corp"} }'
GET
/verify/{hash}
验证文件
检查文件哈希是否存在于区块链上并返回其认证详情。
#
响应
{
"verified": true,
"txid": "abc123...",
"timestamp": "2026-01-06T12:00:00Z",
"block_hash": "...",
"merkle_proof": [...]
}
conversion_path
可追溯性
具有哈希链的保管链
POST
/trace/batch
创建批次
创建一个新的产品批次进行跟踪。返回后续事件的唯一批次ID。
{
"batch_id": "BATCH-2026-001",
"product": "Organic Olive Oil",
"origin": "Jaén, Spain",
"metadata": {...}
}
POST
/trace/event
添加事件
向批次链添加新事件。通过哈希链自动链接到上一个事件。
{
"batch_id": "BATCH-2026-001",
"event_type": "HARVEST",
"evidence_hash": "sha256:...",
"location": { "lat": 37.77, "lng": -3.79 },
"data": { "weight_kg": 500, "quality": "A" }
}
info
该事件自动链接到上一个TXID,创建一个不可破坏的序列。
GET
/trace/batch/{batch_id}
获取批次历史
返回批次的完整事件链,以及每个事件的区块链验证状态。
{
"batch": {...},
"events": [
{ "type": "SOWING", "txid": "...", "verified": true },
{ "type": "HARVEST", "txid": "...", "verified": true },
{ "type": "TRANSPORT", "txid": "...", "verified": true }
],
"chain_valid": true
}
webhook
Webhooks
实时通知
当交易在区块链上确认时接收即时通知。
certification.confirmed
文件已认证
trace.event.confirmed
可追溯性事件已确认
SDKs
🐍
Python
即将推出
🟨
JavaScript
即将推出
🐘
PHP
即将推出
🔵
Go
即将推出