AP Configuration
Read, validate and save the Accounts Payable configuration: bill sources, legal entities, the NetSuite references used on posting, and PO-required kinds.
The AP configuration says where bills come from and how they map onto NetSuite records. Every key is optional; defaults read the Money Found bindings of the workspace. GET /v1/ap/config returns the saved configuration, or an empty one with saved: false when none is saved. PUT /v1/ap/config replaces the stored configuration with the one in the body. The write needs the write scope and a key whose person is a member or above.
The configuration is validated on every write: bill_sources must name Money Found roles, entities and NetSuite references need id and name, and default_terms_days is 0 to 365. A rejected configuration returns 400 and stores nothing. With dry_run: true the configuration is only checked, the response has saved: false, and the stored configuration is unchanged. Run a dry run first whenever the configuration is generated by a script.
/v1/ap/configResponse fields
/v1/ap/configBody fields
config fields (all optional)
cURL: Check a configuration without saving
curl -X PUT "https://api.talonic.com/v1/ap/config" \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true,
"config": {
"entities": {
"US01": { "name": "Acme Inc.", "system": "NetSuite", "netsuite_subsidiary": { "id": "3", "name": "Acme Inc." } }
},
"netsuite": {
"account": "SANDBOX-1",
"ap_account": { "id": "210", "name": "Accounts Payable" },
"default_account": { "id": "540", "name": "Operating expenses" }
},
"po_required_kinds": ["freight"],
"default_terms_days": 30
}
}'Response: Checked, not saved
{ "config": { "entities": { "US01": { "name": "Acme Inc.", "system": "NetSuite" } }, "default_terms_days": 30 }, "saved": false }netsuite: null and is skipped by the preview and the export when entities is configured at all. When netsuite.vendors is set, a bill whose vendor has no record there is held as vendor_unknown.