doc. review_ decide
Approve extracted data with optional corrections, or reject it.
0 credits. Free. The user decides, or the user's agent when the user allows it.
Example prompt
Send this to your AI app when Heelo is connected:
The total is wrong: it is $1,393.20. Approve the extracted values with that correction.
Input fields
| Field | Type | Description |
|---|---|---|
review_idRequired | string | The review.id that doc.extract_fields returned. |
decisionRequired | string | approve | reject |
decided_byRequired | string | Who decided: the name of the person, or of the agent. |
corrections | object | Field name -> the right value, for an approval. Typed and checked like extracted values. |
note | string | Why, in a sentence. |
end_user_id | string | The end user the extraction was made for, if any. |
Output fields
The fields in data when status is success.
| Field | Type |
|---|---|
review_id | string |
status | string |
decided_by | string |
decided_at | string |
use_by | string |
values | object |
checks | array of object |
answer | string |
Code
The call with the input fields that the tool needs. Replace each word in capitals, such as REVIEW_ID. Set HEELO_API_KEY to your API key.
import os
import requests
response = requests.post(
"https://toolsprimitives.uk/v1/tools/doc.review_decide/invoke",
headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
json={"input": {
"review_id": "REVIEW_ID",
"decision": "approve",
"decided_by": "DECIDED_BY",
}},
timeout=120,
)
response.raise_for_status()
print(response.json())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/doc.review_decide/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"review_id": "REVIEW_ID",
"decision": "approve",
"decided_by": "DECIDED_BY"
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());