Skip to main content
PATCH
/
v1
/
settings
/
ap
Patch AP settings
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    matchRoundingTolerance: 123,
    matchSimilarityThreshold: 123,
    matchDateWindowDays: 123,
    supplierMatchSimilarityThreshold: 123,
    supplierMatchNameWeight: 123,
    supplierMatchAddressWeight: 123,
    headerMatchCurrencyWeight: 123,
    headerMatchDateWeight: 123,
    headerAffinityFloor: 123,
    lineMatchPriceWeight: 123,
    lineMatchQuantityWeight: 123,
    lineAffinityFloor: 123
  })
};

fetch('https://api.dolfinai.co/v1/settings/ap', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.dolfinai.co/v1/settings/ap"

payload = {
"matchRoundingTolerance": 123,
"matchSimilarityThreshold": 123,
"matchDateWindowDays": 123,
"supplierMatchSimilarityThreshold": 123,
"supplierMatchNameWeight": 123,
"supplierMatchAddressWeight": 123,
"headerMatchCurrencyWeight": 123,
"headerMatchDateWeight": 123,
"headerAffinityFloor": 123,
"lineMatchPriceWeight": 123,
"lineMatchQuantityWeight": 123,
"lineAffinityFloor": 123
}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
using RestSharp;


var options = new RestClientOptions("https://api.dolfinai.co/v1/settings/ap");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"matchRoundingTolerance\": 123,\n \"matchSimilarityThreshold\": 123,\n \"matchDateWindowDays\": 123,\n \"supplierMatchSimilarityThreshold\": 123,\n \"supplierMatchNameWeight\": 123,\n \"supplierMatchAddressWeight\": 123,\n \"headerMatchCurrencyWeight\": 123,\n \"headerMatchDateWeight\": 123,\n \"headerAffinityFloor\": 123,\n \"lineMatchPriceWeight\": 123,\n \"lineMatchQuantityWeight\": 123,\n \"lineAffinityFloor\": 123\n}", false);
var response = await client.PatchAsync(request);

Console.WriteLine("{0}", response.Content);
curl --request PATCH \
--url https://api.dolfinai.co/v1/settings/ap \
--header 'Content-Type: application/json' \
--data '
{
"matchRoundingTolerance": 123,
"matchSimilarityThreshold": 123,
"matchDateWindowDays": 123,
"supplierMatchSimilarityThreshold": 123,
"supplierMatchNameWeight": 123,
"supplierMatchAddressWeight": 123,
"headerMatchCurrencyWeight": 123,
"headerMatchDateWeight": 123,
"headerAffinityFloor": 123,
"lineMatchPriceWeight": 123,
"lineMatchQuantityWeight": 123,
"lineAffinityFloor": 123
}
'
{
  "payByBankEnabled": true,
  "matchRoundingTolerance": 123,
  "matchSimilarityThreshold": 123,
  "matchDateWindowDays": 123,
  "supplierMatchSimilarityThreshold": 123,
  "supplierMatchNameWeight": 123,
  "supplierMatchAddressWeight": 123,
  "headerMatchCurrencyWeight": 123,
  "headerMatchDateWeight": 123,
  "headerAffinityFloor": 123,
  "lineMatchPriceWeight": 123,
  "lineMatchQuantityWeight": 123,
  "lineAffinityFloor": 123
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}

Body

application/json
matchRoundingTolerance

Per-line rounding tolerance (in the bill's currency) for three-way matching. Must be >= 0.

matchSimilarityThreshold

Minimum description-similarity score to suggest a fuzzy PO/DN line match. Must be between 0 and 1.

matchDateWindowDays

Soft date-proximity window in days preferring bills close to a candidate PO's expected delivery date. Must be >= 0.

supplierMatchSimilarityThreshold

Minimum combined supplier-match score to suggest a fuzzy supplier link. Must be between 0 and 1.

supplierMatchNameWeight

Relative weight of supplier-name similarity in the combined supplier-match score. Must be >= 0; cannot be 0 alongside a 0 address weight.

supplierMatchAddressWeight

Relative weight of delivery-address similarity in the combined supplier-match score. Must be >= 0; cannot be 0 alongside a 0 name weight.

headerMatchCurrencyWeight

Header-affinity weight (§1a.6) for a bill↔PO currency match. Must be >= 0.

headerMatchDateWeight

Header-affinity weight (§1a.6) for bill↔PO/DN date proximity. Must be >= 0. The two header weights cannot both be 0.

headerAffinityFloor

Lower bound (0-1) on the combined header affinity, so a header mismatch never buries a genuine line match below this fraction of its line-similarity score. Must be between 0 and 1.

lineMatchPriceWeight

Line-affinity weight (§1a.7) for a bill-line↔PO-line unit-price match. Must be >= 0; cannot be 0 alongside a 0 quantity weight.

lineMatchQuantityWeight

Line-affinity weight (§1a.7) for a bill-line↔PO-line ordered-quantity match. Must be >= 0; cannot be 0 alongside a 0 price weight.

lineAffinityFloor

Lower bound (0-1) on the combined line affinity, so a price/quantity mismatch never buries a genuine line match below this fraction of its line-similarity score. Must be between 0 and 1.

Response

OK

payByBankEnabled
boolean
required
matchRoundingTolerance
required

Per-line rounding tolerance (in the bill's currency) for three-way matching. Line amounts within this of each other are treated as reconciled. Default 0.01 (1p).

matchSimilarityThreshold
required

Minimum description-similarity score (0-1) for the matching engine to suggest a fuzzy PO/DN line match. Exact SKU matches bypass this. Default 0.7.

matchDateWindowDays
required

Soft date-proximity window (days): bills whose invoice date is within this many days of a candidate PO's expected delivery date are preferred when scoring. Never excludes a PO. Default 7.

supplierMatchSimilarityThreshold
required

Minimum combined supplier-match score (0-1) to suggest a fuzzy supplier link. Exact tax-id/email/name matches bypass this and auto-link. Default 0.7.

supplierMatchNameWeight
required

Relative weight of supplier-name similarity in the combined supplier-match score. Normalised against the address weight, so the two need not sum to 1. Default 0.7.

supplierMatchAddressWeight
required

Relative weight of delivery-address similarity in the combined supplier-match score. Normalised against the name weight. Default 0.3.

headerMatchCurrencyWeight
required

Header-affinity weight (§1a.6) for a bill↔PO currency match. Normalised at use against the other header weights. Default 0.3.

headerMatchDateWeight
required

Header-affinity weight (§1a.6) for bill↔PO/DN date proximity. Normalised at use against the other header weights. Default 0.2.

headerAffinityFloor
required

Lower bound (0-1) on the combined header affinity — a header mismatch never buries a genuine line match below this fraction of its line-similarity score. Default 0.5.

lineMatchPriceWeight
required

Line-affinity weight (§1a.7) for a bill-line↔PO-line unit-price match. Normalised at use against the quantity weight. Default 0.7.

lineMatchQuantityWeight
required

Line-affinity weight (§1a.7) for a bill-line↔PO-line ordered-quantity match. Normalised at use against the price weight. Default 0.3.

lineAffinityFloor
required

Lower bound (0-1) on the combined line affinity — a price/quantity mismatch never buries a genuine line match below this fraction of its line-similarity score. Default 0.3.