AP bills
Vendor bills. Lines go in the same request - see Conventions on nested writes.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| invoicenumber | string(20) | The vendor’s own invoice number. Required and never generated - it is how duplicate bills are spotted. |
| cancel | boolean | Cancelled. Always a boolean on the wire, whatever integer width the column uses (D23). |
| completeread-only | integer | 1 when the bill is fully paid. |
| paynone | integer | 1 puts the bill on payment hold; payment runs set to skip held bills exclude it. |
| totalmoney | string(4dp) | Stored as decimal(19,4). |
| description | string(50) | Bill description. |
| dateofinvoice | string | Date on the vendor’s invoice - the accounting date the bill posts under. |
| duedate | string | Date payment is due. |
| discountamountmoney | string(4dp) | Stored as decimal(19,4). |
| discountdate | string | Last date the early-payment discount applies. |
| vendorid | integer | Reference to vendors, by id. Write either this or vendor. |
| vendor | string(30) | Code for the referenced vendor, instead of the id. |
| comment | text | Comment. Stored as text, no practical length limit. |
| wherefrom | integer | Module that raised the bill: 1 = entered in AP. |
| entrydate | string | When the record was created. |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| approved_paydate | string | Pay date approved in the pre-approval workflow. |
| preapproved_useridread-only | integer | User who pre-approved the bill for payment. |
| preapproved_user | string(50) | The name of the referenced genusers, instead of the id. Send this or preapproved_userid, not both unless they agree. |
| preapproved_status | integer | Pre-approval workflow status: 0 = pending, 1 = approved. |
| preapproved_checkacctid | integer | Checking account chosen for the bill during pre-approval. |
| preapproved_checkacct | string(30) | The name of the referenced checkaccounts, instead of the id. Send this or preapproved_checkacctid, not both unless they agree. |
| preapproved_amountmoney | string(6dp) | Stored as decimal(15,6). |
| preapproved_interestmoney | string(6dp) | Stored as decimal(15,6). |
| old_idread-only | string(255) | Bill id in the system this record was imported from. |
| ccpurchase | integer | 1 when the bill is a credit-card purchase (shown on the CC purchases tab). |
| apglaccountid | integer | Reference to glaccounts, by id. Write either this or apglaccount. |
| apglaccount | string(20) | The name of the referenced glaccounts, instead of the id. Send this or apglaccountid, not both unless they agree. |
| chargeback | integer | 1 when the bill is charged back to another party. |
| recurring | integer | 1 when the bill is a recurring template that generates future bills. |
| payplan_dayofmonth | integer | Day of the month the recurring bill generates on. |
| payplan_days | integer | Interval in days between generated bills, when not monthly. |
| payplan_next | string | Next date the recurring bill generates. |
| payplan_numtimes | integer | Remaining number of bills the recurrence will generate; -1 repeats indefinitely. |
| isretainer | integer | 1 when the bill holds retainage withheld from another bill. |
| retainer_apbillid | integer | Retainer apbillid. Id only. |
| drawid | integer | Drawid. Id only. |
| currency | string(10) | Currency the bill is payable in. |
| curratenumber | string(10dp) | Numeric string, 10 decimal places. Not money - do not apply currency rounding. |
| alternate_paytoname | string(255) | Pay To name printed on the check when it differs from the vendor name. |
| non_negotiable | integer | 1 prints the payment check as Non-Negotiable, recording a payment made outside AP. |
| costcodeid | integer | Cost code. |
| costcode | string(20) | Code for the referenced costcode, instead of the id. |
| voucherid | integer | Voucherid. Id only. |
| voucher | string(50) | The voucher of the referenced gltransactions, instead of the id. Send this or voucherid, not both unless they agree. |
| frommanual | integer | 1 when the bill came from Manual Checks entry. |
| glcategoryid | integer | Glcategoryid. Id only. |
| glcategory | string(20) | The code of the referenced glcategories, instead of the id. Send this or glcategoryid, not both unless they agree. |
| jobid | integer | Jobid. Id only. |
| altglpostdate | string | Alternate GL posting date, when the bill posts to a different period than the invoice date. |
| frompayroll | integer | 1 when the bill was generated by payroll (tax and deduction remittances). |
| highpriority | integer | 1 marks the bill High Priority in payment runs. |
| invoicetermsid | integer | Reference to invoiceterms, by id. Write either this or invoiceterms. |
| invoiceterms | string(30) | The verbal of the referenced invoiceterms, instead of the id. Send this or invoicetermsid, not both unless they agree. |
| prepaid | integer | Prepaid. Id only. |
| invpodepositidread-only | integer | Purchase-order deposit this bill settles. Read-only: the link is made by NolaPro's own PO deposit flow, and no /invpodeposits resource exists to name or supply the id. |
| externalid | string(100) | Your own key. Scoped to your company. |
Endpoints#
Payments applied to a vendor bill.
What paid this bill, when, and through which voucher.
A customer payment against an invoice is a first-class resource (/payments). Its counterpart on the payables side lives here, against the bill it settles. Anyone reconciling accounts payable needs it to close the loop between a bill and the money that left.
A voided cheque keeps its row and carries checkvoid with a reversing voucher, rather than disappearing.
Requires scope bills:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The bill id. |
| Status | Code | Meaning |
|---|---|---|
| 422 | unknown_value | No such parent record in this company. The same answer whether it does not exist or belongs to someone else, so a caller cannot probe another company's ids. |
curl \ 'https://acme.nolapro.com/!/api/v2/apbills/104/payments' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/104/payments'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/apbills/104/payments", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/104/payments', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/apbills/104/payments"); res.EnsureSuccessStatusCode();
Create many.
Requires scope bills:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Field | Type | Description |
|---|---|---|
| vendoridrequired | integer | Who the bill is from. |
| numberrequired | string(20) | The VENDOR's invoice number. Required - it is how a duplicate bill is spotted, and NolaPro has no counter to fall back on because the number is theirs. |
| date | string | Bill date. Defaults to today. |
| duedate | string | Payment due date. |
| totalmoney | string | What is owed. Must equal the sum of the distribution lines. Decimal STRING, not a JSON number. |
| externalid | string(100) | Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again. |
| linesrequired | array of object | The GL DISTRIBUTION, not products: each line says which account the expense lands in and for how much. Together they must equal the bill total. |
| post | boolean | Post the invoice to the general ledger. Defaults to true. Send false to create it as a DRAFT: no GL voucher is written, so lines can still be added with POST /invoicelines or changed with PATCH /invoicelines/{id}. Post it later by cancelling and re-raising, or build it fully before posting. Once an invoice carries a voucher its lines are closed to further change. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request was malformed. |
| 422 | gl_set_unbalanced | The signed amounts do not sum to zero. |
| 422 | period_closed | The GL period containing the date is closed. |
| 422 | unknown_value | A reference did not resolve in this company. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/apbills/batch' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '[ { "vendorid": 104, "number": "INV-88421", "date": "2026-08-02", "duedate": "2026-08-02", "total": "125.0000", "externalid": "crm-8842", "lines": [ { "amount": "125.0000" } ], "post": false } ]'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/batch'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ [ 'vendorid' => 104, 'number' => 'INV-88421', 'date' => '2026-08-02', 'duedate' => '2026-08-02', 'total' => '125.0000', 'externalid' => 'crm-8842', 'lines' => [ [ 'amount' => '125.0000', ], ], 'post' => false, ], ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/apbills/batch", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json=[ { "vendorid": 104, "number": "INV-88421", "date": "2026-08-02", "duedate": "2026-08-02", "total": "125.0000", "externalid": "crm-8842", "lines": [ { "amount": "125.0000", }, ], "post": False, }, ], ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/batch', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify([ { vendorid: 104, number: "INV-88421", date: "2026-08-02", duedate: "2026-08-02", total: "125.0000", externalid: "crm-8842", lines: [ { amount: "125.0000", }, ], post: false, }, ]), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new[] { new { vendorid = 104, number = "INV-88421", date = "2026-08-02", duedate = "2026-08-02", total = "125.0000", externalid = "crm-8842", lines = new[] { new { amount = "125.0000", }, }, post = false, }, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/apbills/batch") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"results": [
{
"index": 1,
"status": 1
}
]
}
List ap bills.
Requires scope bills:read.
| Name | In | Type | Notes |
|---|---|---|---|
| complete | query | string | Restrict to one complete. |
| vendorid | query | string | Restrict to one vendorid. |
| jobid | query | string | Restrict to one jobid. |
| invoicenumber | query | string | invoicenumber. Partial match, case-insensitive. |
| description | query | string | description. Partial match, case-insensitive. |
| cancel | query | string | Defaults to false. Pass true or any. |
| modifiedsince | query | string | RFC 3339 UTC timestamp. Returns only records changed since then, including cancelled ones - so cancel defaults to any rather than false when this is used. The response carries _meta.synced_through; store it and send it back next time. |
| externalid | query | string | Exact match on your own key. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | Token lacks read scope. |
curl \ 'https://acme.nolapro.com/!/api/v2/apbills' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/apbills", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/apbills"); res.EnsureSuccessStatusCode();
Create.
Requires scope bills:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Field | Type | Description |
|---|---|---|
| vendoridrequired | integer | Who the bill is from. |
| numberrequired | string(20) | The VENDOR's invoice number. Required - it is how a duplicate bill is spotted, and NolaPro has no counter to fall back on because the number is theirs. |
| date | string | Bill date. Defaults to today. |
| duedate | string | Payment due date. |
| totalmoney | string | What is owed. Must equal the sum of the distribution lines. Decimal STRING, not a JSON number. |
| externalid | string(100) | Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again. |
| linesrequired | array of object | The GL DISTRIBUTION, not products: each line says which account the expense lands in and for how much. Together they must equal the bill total. |
| post | boolean | Post the invoice to the general ledger. Defaults to true. Send false to create it as a DRAFT: no GL voucher is written, so lines can still be added with POST /invoicelines or changed with PATCH /invoicelines/{id}. Post it later by cancelling and re-raising, or build it fully before posting. Once an invoice carries a voucher its lines are closed to further change. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A required field was missing. |
| 422 | gl_set_unbalanced | The signed amounts do not sum to zero. |
| 422 | period_closed | The GL period containing the date is closed. |
| 422 | unknown_value | A reference did not resolve in this company. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/apbills' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "vendorid": 104, "number": "INV-88421", "date": "2026-08-02", "duedate": "2026-08-02", "total": "125.0000", "externalid": "crm-8842", "lines": [ { "amount": "125.0000" } ], "post": false }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'vendorid' => 104, 'number' => 'INV-88421', 'date' => '2026-08-02', 'duedate' => '2026-08-02', 'total' => '125.0000', 'externalid' => 'crm-8842', 'lines' => [ [ 'amount' => '125.0000', ], ], 'post' => false, ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/apbills", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "vendorid": 104, "number": "INV-88421", "date": "2026-08-02", "duedate": "2026-08-02", "total": "125.0000", "externalid": "crm-8842", "lines": [ { "amount": "125.0000", }, ], "post": False, }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ vendorid: 104, number: "INV-88421", date: "2026-08-02", duedate: "2026-08-02", total: "125.0000", externalid: "crm-8842", lines: [ { amount: "125.0000", }, ], post: false, }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { vendorid = 104, number = "INV-88421", date = "2026-08-02", duedate = "2026-08-02", total = "125.0000", externalid = "crm-8842", lines = new[] { new { amount = "125.0000", }, }, post = false, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/apbills") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"vendorid": 104,
"number": "INV-88421",
"total": "125.0000",
"posted": false,
"voucherid": 104
}
Retrieve one record.
Requires scope bills:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl \ 'https://acme.nolapro.com/!/api/v2/apbills/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/apbills/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/104', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/apbills/104"); res.EnsureSuccessStatusCode();
{
"invoicenumber": "INV-88421",
"paynone": 1,
"total": "125.0000",
"description": "Example description",
"dateofinvoice": "2026-08-01",
"duedate": "2026-08-01"
}
Update.
Requires scope bills:write.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Field | Type | Description |
|---|---|---|
| number | string(20) | The vendor's invoice number. |
| duedate | string | When payment or delivery is expected. |
| date | string | Document date. |
| description | string(255) | Free text. |
| externalid | string(100) | Your own identifier for this record. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request was malformed. |
| 404 | not_found | No such record, or it belongs to another company. |
| 409 | apbill_already_posted | The bill already carries a voucherid. |
| 409 | stale_record | If-Match did not match; someone else changed it first. |
| 422 | rule_violation | NolaPro refused the change. message carries its reason. |
curl -X PATCH \ 'https://acme.nolapro.com/!/api/v2/apbills/104' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "number": "INV-88421", "duedate": "2026-08-01", "date": "2026-08-01", "description": "Example description" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode([ 'number' => 'INV-88421', 'duedate' => '2026-08-01', 'date' => '2026-08-01', 'description' => 'Example description', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.patch( "https://acme.nolapro.com/!/api/v2/apbills/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "number": "INV-88421", "duedate": "2026-08-01", "date": "2026-08-01", "description": "Example description", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/104', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ number: "INV-88421", duedate: "2026-08-01", date: "2026-08-01", description: "Example description", }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { number = "INV-88421", duedate = "2026-08-01", date = "2026-08-01", description = "Example description", }; var req = new HttpRequestMessage(HttpMethod.Patch, "https://acme.nolapro.com/!/api/v2/apbills/104") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Cancel.
Requires scope bills:cancel.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request was malformed. |
| 409 | cannot_cancel | Something already depends on this document - a payment, a shipment, an invoice. |
| 422 | period_closed | The current GL period is closed, so a reversal has nowhere to post. |
| 422 | unknown_value | No such record in this company. |
curl -X DELETE \ 'https://acme.nolapro.com/!/api/v2/apbills/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'DELETE', ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.delete( "https://acme.nolapro.com/!/api/v2/apbills/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/104', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var req = new HttpRequestMessage(HttpMethod.Delete, "https://acme.nolapro.com/!/api/v2/apbills/104"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Post this bill to the general ledger.
Writes the GL voucher for a DRAFT bill - one created with post: false.
A draft bill's distribution can still be changed with POST /apbilllines and PATCH /apbilllines/{id}. Posting runs billpost(), which builds the voucher from that distribution, so the lines must already sum to the bill total - otherwise the voucher would not represent the liability it is filed against.
An already-posted bill answers 409.
Requires scope bills:write.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No bill with that id in this company. |
| 409 | apbill_already_posted | Already posted. Nothing was written a second time. |
| 422 | rule_violation | NolaPro refused the document. message carries its reason. |
| 422 | unknown_value | A reference did not resolve in this company. |
| 422 | period_closed | The GL period the document posts into is closed, so the voucher has nowhere to go. |
| 422 | gl_set_unbalanced | The distribution lines do not sum to the bill total, so the voucher would not represent the liability it is filed against. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/apbills/104/post' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/104/post'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/apbills/104/post", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/104/post', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/apbills/104/post"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Re-print an AP cheque as a PDF
Re-draws a cheque that has already been written. Nothing is recorded — no cheque number is consumed and no record changes; this renders what is already in the books.
Answers application/pdf, not JSON. Because the body is binary it cannot be carried inside a /batch results array; asking for it there returns 415 not_batchable.
Requires scope bills:read.
| Name | In | Type | Notes |
|---|---|---|---|
| checknbrrequired | query | string | The cheque to draw. |
curl \ 'https://acme.nolapro.com/!/api/v2/apbills/checks' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/apbills/checks'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/apbills/checks", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/apbills/checks', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/apbills/checks"); res.EnsureSuccessStatusCode();
name holds the account number and description holds the label. That is backwards from most expectations and it is the single most important thing to know about this resource. Scoped per company, on the companyid column.