# Step 1: Upload & quality check
curl -X POST https://api.osiar.my.id/v1/upload \
-u "pk_live_xxx:sk_live_xxx" \
-F "file=@invoice.jpg" \
-F "template_id=019abc..."
# → { "file_ids": ["019756a2..."], "status": "ready", "quality_score": 0.92 }
# Step 2: Extract
curl -X POST https://api.osiar.my.id/v1/extract \
-u "pk_live_xxx:sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "template_id": "019abc...", "file_ids": ["019756a2..."] }'
// Response:
{
"data": {
"nik": "3201234567890001",
"name": "JOHN DOE",
"birth_date": "01-01-1990"
},
"confidence": 0.95
}POST /v1/upload
Content-Type: multipart/form-data
image: (file)
template_id: "019abc..."
→ { "file_ids": ["..."], "status": "ready" }POST /v1/extract
{
"template_id": "019abc...",
"file_ids": ["019756a2..."]
}POST /v1/workflows/:id/execute
{
"file_ids": ["019756a2..."],
"route": "pln"
}