Order deposits
Deposits taken against an order. A deposit alone makes an order invoiceable - arorder2invoice.php admits an order that has a deposit even when nothing has shipped. Card brand and number are never returned.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| orderid | integer | Orderid. Id only. |
| amountmoney | string(4dp) | Stored as decimal(19,4). |
| payment_method | integer | Payment method text carried in from the web store order. |
| transaction_id | string(32) | Gateway transaction id of the deposit payment. |
| entrydate | string | When the record was created. |
| last4ofcardread-only | string(4) | Last four digits, for matching a deposit to a statement line. Read-only - written by the card terminal, never by a caller. |
| voucheridread-only | integer | GL voucher. Read-only - set when the deposit posts. |
| cancel | boolean | Cancelled. Always a boolean on the wire, whatever integer width the column uses (D23). |
| lastchangedateread-only | string | Last modification. Drives modifiedsince. |
| bankdepositidread-only | integer | The bank deposit this was included in. Read-only - set by Bank Rec. |
| cctransactionidread-only | integer | The card transaction that produced this deposit. Read-only. |
| checkid | string(100) | Check number or payment reference the deposit was paid with. |
| bankstatement_enddateread-only | string | Set by Bank Reconciliation. Read-only. |
| checkacctid | integer | Bank account the deposit lands in. |
| checkacct | string(30) | Bank account name (checkacct.name) instead of the id. |
| currency | string(10) | Currency the deposit was received in. |
| returned | integer | 1 when the deposit payment was returned by the bank (NSF/bounced). |
| bankfee_amountmoney | string(4dp) | Stored as decimal(19,4). |
| bankfee_glid | integer | GL account any bank fee on this deposit posts to. |
| bankfee_gl | string(20) | GL account number (glaccount.accountnum) instead of the id. |
| rnum | string(30) | Reference number recorded with the deposit. |
| tenderedmoney | string(4dp) | Stored as decimal(19,4). |
| ccterminalidread-only | integer | Terminal that took it. Read-only. |
| bankstatement_cleardateread-only | string | Set by Bank Reconciliation. Read-only. |
| notes | text | Notes. Stored as text, no practical length limit. |
| externalid | string(100) | Your own key. Scoped to your company. |
Endpoints#
POST/orderdeposits/batch
207400422
Create many.
Requires scope payments:write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
Body array
| Field | Type | Description |
|---|---|---|
| orderidrequired | integer | The order the deposit is held against. |
| amountrequiredmoney | string | How much was taken. Cannot exceed the order value. Decimal STRING, not a JSON number. |
| date | string | Date taken. Defaults to today. |
| method | integer | Payment method id. |
| reference | string(100) | Cheque number or transaction reference. |
| externalid | string(100) | Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request was malformed. |
| 422 | deposit_exceeds_order | The deposit would exceed what is left on the order. |
| 422 | period_closed | The GL period containing the date is closed. |
| 422 | rule_violation | NolaPro refused the document. message carries its reason. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/orderdeposits/batch' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '[ { "orderid": 104, "amount": "125.0000", "date": "2026-08-02", "externalid": "crm-8842" } ]'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits/batch'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ [ 'orderid' => 104, 'amount' => '125.0000', 'date' => '2026-08-02', 'externalid' => 'crm-8842', ], ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/orderdeposits/batch", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json=[ { "orderid": 104, "amount": "125.0000", "date": "2026-08-02", "externalid": "crm-8842", }, ], ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits/batch', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify([ { orderid: 104, amount: "125.0000", date: "2026-08-02", externalid: "crm-8842", }, ]), } ); 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 { orderid = 104, amount = "125.0000", date = "2026-08-02", externalid = "crm-8842", }, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/orderdeposits/batch") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Response 207
{
"results": [
{
"index": 1,
"status": 1
}
]
}
GET/orderdeposits
200403
List order deposits.
Requires scope payments:read.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| orderid | query | string | Restrict to one orderid. |
| rnum | query | string | 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. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | Token lacks read scope. |
curl \ 'https://acme.nolapro.com/!/api/v2/orderdeposits' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits'); 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/orderdeposits", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits', { 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/orderdeposits"); res.EnsureSuccessStatusCode();
POST/orderdeposits
201400422
Create.
Requires scope payments:write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
Body
| Field | Type | Description |
|---|---|---|
| orderidrequired | integer | The order the deposit is held against. |
| amountrequiredmoney | string | How much was taken. Cannot exceed the order value. Decimal STRING, not a JSON number. |
| date | string | Date taken. Defaults to today. |
| method | integer | Payment method id. |
| reference | string(100) | Cheque number or transaction reference. |
| externalid | string(100) | Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A required field was missing. |
| 422 | deposit_exceeds_order | The deposit would exceed what is left on the order. |
| 422 | period_closed | The GL period containing the date is closed. |
| 422 | rule_violation | NolaPro refused the document. message carries its reason. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/orderdeposits' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "orderid": 104, "amount": "125.0000", "date": "2026-08-02", "externalid": "crm-8842" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'orderid' => 104, 'amount' => '125.0000', 'date' => '2026-08-02', 'externalid' => 'crm-8842', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/orderdeposits", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "orderid": 104, "amount": "125.0000", "date": "2026-08-02", "externalid": "crm-8842", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ orderid: 104, amount: "125.0000", date: "2026-08-02", externalid: "crm-8842", }), } ); 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 { orderid = 104, amount = "125.0000", date = "2026-08-02", externalid = "crm-8842", }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/orderdeposits") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Response 201
{
"orderid": 104,
"amount": "125.0000",
"voucherid": 104,
"ondeposit": "125.0000",
"ordertotal": "125.0000"
}
GET/orderdeposits/{id}
200404
Retrieve one record.
Requires scope payments:read.
Parameters
| 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. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl \ 'https://acme.nolapro.com/!/api/v2/orderdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits/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/orderdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits/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/orderdeposits/104"); res.EnsureSuccessStatusCode();
Response 200
{
"orderid": 104,
"amount": "125.0000",
"payment_method": 1,
"transaction_id": "Example transaction id",
"checkid": "Example checkid",
"checkacctid": 104
}
PATCH/orderdeposits/{id}
200400404409422
Update.
Requires scope payments:write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
Body
| Field | Type | Description |
|---|---|---|
| reference | string(100) | Cheque number or transaction reference. |
| method | integer | Payment method id. |
| externalid | string(100) | Your own identifier for this record. |
When it fails
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request was malformed. |
| 404 | not_found | No such record, or it belongs to another company. |
| 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/orderdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "reference": "Example reference", "method": 1 }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode([ 'reference' => 'Example reference', 'method' => 1, ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.patch( "https://acme.nolapro.com/!/api/v2/orderdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "reference": "Example reference", "method": 1, }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits/104', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ reference: "Example reference", method: 1, }), } ); 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 { reference = "Example reference", method = 1, }; var req = new HttpRequestMessage(HttpMethod.Patch, "https://acme.nolapro.com/!/api/v2/orderdeposits/104") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
DELETE/orderdeposits/{id}
200400409422
Cancel.
Requires scope payments:cancel.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
When it fails
| 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/orderdeposits/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/orderdeposits/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/orderdeposits/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/orderdeposits/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/orderdeposits/104"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();