跳转到主要内容
POST
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
app
/
doc
/
extract
/
create
/
task
创建海外票据抽取异步任务
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    app_id: 'app_abc123',
    file_url: 'https://example.com/invoice.pdf',
    with_rec_result: false
  })
};

fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/extract/create/task', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "code": "<string>",
  "message": "<string>",
  "tips": "<string>",
  "data": {
    "task_id": "<string>"
  }
}

授权

X-API-KEY
string
header
必填

请求头

accept-language
enum<string>
默认值:zh

返回字段名称的语言。默认 zh 返回中文字段名;设置为 en 返回英文字段名。

可用选项:
zh,
en

路径参数

tenant_name
string
默认值:laiye
必填

租户名称,默认 laiye。

请求体

application/json
app_id
string
必填

预置应用的唯一标识。

file_base64
string
必填

待抽取文件 Base64,与 file_url 二选一。

file_url
string<uri>

待抽取文件 URL,与 file_base64 二选一。

with_rec_result
boolean
默认值:false

是否返回文档解析结果。

响应

任务创建结果。

code
message
string
tips
string | null
data
object