修改人机协同规则
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"app_id": "app_abc123",
"rule_name": "发票人工审核",
"rule_status": true,
"rule": [
{
"rule_dimension": "发票号码",
"rule_setting": "等于 INV-AUDIT-001"
}
],
"rule_logic": 1
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: '发票人工审核',
rule_status: true,
rule: [{rule_dimension: '发票号码', rule_setting: '等于 INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update"
payload = {
"app_id": "app_abc123",
"rule_name": "发票人工审核",
"rule_status": True,
"rule": [
{
"rule_dimension": "发票号码",
"rule_setting": "等于 INV-AUDIT-001"
}
],
"rule_logic": 1
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: '发票人工审核',
rule_status: true,
rule: [{rule_dimension: '发票号码', rule_setting: '等于 INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update"
payload := strings.NewReader("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'app_id' => 'app_abc123',
'rule_name' => '发票人工审核',
'rule_status' => true,
'rule' => [
[
'rule_dimension' => '发票号码',
'rule_setting' => '等于 INV-AUDIT-001'
]
],
'rule_logic' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "success",
"message": "",
"tips": null,
"data": {}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}人机协同
更新协同规则
更新抽取应用的人工审核触发规则及启停配置。
POST
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
collaboration
/
rules
/
update
修改人机协同规则
curl --request POST \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"app_id": "app_abc123",
"rule_name": "发票人工审核",
"rule_status": true,
"rule": [
{
"rule_dimension": "发票号码",
"rule_setting": "等于 INV-AUDIT-001"
}
],
"rule_logic": 1
}
'const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: '发票人工审核',
rule_status: true,
rule: [{rule_dimension: '发票号码', rule_setting: '等于 INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update"
payload = {
"app_id": "app_abc123",
"rule_name": "发票人工审核",
"rule_status": True,
"rule": [
{
"rule_dimension": "发票号码",
"rule_setting": "等于 INV-AUDIT-001"
}
],
"rule_logic": 1
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: '发票人工审核',
rule_status: true,
rule: [{rule_dimension: '发票号码', rule_setting: '等于 INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update"
payload := strings.NewReader("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
request.AddJsonBody("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"发票人工审核\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"发票号码\",\n \"rule_setting\": \"等于 INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'app_id' => 'app_abc123',
'rule_name' => '发票人工审核',
'rule_status' => true,
'rule' => [
[
'rule_dimension' => '发票号码',
'rule_setting' => '等于 INV-AUDIT-001'
]
],
'rule_logic' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "success",
"message": "",
"tips": null,
"data": {}
}{
"detail": [
{
"type": "greater_than",
"loc": [
"query",
"limit"
],
"msg": "Input should be greater than 0",
"input": 0,
"ctx": {
"gt": 0
}
}
]
}保存后请查询规则并验证实际行为,参见人机协同。
授权
生产环境 API Key,可在 ADP 平台的「我的 API」中查看。请确保 API Key 有效且属于生产环境。
路径参数
租户名称,默认 laiye。
请求体
application/json
应用 ID。请使用当前账号已发布的标准自定义抽取应用的实际 ID。
示例:
"app_abc123"
规则名称。当前最多 50 个字符,同一账号下跨应用不能重名。
Required string length:
1 - 50审核触发条件列表,1–100 条。
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
是否启用规则。false 用于停用;查询接口当前可能仍返回 true,需通过实际抽取核验启停效果。
1=任一条件命中(OR);2=所有条件命中(AND)。只传 1 或 2,其他值当前可能被误接受。
可用选项:
1, 2