Skip to main content
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
tables
/
batch_add
Add File Category Tables
curl --request POST \
  --url https://docflow.textin.com/api/app-api/sip/platform/v2/category/tables/batch_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",
  "tables": [
    {
      "name": "Detail Table",
      "prompt": "<string>",
      "collect_from_multi_table": true,
      "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"
            }
          }
        }
      ]
    }
  ],
  "with_detail": true
}
'
{
  "code": 200,
  "msg": "<string>",
  "result": [
    {
      "table_id": "<string>",
      "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"

tables
object[]
required

List of tables to add

Minimum array length: 1
with_detail
boolean

Whether to return full details for each table (with field list)

Response

200 - application/json

Successfully added tables

code
integer
required

Status code

Example:

200

msg
string
required

Status description

result
object[]

Creation result list, in same order as request