Accounts Payable Endpoint Reference
Reference for 21 Accounts Payable endpoints of the Talonic API: parameters, request body, curl and Node.js examples, response and errors.
Reads the supplier bills a workspace already captured into posting-ready vendor bills (vendor, entity, terms, due date, lines with account, department and class) and splits them into ready and held, with the dollars at stake. A simulated NetSuite sandbox shows the exact records a posting sends and posts them without calling NetSuite. These endpoints belong to the Accounts Payable app (catalog slug payables); they return 404 in a workspace that has not added the app — GET /v1/apps lists a workspace's apps by slug.
Every request needs an API key in the Authorization: Bearer header. Examples read the key from the TALONIC_API_KEY environment variable.
/v1/ap/riskcurl
curl -X GET 'https://api.talonic.com/v1/ap/risk' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/risk", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The risk matrix.
{
"currency": "string",
"defaults": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"overrides": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"settings": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"matrix": {}
}/v1/ap/riskRequest body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/ap/risk' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"risk": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
}
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/risk", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"risk": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The risk matrix as saved.
{
"currency": "string",
"defaults": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"overrides": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"settings": {
"likelihood": {},
"impact": {
"high": 1.5,
"medium": 1.5
}
},
"matrix": {}
}- 400 — The request is invalid.
/v1/ap/tolerancecurl
curl -X GET 'https://api.talonic.com/v1/ap/tolerance' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/tolerance", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The tolerance.
{
"value_tolerance_pct": 1.5,
"default": 1.5
}/v1/ap/toleranceRequest body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/ap/tolerance' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"value_tolerance_pct": 1.5
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/tolerance", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"value_tolerance_pct": 1.5
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The tolerance as saved.
{
"value_tolerance_pct": 1.5,
"default": 1.5
}- 400 — The request is invalid.
/v1/ap/rules/checks/approveRequest body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/checks/approve' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/checks/approve", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — How many rules changed.
{
"approved": 1
}- 400 — The request is invalid.
/v1/ap/dossiercurl
curl -X GET 'https://api.talonic.com/v1/ap/dossier' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/dossier", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The choice and the options.
{
"selected": {
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"columns": {
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_number": "string",
"contract_number": "string",
"invoice_number": "string",
"document_type": "string",
"order_value": "string",
"document_date": "string",
"order_conditions": "string",
"contract_conditions": "string",
"valid_until": "string"
},
"order_type": "string",
"contract_value": 1.5,
"contract_type": "string"
},
"state": "none",
"specs": [
{
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"columns": [
"string"
]
}
]
}/v1/ap/dossierRequest body (application/json)
curl
curl -X PUT 'https://api.talonic.com/v1/ap/dossier' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dossier": {
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"columns": {
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_number": "string",
"contract_number": "string",
"invoice_number": "string",
"document_type": "string",
"order_value": "string",
"document_date": "string",
"order_conditions": "string",
"contract_conditions": "string",
"valid_until": "string"
},
"order_type": "string",
"contract_value": 1.5,
"contract_type": "string"
}
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/dossier", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"dossier": {
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"columns": {
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_number": "string",
"contract_number": "string",
"invoice_number": "string",
"document_type": "string",
"order_value": "string",
"document_date": "string",
"order_conditions": "string",
"contract_conditions": "string",
"valid_until": "string"
},
"order_type": "string",
"contract_value": 1.5,
"contract_type": "string"
}
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The choice as saved and the options.
{
"selected": {
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"columns": {
"supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"order_number": "string",
"contract_number": "string",
"invoice_number": "string",
"document_type": "string",
"order_value": "string",
"document_date": "string",
"order_conditions": "string",
"contract_conditions": "string",
"valid_until": "string"
},
"order_type": "string",
"contract_value": 1.5,
"contract_type": "string"
},
"state": "none",
"specs": [
{
"schema_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"columns": [
"string"
]
}
]
}- 400 — The request is invalid.
/v1/ap/rulescurl
curl -X GET 'https://api.talonic.com/v1/ap/rules' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 200 — The batches.
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"created_at": "2026-01-15T09:30:00Z",
"files": [
{
"document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"filename": "string",
"status": "string",
"rules_status": "string",
"error": "string",
"rule_count": 1
}
],
"rules": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"text": "string",
"obligation": "string",
"source_quote": "string",
"origin": "string"
}
]
}
]/v1/ap/rules/batchesRequest body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/batches' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"name": "string"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/batches", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"document_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"name": "string"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 201: no JSON bodyResponse 201: The batch.
- 404 — The requested resource was not found.
/v1/ap/rules/batches/{id}Path parameters
curl
curl -X DELETE 'https://api.talonic.com/v1/ap/rules/batches/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/batches/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 200: no JSON bodyResponse 200: Removed.
- 404 — The requested resource was not found.
/v1/ap/rules/batches/{id}/rulesPath parameters
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/batches/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/batches/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"text": "string"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 201: no JSON bodyResponse 201: The rule.
- 404 — The requested resource was not found.
/v1/ap/rules/rules/{ruleId}Path parameters
curl
curl -X DELETE 'https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
-H "Authorization: Bearer $TALONIC_API_KEY"Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6", {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 200: no JSON bodyResponse 200: Removed.
- 404 — The requested resource was not found.
/v1/ap/rules/effectsRequest body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/effects' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"effect": "condition"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/effects", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"effect": "condition"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 201: no JSON bodyResponse 201: Saved.
- 404 — The requested resource was not found.
/v1/ap/rules/rules/{ruleId}/effectPath parameters
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/effect' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"effect": "condition"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/effect", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"effect": "condition"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 201: no JSON bodyResponse 201: Saved.
- 404 — The requested resource was not found.
/v1/ap/intakeRequest body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/intake' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/intake", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"dry_run": true
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — What was added.
{
"pipeline_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"added": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}- 400 — The request is invalid.
- 403 — The API key does not have the required scope.
/v1/ap/bills/acceptRequired scope: write
Request body (application/json)
key.curl
curl -X POST 'https://api.talonic.com/v1/ap/bills/accept' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"bill_key": "string",
"field": "entity"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/bills/accept", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bill_key": "string",
"field": "entity"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — Accepted.
{
"accepted": true
}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The bill was not found (or its document is hidden from the key's person), or the workspace has not added the app.
- 422 — The bill has no suggestion for that field.
/v1/ap/bills/withdrawRequired scope: write
Request body (application/json)
key.curl
curl -X POST 'https://api.talonic.com/v1/ap/bills/withdraw' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"bill_key": "string",
"field": "entity"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/bills/withdraw", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bill_key": "string",
"field": "entity"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — The outcome.
{
"withdrawn": true
}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
/v1/ap/rules/compileRequired scope: write
Request body (application/json)
heavy rule when absent.curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/compile' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "string",
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/compile", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"locale": "string",
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — One proposal per rule.
[
{
"rule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "check",
"check": {
"readback": {
"headline": "string",
"body": "string",
"outcomes": {}
},
"fields": [
"string"
]
}
}
]- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 409 — The app is switched off in this workspace, or a rule named is already checked by its fields.
- 502 — Checks cannot be proposed right now; try again.
/v1/ap/rules/modesRequired scope: write
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/modes' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"mode": "heavy"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/modes", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"rule_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"mode": "heavy"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — Saved.
{
"updated": 1
}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — A rule is not one of the app's payment rules, or the workspace has not added the app.
/v1/ap/rules/rules/{ruleId}/compileRequired scope: write
Path parameters
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/compile' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "string"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/compile", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"locale": "string"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — The proposal.
{
"rule_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "check",
"check": {
"readback": {
"headline": "string",
"body": "string",
"outcomes": {
"passed": "string",
"failed": "string",
"unclear": "string"
}
},
"fields": [
"string"
]
}
}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.
- 409 — The app is switched off in this workspace, or the rule is already checked by its fields (send it back to
heavyfirst). - 502 — Checks cannot be proposed right now; try again.
/v1/ap/rules/rules/{ruleId}/modeRequired scope: write
Path parameters
Request body (application/json)
curl
curl -X POST 'https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/mode' \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "heavy"
}'Node.js (18+)
const res = await fetch("https://api.talonic.com/v1/ap/rules/rules/3fa85f64-5717-4562-b3fc-2c963f66afa6/mode", {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"mode": "heavy"
}),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();Response 201 — The rule.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "string",
"text": "string",
"obligation": "string",
"source_quote": "string",
"origin": "string",
"mode": "heavy",
"check": {
"readback": {
"headline": "string",
"body": "string",
"outcomes": {
"passed": "string",
"failed": "string",
"unclear": "string"
}
},
"fields": [
"string"
]
},
"light": {
"agree": 1,
"needed": 1,
"disagreed": true,
"last_disagreement": {
"evaluation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"light": "string",
"heavy": "string",
"by": "person",
"at": "2026-01-15T09:30:00Z"
}
}
}- 400 — The request is invalid.
- 401 — Missing or invalid API key.
- 403 — The API key does not have the required scope.
- 404 — The requested resource was not found.