POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
file
/
upload
cURL
curl -X POST \
-H 'x-ti-app-id: 1234567890' \
-H 'x-ti-secret-code: 1234567890' \
-F 'file=@invoice.pdf'
-F 'file=@another.pdf'
'https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload?workspace_id=1234567890&category=invoice&batch_number=202412190001'
{
  "code": 200,
  "message": "<string>",
  "result": {
    "batch_number": 202412190001,
    "files": [
      {
        "id": 202412190001,
        "name": "invoice.pdf",
        "format": "pdf"
      }
    ]
  }
}

Authorizations

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

Query Parameters

workspace_id
string
required

空间ID

Example:

1234567890

category
string

文件类别

Example:

"invoice"

batch_number
string

批次编号。
可以用同一个批次编号上传多次,后续可以用批次编号获取该批次多个文件处理结果。
如果值为空,则系统自动生成最长20位字符串

Example:

202412190001

auto_verify_vat
boolean
default:false

是否自动进行发票验真

split_flag
boolean
default:false

是否进行文件拆分

crop_flag
boolean
default:false

是否进行多图切分

target_process
enum<string>

目标处理类型。
可选值:

  • classify: 分类
  • extract: 抽取
Available options:
classify,
extract
Example:

"classify"

Body

multipart/form-data

Response

200 - application/json

文件上传成功

The response is of type object.