Bank deposits
Deposits into a bank account.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| cashtotalmoney | string(4dp) | Stored as decimal(19,4). |
| checktotalmoney | string(4dp) | Stored as decimal(19,4). |
| othertotalmoney | string(4dp) | Stored as decimal(19,4). |
| cashoutmoney | string(4dp) | Stored as decimal(19,4). |
| depositdate | string | Date of the bank deposit - the accounting date it posts under. |
| checkaccountid | integer | Checking account the deposit goes into. |
| checkaccount | string(30) | The name of the referenced checkaccounts, instead of the id. Send this or checkaccountid, not both unless they agree. |
| onbankstatementread-only | integer | 1 once the deposit has been matched to a bank statement. |
| cancel | boolean | Cancelled. Always a boolean on the wire, whatever integer width the column uses (D23). |
| entrydate | string | When the record was created. |
| bankstatement_enddateread-only | string | End date of the bank statement the deposit was reconciled under. Maintained by bank reconciliation. |
| 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. |
| depositdescription | string(255) | Description printed on the deposit slip. |
| currency | string(10) | Currency of the deposit. |
| ccdeposit | integer | 1 when the deposit records credit-card settlement funds rather than checks and cash. |
| ardailycloseid | integer | Ardailycloseid. Id only. |
| bankstatement_cleardateread-only | string | Date the deposit cleared the bank. Maintained by bank reconciliation. |
| cancelvoucherid | integer | Cancelvoucherid. Id only. |
| cancelvoucher | string(50) | The voucher of the referenced gltransactions, instead of the id. Send this or cancelvoucherid, not both unless they agree. |
| externalid | string(100) | Your own key. Scoped to your company. |
Endpoints#
What went into a deposit.
The composition of a bank deposit - each payment or item that made up the total. Reconciling a deposit against a bank statement needs the parts, not the sum: the statement shows one credit, and matching it means knowing which receipts were banked together.
Requires scope banking:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The deposit id. |
| Status | Code | Meaning |
|---|---|---|
| 422 | unknown_value | No such parent record in this company. |
curl \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/lines' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/104/lines'); 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/bankdeposits/104/lines", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/lines', { 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/bankdeposits/104/lines"); res.EnsureSuccessStatusCode();
Create many.
Requires scope banking:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| cashtotalmoney | string(4dp) | Stored as decimal(19,4). |
| checktotalmoney | string(4dp) | Stored as decimal(19,4). |
| othertotalmoney | string(4dp) | Stored as decimal(19,4). |
| cashoutmoney | string(4dp) | Stored as decimal(19,4). |
| depositdate | string | Date of the bank deposit - the accounting date it posts under. |
| checkaccountid | integer | Checking account the deposit goes into. |
| checkaccount | string(30) | The name of the referenced checkaccounts, instead of the id. Send this or checkaccountid, not both unless they agree. |
| onbankstatementread-only | integer | 1 once the deposit has been matched to a bank statement. |
| cancel | boolean | Cancelled. Always a boolean on the wire, whatever integer width the column uses (D23). |
| entrydate | string | When the record was created. |
| bankstatement_enddateread-only | string | End date of the bank statement the deposit was reconciled under. Maintained by bank reconciliation. |
| 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. |
| depositdescription | string(255) | Description printed on the deposit slip. |
| currency | string(10) | Currency of the deposit. |
| ccdeposit | integer | 1 when the deposit records credit-card settlement funds rather than checks and cash. |
| ardailycloseid | integer | Ardailycloseid. Id only. |
| bankstatement_cleardateread-only | string | Date the deposit cleared the bank. Maintained by bank reconciliation. |
| cancelvoucherid | integer | Cancelvoucherid. Id only. |
| cancelvoucher | string(50) | The voucher of the referenced gltransactions, instead of the id. Send this or cancelvoucherid, not both unless they agree. |
| externalid | string(100) | Your own key. Scoped to your company. |
| Status | Code | Meaning |
|---|---|---|
| 422 | deposit_refused | A row was refused. Read each row's own status. |
| 422a | cannot_mix_cc_and_cash | A card deposit cannot also carry cash. |
| 409 | already_deposited | A receipt is already on another deposit. |
| 422b | unknown_value | No such bank account, receipt or voucher in this company. |
| 422c | account_not_configured | The bank account has no GL account assigned. |
| 422d | period_closed | The GL period containing the deposit date is closed. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/batch' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '[ { "cashtotal": "125.0000", "checktotal": "125.0000", "othertotal": "125.0000", "cashout": "125.0000", "depositdate": "2026-08-01", "checkaccountid": 104 } ]'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/batch'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ [ 'cashtotal' => '125.0000', 'checktotal' => '125.0000', 'othertotal' => '125.0000', 'cashout' => '125.0000', 'depositdate' => '2026-08-01', 'checkaccountid' => 104, ], ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/bankdeposits/batch", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json=[ { "cashtotal": "125.0000", "checktotal": "125.0000", "othertotal": "125.0000", "cashout": "125.0000", "depositdate": "2026-08-01", "checkaccountid": 104, }, ], ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/batch', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify([ { cashtotal: "125.0000", checktotal: "125.0000", othertotal: "125.0000", cashout: "125.0000", depositdate: "2026-08-01", checkaccountid: 104, }, ]), } ); 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 { cashtotal = "125.0000", checktotal = "125.0000", othertotal = "125.0000", cashout = "125.0000", depositdate = "2026-08-01", checkaccountid = 104, }, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/bankdeposits/batch") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
List bank deposits.
Requires scope banking:read.
| Name | In | Type | Notes |
|---|---|---|---|
| cancel | query | string | Defaults to false. Pass true or any. |
| 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/bankdeposits' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits'); 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/bankdeposits", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits', { 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/bankdeposits"); res.EnsureSuccessStatusCode();
Bank a set of receipts together.
A deposit is not a row, it is a set of receipts banked together, and creating one posts a voucher: the bank account is debited for the total and each receipt's holding account is credited.
You do not send totals. They are worked out from the receipts you list, so the deposit and the ledger cannot disagree. cashtotal and cashout are the exception, being loose notes that no receipt represents.
Every receipt is checked to be yours, live, and not already banked. Banking one twice would credit the bank account twice, so a receipt already on another deposit is refused rather than moved.
Requires scope banking:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| checkaccountidrequired | integer | The bank account the money is going into. It must have a GL account assigned or the deposit cannot post. |
| depositdate | string | The banking date. Defaults to today. Its GL period must be open. |
| depositdescription | string(255) | Free text shown on the deposit and its ledger voucher. |
| costcodeid | integer | Cost code to carry onto the ledger lines. 0 for none. |
| cashtotal | string(4dp) | Loose cash banked, as a decimal string. Not a JSON number. |
| cashout | string(4dp) | Cash withdrawn from the deposit to petty cash, as a decimal string. |
| ccdeposit | boolean | True when these receipts are card settlements. A card deposit cannot also carry cash; bank them separately, which is what the Daily Close does. |
| invoicepaymentids | array of integer | Payments taken against invoices (arinvoicepaymentdetail ids). |
| cashpaymentids | array of integer | Over-the-counter cash payments (cashpayment ids). |
| orderdepositids | array of integer | Deposits taken against sales orders (arorder_deposit ids). |
| estquotedepositids | array of integer | Deposits taken against print quotes (estquote_deposit ids). |
| vouchers | object | Journal entries being banked, as voucher id to the GL account the money came out of. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or malformed field. |
| 409 | already_deposited | A receipt is already on another deposit. |
| 422 | deposit_refused | A rule was broken. Nothing was written. |
| 422x0 | unknown_value | No such bank account, receipt or voucher in this company. |
| 422x1 | account_not_configured | The bank account has no GL account assigned. |
| 422x2 | period_closed | The GL period containing the deposit date is closed. |
| 422x3 | cannot_mix_cc_and_cash | A card deposit cannot also carry cash. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/bankdeposits' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "checkaccountid": 104 }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'checkaccountid' => 104, ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/bankdeposits", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "checkaccountid": 104, }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ checkaccountid: 104, }), } ); 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 { checkaccountid = 104, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/bankdeposits") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Retrieve one record.
Requires scope banking: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/bankdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/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/bankdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/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/bankdeposits/104"); res.EnsureSuccessStatusCode();
{
"cashtotal": "125.0000",
"checktotal": "125.0000",
"othertotal": "125.0000",
"cashout": "125.0000",
"depositdate": "2026-08-01",
"checkaccountid": 104
}
Update.
Only depositdescription can change. The totals are in the voucher this deposit already posted, so amending one here would leave the two disagreeing. To change what is IN a deposit, cancel it and bank the receipts again - that leaves the reversal in the ledger, which is the point.
Requires scope banking:write.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| depositdescription | string(255) | Free text on the deposit. The only amendable field: the totals are in the voucher this deposit already posted. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl -X PATCH \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "depositdescription": "Example depositdescription" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode([ 'depositdescription' => 'Example depositdescription', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.patch( "https://acme.nolapro.com/!/api/v2/bankdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "depositdescription": "Example depositdescription", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/104', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ depositdescription: "Example depositdescription", }), } ); 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 { depositdescription = "Example depositdescription", }; var req = new HttpRequestMessage(HttpMethod.Patch, "https://acme.nolapro.com/!/api/v2/bankdeposits/104") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"cashtotal": "125.0000",
"checktotal": "125.0000",
"othertotal": "125.0000",
"cashout": "125.0000",
"depositdate": "2026-08-01",
"checkaccountid": 104
}
Cancel.
Reverses the deposit and releases its receipts so they can be banked again. A reversing voucher is written; nothing is erased. A deposit already cleared on a bank statement is refused.
Requires scope banking:cancel.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl -X DELETE \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/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/bankdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/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/bankdeposits/104"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
{
"cashtotal": "125.0000",
"checktotal": "125.0000",
"othertotal": "125.0000",
"cashout": "125.0000",
"depositdate": "2026-08-01",
"checkaccountid": 104
}
Deposit slip as a PDF
The deposit slip listing everything banked together.
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 banking:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
curl \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/pdf' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/104/pdf'); 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/bankdeposits/104/pdf", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/pdf', { 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/bankdeposits/104/pdf"); res.EnsureSuccessStatusCode();
List files attached to a bank deposit.
The attachments on this bank deposit, newest first. Accepted filedefinitionid values: 50 (default 50). Metadata only - each file's bytes are at GET /attachments/{id}/content.
Requires scope banking:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The bank deposit id. |
| filedefinitionid | query | integer | Only files in this list. Accepted filedefinitionid values: 50 (default 50). |
| filecategoryid | query | integer | Only files filed under this category. |
| filename | query | string | Partial match on the file name, case insensitive. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No bank deposit with that id in this company. |
curl \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments'); 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/bankdeposits/104/attachments", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments', { 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/bankdeposits/104/attachments"); res.EnsureSuccessStatusCode();
Attach a file to a bank deposit.
multipart/form-data with one file part; see the AttachmentUpload schema for the other parts. Accepted filedefinitionid values: 50 (default 50). Answers 201 with the attachment's metadata and Location: /attachments/{id}. Check _meta.warnings for datatype_truncated and stored_under_parent_company.
Requires scope banking:write.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The bank deposit id. |
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| filerequired | string | The file. Exactly one part named file; a second one, or file[], is 400 invalid_request so an idempotent retry can never half-succeed. Empty is refused. Over the cap (the smaller of APIV2_MAX_UPLOAD_BYTES, 64 MB by default, and PHP's upload_max_filesize / post_max_size) is 413 payload_too_large naming the limit that applied. |
| filename | string(255) | Overrides the part's file name. |
| notes | text | Free text shown beside the file. |
| filedefinitionid | integer | Only when the parent accepts more than one list. Anything the parent does not accept is 422 unknown_value naming the accepted ids. |
| filecategoryid | integer | Category by id. |
| filecategory | string(255) | Category by name. Sent with filecategoryid and disagreeing is 422 conflicting_reference. |
| Status | Code | Meaning |
|---|---|---|
| 400 | unknown_parameter | A form field that is not on the AttachmentUpload schema. |
| 400 | invalid_type | filedefinitionid or filecategoryid that is not an integer. |
| 404 | not_found | No bank deposit with that id in this company. |
| 409 | upload_limit_reached | This file list allows a fixed number of files on a bank deposit and it is full. Remove one first. |
| 413 | payload_too_large | The file is over the cap. The body names the limit that applied. |
| 415 | multipart_required | The body was not multipart/form-data. |
| 422 | unknown_value | filedefinitionid is not one this bank deposit accepts, or the category does not exist in this company. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Idempotency-Key: your-unique-key' \ -F 'file=@grant-letter-signed.pdf' \ -F 'filename=grant-letter-signed.pdf' \ -F 'notes=Signed copy received 21 Sep' \ -F 'filedefinitionid=8' \ -F 'filecategory=Receipts'
$fields = [ 'filename' => 'grant-letter-signed.pdf', 'notes' => 'Signed copy received 21 Sep', 'filedefinitionid' => '8', 'filecategory' => 'Receipts', ]; $fields['file'] = new CURLFile('grant-letter-signed.pdf'); $ch = curl_init('https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN'), 'Idempotency-Key: your-unique-key'], CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $fields, ]); $res = json_decode(curl_exec($ch), true);
import os, requests with open("grant-letter-signed.pdf", "rb") as fh: r = requests.post( "https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}", "Idempotency-Key": "your-unique-key"}, files={"file": fh}, data={ "filename": "grant-letter-signed.pdf", "notes": "Signed copy received 21 Sep", "filedefinitionid": "8", "filecategory": "Receipts", }, ) r.raise_for_status()
import { openAsBlob } from 'node:fs';
const form = new FormData();
form.append('file', await openAsBlob('grant-letter-signed.pdf'), 'grant-letter-signed.pdf');
form.append('filename', "grant-letter-signed.pdf");
form.append('notes', "Signed copy received 21 Sep");
form.append('filedefinitionid', "8");
form.append('filecategory', "Receipts");
const res = await fetch(
'https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments',
{
method: 'POST',
headers: { Authorization: `Bearer ${process.env.NP_TOKEN}`, 'Idempotency-Key': 'your-unique-key' },
body: form,
}
);
const data = await res.json();
var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); using var form = new MultipartFormDataContent(); form.Add(new StreamContent(File.OpenRead("grant-letter-signed.pdf")), "file", "grant-letter-signed.pdf"); form.Add(new StringContent("grant-letter-signed.pdf"), "filename"); form.Add(new StringContent("Signed copy received 21 Sep"), "notes"); form.Add(new StringContent("8"), "filedefinitionid"); form.Add(new StringContent("Receipts"), "filecategory"); var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/bankdeposits/104/attachments") { Content = form }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
dbupdate.php rebuilds it on every update, so it is read-only and your own rows would not survive. Referenced by ccaccounts.ccprocessorid.