Accounts Payable API Documentation
Read supplier invoices, check totals, tax figures, duplicates, and purchase-order lines, and prepare a payment review. It does not pay invoices or invent tax rules, purchase orders, suppliers, or payment terms. Payment is the exact USDC price on Base with x402.
https://brainiac.software/api/v1/accounts-payable/invoice-data-extract$0.06 USDCExtract invoice data
Extract supplier, invoice number, dates, currency, purchase-order number, terms, and amounts from a supplied invoice or a text-based PDF. Missing fields stay unavailable. No tax rule or payment term is invented.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"file": {
"mediaType": "text/plain",
"fileBase64": "<base64 document omitted>"
}
}The base64 document is shortened here; send the full encoded document.
Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"source": "document",
"fields": [
{
"name": "supplierName",
"value": "Northwind Paper Ltd",
"status": "extracted",
"evidence": "Northwind Paper Ltd"
},
{
"name": "invoiceNumber",
"value": "INV-100",
"status": "extracted",
"evidence": "INV-100"
},
{
"name": "invoiceDate",
"value": "2026-10-01",
"status": "extracted",
"evidence": "2026-10-01"
},
{
"name": "dueDate",
"value": null,
"status": "unavailable",
"evidence": null
},
{
"name": "currency",
"value": "USD",
"status": "extracted",
"evidence": "Currency: USD"
},
{
"name": "poNumber",
"value": "PO-55",
"status": "extracted",
"evidence": "PO-55"
},
{
"name": "paymentTerms",
"value": "Net 30",
"status": "extracted",
"evidence": "Net 30"
},
{
"name": "subtotal",
"value": "55",
"status": "extracted",
"evidence": "55.00"
},
{
"name": "discount",
"value": null,
"status": "unavailable",
"evidence": null
},
{
"name": "shipping",
"value": null,
"status": "unavailable",
"evidence": null
},
{
"name": "tax",
"value": "0",
"status": "extracted",
"evidence": "0.00"
},
{
"name": "taxRate",
"value": null,
"status": "unavailable",
"evidence": null
},
{
"name": "total",
"value": "55",
"status": "extracted",
"evidence": "55.00"
}
],
"findings": [
{
"severity": "unavailable",
"code": "due_date_unparsed",
"detail": "The document due date \"02/11/2026\" was not an unambiguous calendar date. Slash dates were not guessed."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Labeled document lines are read as printed. A missing label is left unavailable.",
"CSV is read as text. Columns are not mapped unless the file uses labeled lines or description, quantity, unit price, and amount."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-data-extract" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"file": {
"mediaType": "text/plain",
"fileBase64": "<base64 document omitted>"
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/invoice-line-item-extract$0.06 USDCExtract invoice line items
Extract invoice line descriptions, quantities, unit prices, and amounts from supplied lines or selectable document text. Lines that are not present are not created.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0
}
]
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0,
"source": "supplied"
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0,
"source": "supplied"
}
],
"findings": [],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Line items are taken from the request or from text rows with a description and three trailing amounts. Rows that do not match are not turned into lines."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-line-item-extract" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0
}
]
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/invoice-total-validate$0.04 USDCValidate invoice totals
Recompute the total from line amounts, subtotal, tax, discount, and shipping figures that are actually present. A missing figure is not treated as zero.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"subtotal": 55,
"discount": 0,
"shipping": 0,
"tax": 0,
"total": 60,
"lines": [
{
"description": "Paper ream",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "error",
"subtotal": 55,
"discount": 0,
"tax": 0,
"shipping": 0,
"lineTotal": 55,
"expectedTotal": 55,
"total": 60,
"findings": [
{
"severity": "error",
"code": "total_mismatch",
"detail": "The total 60.00 does not equal 55.00 from the present figures (subtotal, discount, tax, shipping). Missing tax, discount, or shipping was not added as zero."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"A figure that is not on the invoice is left out of the arithmetic. It is not treated as zero."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-total-validate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"subtotal": 55,
"discount": 0,
"shipping": 0,
"tax": 0,
"total": 60,
"lines": [
{
"description": "Paper ream",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/invoice-duplicate-detect$0.05 USDCDetect duplicate invoices
Compare one invoice with other invoices supplied in the same request using the supplier and invoice number, and a content fingerprint. This does not search an accounts payable ledger.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
candidates | No | array; Array |
Request exampleJSON
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"total": 55
},
"candidates": [
{
"id": "prior-1",
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"total": 55
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "duplicate",
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"fingerprint": "81301f34292355546cfc99b23fa3fed9aced6e6a3ff14b0adfb42132d9fb2a4e",
"fingerprintComplete": true,
"matches": [
{
"candidateId": "prior-1",
"relation": "identifier",
"severity": "error",
"detail": "Candidate prior-1 has the same supplier and invoice number."
},
{
"candidateId": "prior-1",
"relation": "fingerprint",
"severity": "error",
"detail": "Candidate prior-1 has the same supplier, invoice number, date, currency, total, and line fingerprint."
}
],
"findings": [
{
"severity": "error",
"code": "duplicate_identifier",
"detail": "Candidate prior-1 has the same supplier and invoice number."
},
{
"severity": "error",
"code": "duplicate_fingerprint",
"detail": "Candidate prior-1 has the same supplier, invoice number, date, currency, total, and line fingerprint."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Duplicate detection compares only the invoices in this request. It does not mean the invoice is unique in an accounts payable ledger."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-duplicate-detect" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"total": 55
},
"candidates": [
{
"id": "prior-1",
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"total": 55
}
]
}
JSONhttps://brainiac.software/api/v1/accounts-payable/purchase-order-match$0.06 USDCMatch an invoice to a purchase order
Match the invoice to a purchase order supplied in the request. Purchase orders are not looked up or created. Lines match on SKU when both sides have one, otherwise on the same description.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
purchaseOrder | No | object; Object |
Request exampleJSON
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"poNumber": "PO-55",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 3,
"unitPrice": 30,
"amount": 90
}
]
},
"purchaseOrder": {
"poNumber": "PO-55",
"supplierName": "Northwind Paper Ltd",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "mismatch",
"poNumber": "PO-55",
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"source": "invoice",
"status": "matched",
"detail": "The description and the numbers present on both sides agree."
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"source": "invoice",
"status": "mismatch",
"detail": "The purchase-order line was found, but quantity 3 does not match 1; amount 90.00 does not match 30.00."
}
],
"findings": [
{
"severity": "error",
"code": "po_line_mismatch",
"detail": "The invoice line \"Ink cartridge\" does not match the purchase order: quantity 3 does not match 1; amount 90.00 does not match 30.00."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Purchase-order lines match on SKU when both sides have one, otherwise on the same description. Similar names are not matched."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/purchase-order-match" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"poNumber": "PO-55",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 3,
"unitPrice": 30,
"amount": 90
}
]
},
"purchaseOrder": {
"poNumber": "PO-55",
"supplierName": "Northwind Paper Ltd",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/invoice-tax-validate$0.04 USDCValidate invoice tax
Check a printed or supplied tax amount against a printed or supplied rate and subtotal. No statutory tax rate is applied.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"subtotal": 50,
"tax": 12,
"taxRate": 20,
"total": 62
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "error",
"tax": 12,
"taxRate": 20,
"expectedTax": 10,
"findings": [
{
"severity": "error",
"code": "tax_amount_mismatch",
"detail": "The tax amount 12.00 does not equal 10.00, which is 20% of 50.00. No other tax rule was applied."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"The tax amount is checked only against a rate and subtotal that were supplied or printed."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-tax-validate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"subtotal": 50,
"tax": 12,
"taxRate": 20,
"total": 62
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/payment-terms-extract$0.03 USDCExtract payment terms
Read payment terms only when they are supplied or printed, including Net N, due on receipt, and a stated discount such as 2/10 Net 30.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"paymentTerms": "2/10 Net 30"
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "extracted",
"paymentTerms": "2/10 Net 30",
"netDays": 30,
"discountPercent": 2,
"discountDays": 10,
"basis": "discount_net",
"evidence": "Supplied on the request.",
"findings": [
{
"severity": "warning",
"code": "discount_not_applied",
"detail": "The terms state a discount. This check did not change the invoice total."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Only a printed or supplied term is returned. A discount stated in the terms is not subtracted from the total."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/payment-terms-extract" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"paymentTerms": "2/10 Net 30"
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/payment-due-date-calculate$0.03 USDCCalculate a payment due date
Return a stated due date, or calculate one from an invoice date plus terms that were actually stated. Net 30 is not assumed, and no payment is scheduled.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"invoiceDate": "2026-10-01",
"dueDate": "2026-11-15",
"paymentTerms": "Net 30"
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"approvesPayment": false,
"status": "stated",
"invoiceDate": "2026-10-01",
"paymentTerms": "Net 30",
"dueDate": "2026-11-15",
"basis": "stated_due_date",
"findings": [
{
"severity": "warning",
"code": "due_date_differs_from_terms",
"detail": "The stated due date 2026-11-15 differs from 2026-10-31, which is the invoice date plus the stated Net 30 terms."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"A due date is stated on the invoice or calculated from the invoice date plus terms that were actually stated. This does not schedule or release a payment."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/payment-due-date-calculate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"invoiceDate": "2026-10-01",
"dueDate": "2026-11-15",
"paymentTerms": "Net 30"
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/invoice-anomaly-detect$0.05 USDCDetect invoice anomalies
Flag amount mismatches, negative figures, date-order problems, and repeated lines that are present on the invoice. Unusual amounts are not guessed from a normal range.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
Request exampleJSON
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"subtotal": 55,
"tax": 0,
"total": 60,
"lines": [
{
"description": "Paper ream",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"status": "issues_observed",
"findings": [
{
"severity": "error",
"code": "total_mismatch",
"detail": "The total 60.00 does not equal 55.00 from the present figures (subtotal, tax). Missing tax, discount, or shipping was not added as zero."
},
{
"severity": "unavailable",
"code": "tax_rate_unavailable",
"detail": "A tax amount is present, but no tax rate was supplied or printed. The amount was not checked against a tax rule."
}
],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"Anomalies are limited to figures and dates that are present. An amount is not flagged as unusual by comparison with a guessed normal range."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/invoice-anomaly-detect" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"currency": "USD",
"subtotal": 55,
"tax": 0,
"total": 60,
"lines": [
{
"description": "Paper ream",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
}
}
JSONhttps://brainiac.software/api/v1/accounts-payable/accounts-payable-review$0.12 USDCReview an invoice for payment
Combine the invoice checks into one review. No payment is initiated, and a clear review is not an approval to pay.
Body
| Field | Required | Notes |
|---|---|---|
invoice | No | object; Object |
file | No | object; Object |
purchaseOrder | No | object; Object |
candidates | No | array; Array |
Request exampleJSON
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"dueDate": "2026-10-31",
"currency": "USD",
"poNumber": "PO-55",
"paymentTerms": "Net 30",
"subtotal": 55,
"discount": 0,
"shipping": 0,
"tax": 0,
"taxRate": 0,
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0
}
]
},
"purchaseOrder": {
"poNumber": "PO-55",
"supplierName": "Northwind Paper Ltd",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
},
"candidates": [
{
"id": "prior-9",
"supplierName": "Other Supply Co",
"invoiceNumber": "INV-9",
"invoiceDate": "2026-09-01",
"currency": "USD",
"total": 10
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-02T19:00:00.000Z",
"paymentInitiated": false,
"approvesPayment": false,
"assessment": "no_issues_observed",
"summary": "No errors, warnings, or missing checks were found in the supplied invoice and comparisons. This review does not release or initiate a payment.",
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"dueDate": "2026-10-31",
"currency": "USD",
"poNumber": "PO-55",
"paymentTerms": "Net 30",
"subtotal": 55,
"discount": 0,
"shipping": 0,
"tax": 0,
"taxRate": 0,
"total": 55
},
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0,
"source": "supplied"
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0,
"source": "supplied"
}
],
"sections": [
{
"name": "header",
"status": "extracted"
},
{
"name": "lines",
"status": "extracted"
},
{
"name": "totals",
"status": "matched"
},
{
"name": "duplicates",
"status": "no_duplicate_in_supplied_set"
},
{
"name": "purchase_order",
"status": "matched"
},
{
"name": "tax",
"status": "matched"
},
{
"name": "terms",
"status": "extracted"
},
{
"name": "due",
"status": "stated"
},
{
"name": "anomalies",
"status": "no_issues_observed"
}
],
"counts": {
"error": 0,
"warning": 0,
"unavailable": 0
},
"findings": [],
"limitations": [
"No payment was initiated.",
"Tax rules, purchase orders, supplier records, and payment terms are not invented when they are absent.",
"Only the invoice, purchase order, and prior invoices in this request are compared.",
"The review repeats the individual checks in this request. A result with no issues is not an approval to pay."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/accounts-payable/accounts-payable-review" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"invoice": {
"supplierName": "Northwind Paper Ltd",
"invoiceNumber": "INV-100",
"invoiceDate": "2026-10-01",
"dueDate": "2026-10-31",
"currency": "USD",
"poNumber": "PO-55",
"paymentTerms": "Net 30",
"subtotal": 55,
"discount": 0,
"shipping": 0,
"tax": 0,
"taxRate": 0,
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25,
"tax": 0
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30,
"tax": 0
}
]
},
"purchaseOrder": {
"poNumber": "PO-55",
"supplierName": "Northwind Paper Ltd",
"currency": "USD",
"total": 55,
"lines": [
{
"description": "Paper ream",
"sku": "RM-1",
"quantity": 2,
"unitPrice": 12.5,
"amount": 25
},
{
"description": "Ink cartridge",
"sku": "INK-2",
"quantity": 1,
"unitPrice": 30,
"amount": 30
}
]
},
"candidates": [
{
"id": "prior-9",
"supplierName": "Other Supply Co",
"invoiceNumber": "INV-9",
"invoiceDate": "2026-09-01",
"currency": "USD",
"total": 10
}
]
}
JSON