A schema guarantees every run returns a predictable JSON payload.
Field types
- Text: freeform string, useful for names and addresses.
- Number: decimal-safe, accepts locale formatting and normalizes to floats.
- Currency: returns
{ amount, currency }pairs. - Table: nested rows with typed columns.
- Enum: restricts to a list of values; handy for status codes.
Configure these in Studio → Processor → Schema or via the API.
curl -X PUT https://api.algorythmos.fr/processors/invoice-extractor/schema \
-H "x-api-key: $ALG_KEY" \
-H "Content-Type: application/json" \
-d '{
"fields": [
{"name":"invoice_total","type":"currency"},
{"name":"due_date","type":"date"},
{"name":"line_items","type":"table","columns":[
{"name":"description","type":"text"},
{"name":"quantity","type":"number"},
{"name":"unit_price","type":"currency"}
]}
]
}'Validation hooks
- Enable strict typing to coerce numbers and dates.
- Use required flags to block incomplete extractions.
- Subscribe to schema drift alerts via Console → Settings → Alerts to catch unexpected fields.