跳转到主要内容
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
sample
/
upload
上传单个类别样本
curl --request POST \
  --url https://docflow.textin.com/api/app-api/sip/platform/v2/category/sample/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>' \
  --form workspace_id=1234567890 \
  --form category_id=1234567890 \
  --form file='@example-file' \
  --form with_detail=true
{
  "code": 200,
  "msg": "<string>",
  "result": {
    "sample_id": "1234567890",
    "samples": [
      {
        "sample_id": "1234567890",
        "file_name": "invoice_sample.pdf"
      }
    ]
  }
}

授权

x-ti-app-id
string
header
必填
x-ti-secret-code
string
header
必填

请求体

multipart/form-data
workspace_id
string
必填

空间ID

示例:

"1234567890"

category_id
string
必填

文件类别ID

示例:

"1234567890"

file
file
必填

样本文件

with_detail
boolean

是否返回完整详情。传 true 时响应额外返回该分类的全部样本列表。 不传或为 false 时仅返回 sample_id。

响应

200 - application/json

成功上传类别样本

code
integer
必填

状态码

示例:

200

msg
string
必填

状态描述

result
object