NetSuite Preview and CSV Export
Preview the NetSuite vendorBill records a posting would send, with the bills left out and why, or export the same bills as a NetSuite CSV Import Assistant file.
GET /v1/ap/netsuite/preview returns the REST Record API vendorBill bodies for the bills a posting run would post, and the bills it leaves out with the reason. The adapter is simulated and nothing is sent to NetSuite. The response has adapter.mode: "simulated_sandbox" to say so. Duplicate bills are never included. Held bills are included only with include_held, and then post on payment hold with approval pending. Bills whose entity posts to another system, or whose entity has no NetSuite subsidiary, are skipped.
/v1/ap/netsuite/previewQuery parameters
Response fields
cURL: Preview including held bills for one entity
curl "https://api.talonic.com/v1/ap/netsuite/preview?include_held=true&entity=US01" \
-H "Authorization: Bearer $TALONIC_API_KEY"Response: Preview (abridged)
{
"adapter": { "name": "NetSuite", "mode": "simulated_sandbox", "account": "SANDBOX-1" },
"include_held": true,
"records": [
{ "bill_key": "bill-0001", "method": "POST", "path": "/services/rest/record/v1/vendorBill", "body": { "externalId": "bill-0001" } }
],
"skipped": [
{ "bill_key": "bill-0004", "invoice_number": "A-88", "vendor": "Harbor Supply", "reason": "duplicate" }
],
"totals": { "records": 1, "amount": 18450, "held_on_payment_hold": 1 }
}/v1/ap/netsuite/export.csvQuery parameters
cURL: Download the CSV
curl -o netsuite-vendor-bills.csv "https://api.talonic.com/v1/ap/netsuite/export.csv" \
-H "Authorization: Bearer $TALONIC_API_KEY"externalId, which is the SKU.