curl --request POST \
--url https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"app_id": "app_abc123",
"rule_name": "Invoice human review",
"rule_status": true,
"rule": [
{
"rule_dimension": "Invoice number",
"rule_setting": "Equals 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: 'Invoice human review',
rule_status: true,
rule: [{rule_dimension: 'Invoice number', rule_setting: 'Equals INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch('https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create"
payload = {
"app_id": "app_abc123",
"rule_name": "Invoice human review",
"rule_status": True,
"rule": [
{
"rule_dimension": "Invoice number",
"rule_setting": "Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
.asString();const url = 'https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: 'Invoice human review',
rule_status: true,
rule: [{rule_dimension: 'Invoice number', rule_setting: 'Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create"
payload := strings.NewReader("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create");
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\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create",
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' => 'Invoice human review',
'rule_status' => true,
'rule' => [
[
'rule_dimension' => 'Invoice number',
'rule_setting' => 'Equals 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
}
}
]
}Create collaboration rule
Create conditions that route extraction results to human review.
curl --request POST \
--url https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"app_id": "app_abc123",
"rule_name": "Invoice human review",
"rule_status": true,
"rule": [
{
"rule_dimension": "Invoice number",
"rule_setting": "Equals 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: 'Invoice human review',
rule_status: true,
rule: [{rule_dimension: 'Invoice number', rule_setting: 'Equals INV-AUDIT-001'}],
rule_logic: 1
})
};
fetch('https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create"
payload = {
"app_id": "app_abc123",
"rule_name": "Invoice human review",
"rule_status": True,
"rule": [
{
"rule_dimension": "Invoice number",
"rule_setting": "Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals INV-AUDIT-001\"\n }\n ],\n \"rule_logic\": 1\n}")
.asString();const url = 'https://adp-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create';
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: 'app_abc123',
rule_name: 'Invoice human review',
rule_status: true,
rule: [{rule_dimension: 'Invoice number', rule_setting: 'Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create"
payload := strings.NewReader("{\n \"app_id\": \"app_abc123\",\n \"rule_name\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create");
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\": \"Invoice human review\",\n \"rule_status\": true,\n \"rule\": [\n {\n \"rule_dimension\": \"Invoice number\",\n \"rule_setting\": \"Equals 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-global.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/collaboration/rules/create",
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' => 'Invoice human review',
'rule_status' => true,
'rule' => [
[
'rule_dimension' => 'Invoice number',
'rule_setting' => 'Equals 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
}
}
]
}Authorizations
Production API Key. You can find it under My API in the ADP platform. Make sure the API Key is active and belongs to the production environment.
Path Parameters
Tenant name. Default: laiye.
Body
Application ID. Use the actual ID of a published standard custom extraction application owned by the current account.
"app_abc123"
Rule name. The current service allows at most 50 characters and requires unique names across applications under the same account.
1 - 50Review trigger conditions, 1–100 items.
1 - 100 elementsShow child attributes
Show child attributes
Whether the rule is enabled. Use false to disable it. The query endpoint may still return true; verify the effect with an extraction run.
1=any condition matches (OR); 2=all conditions match (AND). Send only 1 or 2; other values may currently be accepted incorrectly.
1, 2