Key Extraction v3 · ตัวอย่าง
ใบเสร็จ
ใบเสร็จร้านค้าและสลิป — วันที่ ยอดสุทธิ ช่องทางชำระ และรายการสินค้า พร้อม bbox
data_schema
json
{"type": "object","additionalProperties": false,"properties": {"merchant": { "type": "string", "description": "ชื่อร้านหรือสาขา" },"datetime": { "type": "string", "description": "วันที่และเวลาออกใบเสร็จ" },"total": { "type": "number", "description": "จำนวนเงินที่ชำระ" },"vat": { "type": "number", "description": "ภาษีมูลค่าเพิ่ม ถ้ามี" },"payment_method": { "type": "string", "description": "เงินสด บัตร QR หรือโอน" },"items": {"type": "array","items": {"type": "object","properties": {"name": { "type": "string" },"amount": { "type": "number" }}}}}}
Request ย่อ
bash
FILE_ID=$(curl -sS -X POST 'https://backend.aksonocr.com/api/v3/key-extract/files' \-H 'X-API-Key: <YOUR_API_KEY>' \-F '[email protected]' | jq -r '.files[0].id')curl -sS -X POST 'https://backend.aksonocr.com/api/v3/key-extract/jobs' \-H 'X-API-Key: <YOUR_API_KEY>' \-H 'Content-Type: application/json' \-H 'Idempotency-Key: receipt-001' \-d "{\"inputs\": [{ \"file_id\": \"$FILE_ID\" }],\"data_schema\": {\"type\": \"object\",\"properties\": {\"merchant\": { \"type\": \"string\" },\"total\": { \"type\": \"number\" }}},\"output\": { \"evidence\": \"bbox\" }}"