Skip to Content
Documents

Run field detection on a document

POST
/api/v1/documents/{id}/detect

Authorization

bearerAuth
headerAuthorizationBearer <token>

Workspace API key, e.g. "Authorization: Bearer aflo_live_<64 hex chars>". Keys are hashed at rest and shown only once at creation. A key has scopes: read (GET routes), draft (create or change documents, fields and templates) and send (send, void, remind and bulk send); a call outside them gets 403 insufficient_scope. A key may expire (401 api_key_expired). Keys made before scopes existed have full access.

Path Parameters

id*string

Document id.

Header Parameters

Idempotency-Key?string

A client-generated key scoping this request as a retry of a prior identical request. A replay within 24h returns the first response instead of repeating the side effect (e.g. a second send). The key is bound to the request it was first used with: the same key with a different body or target is refused (422, code idempotency_key_reused).

Lengthlength <= 255

Response Body

Detected fields. vision_skipped=true means the result is partial (monthly AI-reading limit reached).

application/json
  1. response
success*boolean
data*
Example Request
curl -X POST 'https://appliflo.com/api/v1/documents/string/detect'
Example Response
{  "success": true,  "data": {    "fields": [      {        "id": "string",        "page": 0,        "bbox": [          0,          0,          0,          0        ],        "type": "string",        "label_text": "string",        "semantic_type": "date",        "format": "string",        "comb": {          "cells": 0        },        "multiline": true,        "confidence": 0,        "flagged": true,        "source": "acroform",        "recipient_id": "string",        "group_id": "string",        "option_value": "string",        "option_label": "string",        "section": "string",        "label_source": "page_text",        "role_hint": "string",        "help": "string"      }    ],    "groups": [      {        "id": "string",        "label": "string",        "kind": "single",        "min": 0,        "max": 0,        "instruction": "string",        "confidence": 0,        "source": "radio",        "section": "string",        "options": [          {            "field_id": "string",            "value": "string",            "label": "string"          },          {            "field_id": "string",            "value": "string",            "label": "string"          }        ]      }    ],    "flagged_count": 0,    "vision_skipped": true,    "vision_pages": 0,    "ai_pages": {      "used": 0,      "limit": 0,      "remaining": 0,      "exhausted": true,      "resets_at": "2019-08-24T14:15:22Z"    }  }}