Skip to main content
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
fields
/
add
Add File Category Field
curl --request POST \
  --url https://docflow.textin.com/api/app-api/sip/platform/v2/category/fields/add \
  --header 'Content-Type: application/json' \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>' \
  --data '
{
  "name": "Invoice Code",
  "workspace_id": "1234567890",
  "category_id": "1234567890",
  "description": "Invoice code description",
  "prompt": "<string>",
  "use_prompt": true,
  "alias": [
    "<string>"
  ],
  "identity": "<string>",
  "multi_value": true,
  "duplicate_value_distinct": true,
  "transform_settings": {
    "type": "datetime",
    "datetime_settings": {
      "format": "yyyy-MM-dd HH:mm:ss"
    },
    "enumerate_settings": {
      "items": [
        "<string>"
      ]
    },
    "regex_settings": {
      "match": "^\\d{4}-\\d{2}-\\d{2}$",
      "replace": "$1-$2-$3"
    },
    "mismatch_action": {
      "mode": "default",
      "default_value": "<string>"
    }
  },
  "table_id": "1234567890"
}
'
{
  "code": 200,
  "msg": "<string>",
  "result": {
    "field_id": "1234567890"
  }
}

Authorizations

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

Body

application/json
name
string
required

Field name

Example:

"Invoice Code"

workspace_id
string
required

Workspace ID

Example:

"1234567890"

category_id
string
required

File category ID

Example:

"1234567890"

description
string

Field description

Example:

"Invoice code description"

prompt
string

Semantic extraction prompt

use_prompt
boolean

Whether to use semantic prompt

alias
string[]

Field aliases

identity
string

Export field name

multi_value
boolean

Whether to extract multiple values

duplicate_value_distinct
boolean

Whether to deduplicate repeated values, only effective when multi_value is true

transform_settings
object

Transformation settings

table_id
string

Table ID

  • Not passed or empty: Create regular field, result will appear in result.fields
  • Pass table ID: Create table field under the corresponding table, result will appear in result.tables[].fields
Example:

"1234567890"

Response

200 - application/json

Successfully added file category field

code
integer
required

Status code

Example:

200

msg
string
required

Status description

result
object