Skip to main content
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
tables
/
add
Add Single File Category Table
curl --request POST \
  --url https://docflow.textin.com/api/app-api/sip/platform/v2/category/tables/add \
  --header 'Content-Type: application/json' \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>' \
  --data '
{
  "workspace_id": "1234567890",
  "category_id": "1234567890",
  "name": "Table 1",
  "prompt": "Extract item name, quantity and amount from each row",
  "collect_from_multi_table": true,
  "extract_model": "Model 1",
  "with_detail": true
}
'
{
  "code": 200,
  "msg": "<string>",
  "result": {
    "table_id": "1234567890",
    "name": "<string>",
    "description": "<string>",
    "prompt": "<string>",
    "collect_from_multi_table": true,
    "extract_model": "<string>",
    "fields": [
      {
        "name": "Invoice Code",
        "description": "Invoice code description",
        "prompt": "<string>",
        "use_prompt": true,
        "alias": [
          "Invoice No.",
          "Bill Number"
        ],
        "identity": "invoice_number",
        "multi_value": true,
        "duplicate_value_distinct": true,
        "transform_settings": {
          "datetime_settings": {
            "format": "yyyy-MM-dd"
          },
          "enumerate_settings": {
            "items": [
              "VAT Special Invoice",
              "VAT General Invoice",
              "Electronic Invoice"
            ]
          },
          "regex_settings": {
            "match": "^(\\d{4})-(\\d{2})-(\\d{2})$",
            "replace": "$1/$2/$3"
          },
          "mismatch_action": {
            "default_value": "N/A"
          }
        },
        "id": "1234567890",
        "extract_model": "Model 1"
      }
    ]
  }
}

Authorizations

x-ti-app-id
string
header
required
x-ti-secret-code
string
header
required

Body

application/json
workspace_id
string
required

Workspace ID

Example:

"1234567890"

category_id
string
required

File category ID

Example:

"1234567890"

name
string
required

Table name

Maximum string length: 50
Example:

"Table 1"

prompt
string

Table semantic extraction prompt

Maximum string length: 200
Example:

"Extract item name, quantity and amount from each row"

collect_from_multi_table
boolean

Merge multiple tables

Example:

true

extract_model
enum<string>

Table-level extraction model

  • Model 1: Fast speed with stable extraction results
  • Model 2: Suitable for complex document understanding
  • Model 3: VLM, suitable for simple extraction
Available options:
Model 1,
Model 2,
Model 3
Example:

"Model 1"

with_detail
boolean

Whether to return full details. When true, the response includes complete table info (with field list). When not set or false, only table_id is returned.

Response

200 - application/json

Successfully added file category table

code
integer
required

Status code

Example:

200

msg
string
required

Status description

result
object