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#

FieldTypeDescription
idread-onlyintegerNolaPro id.
orderidintegerOrderid. Id only.
amountmoneystring(4dp)Stored as decimal(19,4).
payment_methodintegerPayment method text carried in from the web store order.
transaction_idstring(32)Gateway transaction id of the deposit payment.
entrydatestringWhen the record was created.
last4ofcardread-onlystring(4)Last four digits, for matching a deposit to a statement line. Read-only - written by the card terminal, never by a caller.
voucheridread-onlyintegerGL voucher. Read-only - set when the deposit posts.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
lastchangedateread-onlystringLast modification. Drives modifiedsince.
bankdepositidread-onlyintegerThe bank deposit this was included in. Read-only - set by Bank Rec.
cctransactionidread-onlyintegerThe card transaction that produced this deposit. Read-only.
checkidstring(100)Check number or payment reference the deposit was paid with.
bankstatement_enddateread-onlystringSet by Bank Reconciliation. Read-only.
checkacctidintegerBank account the deposit lands in.
checkacctstring(30)Bank account name (checkacct.name) instead of the id.
currencystring(10)Currency the deposit was received in.
returnedinteger1 when the deposit payment was returned by the bank (NSF/bounced).
bankfee_amountmoneystring(4dp)Stored as decimal(19,4).
bankfee_glidintegerGL account any bank fee on this deposit posts to.
bankfee_glstring(20)GL account number (glaccount.accountnum) instead of the id.
rnumstring(30)Reference number recorded with the deposit.
tenderedmoneystring(4dp)Stored as decimal(19,4).
ccterminalidread-onlyintegerTerminal that took it. Read-only.
bankstatement_cleardateread-onlystringSet by Bank Reconciliation. Read-only.
notestextNotes. Stored as text, no practical length limit.
externalidstring(100)Your own key. Scoped to your company.

Endpoints#

POST/orderdeposits/batch 207400422

Create many.

Requires scope payments:write.

Parameters
NameInTypeNotes
Body array
FieldTypeDescription
orderidrequiredintegerThe order the deposit is held against.
amountrequiredmoneystringHow much was taken. Cannot exceed the order value. Decimal STRING, not a JSON number.
datestringDate taken. Defaults to today.
methodintegerPayment method id.
referencestring(100)Cheque number or transaction reference.
externalidstring(100)Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
422deposit_exceeds_orderThe deposit would exceed what is left on the order.
422period_closedThe GL period containing the date is closed.
422rule_violationNolaPro 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"
    }
]'
Response 207
{
    "results": [
        {
            "index": 1,
            "status": 1
        }
    ]
}
GET/orderdeposits 200403

List order deposits.

Requires scope payments:read.

Parameters
NameInTypeNotes
orderidquerystringRestrict to one orderid.
rnumquerystringPartial match, case insensitive.
cancelquerystringDefaults to false. Pass true or any.
modifiedsincequerystringRFC 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.
externalidquerystringExact match on your own key.
includequerystringComma-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
StatusCodeMeaning
403insufficient_scopeToken lacks read scope.
curl \
  'https://acme.nolapro.com/!/api/v2/orderdeposits' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/orderdeposits 201400422

Create.

Requires scope payments:write.

Parameters
NameInTypeNotes
Body
FieldTypeDescription
orderidrequiredintegerThe order the deposit is held against.
amountrequiredmoneystringHow much was taken. Cannot exceed the order value. Decimal STRING, not a JSON number.
datestringDate taken. Defaults to today.
methodintegerPayment method id.
referencestring(100)Cheque number or transaction reference.
externalidstring(100)Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again.
When it fails
StatusCodeMeaning
400invalid_requestA required field was missing.
422deposit_exceeds_orderThe deposit would exceed what is left on the order.
422period_closedThe GL period containing the date is closed.
422rule_violationNolaPro 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"
}'
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
NameInTypeNotes
idrequiredpathintegerThe record id.
includequerystringComma-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
StatusCodeMeaning
404not_foundNo record with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/orderdeposits/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
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
NameInTypeNotes
idrequiredpathintegerThe record id.
Body
FieldTypeDescription
referencestring(100)Cheque number or transaction reference.
methodintegerPayment method id.
externalidstring(100)Your own identifier for this record.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
404not_foundNo such record, or it belongs to another company.
409stale_recordIf-Match did not match; someone else changed it first.
422rule_violationNolaPro 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
}'
DELETE/orderdeposits/{id} 200400409422

Cancel.

Requires scope payments:cancel.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
409cannot_cancelSomething already depends on this document - a payment, a shipment, an invoice.
422period_closedThe current GL period is closed, so a reversal has nowhere to post.
422unknown_valueNo such record in this company.
curl -X DELETE \
  'https://acme.nolapro.com/!/api/v2/orderdeposits/104' \
  -H 'Authorization: Bearer $NP_TOKEN'