Customers

The companies you invoice. A customer carries terms, credit limit, tax group, and any number of ship-to addresses.

Ledger rule

Customers are never removed. DELETE /customers/{id} sets the cancel flag and keeps history intact.

The object#

FieldTypeDescription
idread-onlyintegerNolaPro id.
companynamestring(100)The customer name. Required on create. Not unique, and not a lookup key - use customercode.
companyname2string(50)Second name line.
customercodestring(30)Your short code for this customer, and the key the customer reference field resolves against. About a quarter of customers have none.
chargecodestring(30)Charge code shown beside the name in some screens.
displaynameread-onlystring(255)Generated by the database from the name and code. Read-only.
fullnameread-onlystring(255)Generated by the database. Read-only.
address1string(100)Street address.
address2string(100)Second address line.
citystring(50)City of the billing address.
statestring(20)State or province.
zipstring(15)Postal code.
countrystring(20)Country of the billing address.
phone1string(20)Primary phone.
email1string(255)Primary email. Where invoices go unless email2sendinvoices says otherwise.
email2string(255)Secondary email.
websitestring(100)Customer’s website URL.
creditlimitmoneystringZero means no limit. Stored as a double, not DECIMAL(19,4) - see Conventions on money.
invoicetermsidintegerTerms id. Defaulted from the company setting when omitted on create.
invoicetermsstring(30)Terms code, matched against invoiceterms.verbal. Send this or invoicetermsid, not both unless they agree.
currencystring(10)Currency code for this customer.
nocreditbooleanNo credit allowed - this customer pays up front.
taxgroupidintegerTax group applied to the customer’s sales.
taxgroupstring(20)Tax group code instead of the id.
taxexemptidintegerTax exemption id, 0 for none.
taxexemptstring(32)Tax exemption name (taxexempt.exemptname) instead of the id.
salestaxnumstring(30)Sales tax registration number.
salesmanidintegerSalesperson id.
salesmanstring(50)Salesperson name (salesman.name) instead of the id.
salesglacctidintegerSales GL account id, 0 to use the company default.
salesglacctstring(20)GL account NUMBER (glaccount.name) instead of the id.
groupidintegerCustomer group id. Id only - the table this points at is not identifiable from the column name, so there is no human key to send instead.
cancelbooleanTrue once cancelled by DELETE. Hidden from lists unless you ask for it.
closedbooleanThe relationship has ended. Not the same as cancelled.
on_holdbooleanTrading is suspended, usually for credit. Check this before shipping - an on-hold customer is not cancelled and will otherwise accept orders.
on_hold_dateread-onlystringWhen the hold was applied.
default_postring(30)Default PO number applied to this customer’s orders.
notestextFree-text notes. Stored as longtext, so there is no practical length limit.
externalidstring(100)Your own key for this customer. Scoped to your company.
lastchangedateread-onlystringLast modification. Drives modifiedsince.

Endpoints#

GET/customers 200400401403

List customers.

Filters are a fixed allow-list. Anything not listed here returns 400 naming the parameter.

Requires scope customers:read.

Parameters
NameInTypeNotes
companynamequerystringCompany name. Partial match, case-insensitive.
customercodequerystringCustomer code. Partial match.
cityquerystringBilling city. Partial match.
statequerystringBilling state. Partial match.
zipquerystringBilling postal code. Partial match.
salesmanidquerystringRestrict to one salesperson.
groupidquerystringRestrict to one customer group.
closedquerystringtrue or false. Omitted means both - closed customers still appear, because closed is a status, not a cancellation (D23).
on_holdquerystringtrue or false. Omitted means both. On hold blocks new orders; it does not hide the customer.
cancelquerystringDefaults to false, which hides cancelled records. Pass true for only cancelled, or any for both.
pagequeryinteger1-based. Defaults to 1.
perpagequeryintegerDefaults to 50, capped at 250.
externalidquerystringLook up by your own key instead of by id. Unique per company and per system tag.
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.
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
400unknown_parameterAn unknown filter parameter was sent.
401unauthorizedMissing, malformed, revoked, or expired token.
403forbiddenThe token lacks customers:read, or the user has no rights to customers.
curl \
  'https://acme.nolapro.com/!/api/v2/customers' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "data": [
        {
            "id": 1187,
            "companyname": "Summit Retail LLC",
            "companyname2": "",
            "customercode": "SUMMIT-01",
            "chargecode": "",
            "displayname": "Summit Retail LLC (SUMMIT-01)",
            "fullname": "Summit Retail LLC",
            "address1": "900 Industrial Pkwy",
            "address2": "",
            "city": "Fostoria",
            "state": "OH",
            "zip": "44830",
            "country": "US",
            "phone1": "419-435-0404",
            "email1": "ap@summitretail.example",
            "email2": "",
            "website": "",
            "creditlimit": "25000.0000",
            "invoicetermsid": 112,
            "invoiceterms": "Net 30",
            "currency": "USD",
            "nocredit": false,
            "taxgroupid": 4,
            "taxgroup": "OH-SEN",
            "taxexemptid": 0,
            "taxexempt": "Resale",
            "salestaxnum": "",
            "salesmanid": 3,
            "salesman": "Sales Person",
            "salesglacctid": 0,
            "salesglacct": "4000",
            "groupid": 0,
            "cancel": false,
            "closed": false,
            "on_hold": false,
            "default_po": "",
            "notes": "",
            "externalid": "crm-8842",
            "lastchangedate": "2026-07-31T14:02:11Z"
        }
    ],
    "page": 1,
    "perpage": 50,
    "total": 214
}
POST/customers 201400409422

Create a customer.

Requires scope customers:write.

Parameters
NameInTypeNotes
Body
FieldTypeDescription
companynamerequiredstring(100)The customer name. Required on create. Not unique, and not a lookup key - use customercode.
companyname2string(50)Second name line.
customercodestring(30)Your short code for this customer, and the key the customer reference field resolves against. About a quarter of customers have none.
address1string(100)Street address.
address2string(100)Second address line.
citystring(50)City of the billing address.
statestring(20)State or province.
zipstring(15)Postal code.
countrystring(20)Country of the billing address.
phone1string(20)Primary phone.
email1string(255)Primary email. Where invoices go unless email2sendinvoices says otherwise.
creditlimitmoneystringZero means no limit. Stored as a double, not DECIMAL(19,4) - see Conventions on money.
invoicetermsidintegerTerms id. Defaulted from the company setting when omitted on create.
invoicetermsstring(30)Terms code, matched against invoiceterms.verbal. Send this or invoicetermsid, not both unless they agree.
currencystring(10)Currency code for this customer.
taxgroupidintegerTax group applied to the customer’s sales.
taxgroupstring(20)Tax group code instead of the id.
salesmanidintegerSalesperson id.
salesmanstring(50)Salesperson name instead of the id.
default_postring(30)Default PO number applied to this customer’s orders.
notestextFree-text notes. Stored as longtext, so there is no practical length limit.
externalidstring(100)Your own key for this customer. Scoped to your company.
chargecodestring(30)Charge code shown beside the name in some screens.
email2string(255)Secondary email.
websitestring(100)Customer’s website URL.
nocreditbooleanNo credit allowed - this customer pays up front.
taxexemptidintegerTax exemption id, 0 for none.
taxexemptstring(32)Tax exemption name (taxexempt.exemptname) instead of the id.
salestaxnumstring(30)Sales tax registration number.
salesglacctidintegerSales GL account id, 0 to use the company default.
salesglacctstring(20)GL account NUMBER (glaccount.name) instead of the id.
groupidintegerCustomer group id. Id only - the table this points at is not identifiable from the column name, so there is no human key to send instead.
cancelbooleanTrue once cancelled by DELETE. Hidden from lists unless you ask for it.
closedbooleanThe relationship has ended. Not the same as cancelled.
on_holdbooleanTrading is suspended, usually for credit. Check this before shipping - an on-hold customer is not cancelled and will otherwise accept orders.
When it fails
StatusCodeMeaning
400invalid_requestA field is missing or the wrong type.
409duplicateA customer with this name already exists in the company.
422rule_violationThe values are well-formed but break an accounting rule, for example an unknown terms code.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/customers' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "chargecode": "",
    "email2": "",
    "website": "",
    "nocredit": false,
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false
}'
Response 201
{
    "id": 1187,
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "chargecode": "",
    "displayname": "Summit Retail LLC (SUMMIT-01)",
    "fullname": "Summit Retail LLC",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "email2": "",
    "website": "",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "nocredit": false,
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false,
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "lastchangedate": "2026-07-31T14:02:11Z"
}
GET/customers/{id} 200404

Retrieve one customer.

Requires scope customers:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer 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 customer with that id in this company.
curl \
  'https://acme.nolapro.com/!/api/v2/customers/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "id": 1187,
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "chargecode": "",
    "displayname": "Summit Retail LLC (SUMMIT-01)",
    "fullname": "Summit Retail LLC",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "email2": "",
    "website": "",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "nocredit": false,
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false,
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "lastchangedate": "2026-07-31T14:02:11Z"
}
PATCH/customers/{id} 200404409

Update a customer.

Only the fields you send are changed. There is no PUT - with 168 fields a full replace would blank everything you omitted.

Requires scope customers:write.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
Body
FieldTypeDescription
companynamerequiredstring(100)The customer name. Required on create. Not unique, and not a lookup key - use customercode.
companyname2string(50)Second name line.
customercodestring(30)Your short code for this customer, and the key the customer reference field resolves against. About a quarter of customers have none.
address1string(100)Street address.
address2string(100)Second address line.
citystring(50)City of the billing address.
statestring(20)State or province.
zipstring(15)Postal code.
countrystring(20)Country of the billing address.
phone1string(20)Primary phone.
email1string(255)Primary email. Where invoices go unless email2sendinvoices says otherwise.
creditlimitmoneystringZero means no limit. Stored as a double, not DECIMAL(19,4) - see Conventions on money.
invoicetermsidintegerTerms id. Defaulted from the company setting when omitted on create.
invoicetermsstring(30)Terms code, matched against invoiceterms.verbal. Send this or invoicetermsid, not both unless they agree.
currencystring(10)Currency code for this customer.
taxgroupidintegerTax group applied to the customer’s sales.
taxgroupstring(20)Tax group code instead of the id.
salesmanidintegerSalesperson id.
salesmanstring(50)Salesperson name instead of the id.
default_postring(30)Default PO number applied to this customer’s orders.
notestextFree-text notes. Stored as longtext, so there is no practical length limit.
externalidstring(100)Your own key for this customer. Scoped to your company.
chargecodestring(30)Charge code shown beside the name in some screens.
email2string(255)Secondary email.
websitestring(100)Customer’s website URL.
nocreditbooleanNo credit allowed - this customer pays up front.
taxexemptidintegerTax exemption id, 0 for none.
taxexemptstring(32)Tax exemption name (taxexempt.exemptname) instead of the id.
salestaxnumstring(30)Sales tax registration number.
salesglacctidintegerSales GL account id, 0 to use the company default.
salesglacctstring(20)GL account NUMBER (glaccount.name) instead of the id.
groupidintegerCustomer group id. Id only - the table this points at is not identifiable from the column name, so there is no human key to send instead.
cancelbooleanTrue once cancelled by DELETE. Hidden from lists unless you ask for it.
closedbooleanThe relationship has ended. Not the same as cancelled.
on_holdbooleanTrading is suspended, usually for credit. Check this before shipping - an on-hold customer is not cancelled and will otherwise accept orders.
When it fails
StatusCodeMeaning
404not_foundNo customer with that id.
409stale_recordIf-Match did not match.
curl -X PATCH \
  'https://acme.nolapro.com/!/api/v2/customers/104' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "chargecode": "",
    "email2": "",
    "website": "",
    "nocredit": false,
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false
}'
Response 200
{
    "id": 1187,
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "chargecode": "",
    "displayname": "Summit Retail LLC (SUMMIT-01)",
    "fullname": "Summit Retail LLC",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "email2": "",
    "website": "",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "nocredit": false,
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false,
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "lastchangedate": "2026-07-31T14:02:11Z"
}
DELETE/customers/{id} 200403404409

Cancel one customer.

Sets the cancel flag through the same path the application uses, so whatever bookkeeping cancelling this record implies happens with it. Nothing is removed. Cancelling an already cancelled customer succeeds.

Requires scope customers:cancel.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
When it fails
StatusCodeMeaning
403insufficient_scopeThe token has customers:write but not customers:cancel.
404not_foundNo customer with that id in this company.
409cannot_cancelCannot be cancelled in its current state. The message says why.
curl -X DELETE \
  'https://acme.nolapro.com/!/api/v2/customers/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "id": 1187,
    "companyname": "Summit Retail LLC",
    "companyname2": "",
    "customercode": "SUMMIT-01",
    "chargecode": "",
    "displayname": "Summit Retail LLC (SUMMIT-01)",
    "fullname": "Summit Retail LLC",
    "address1": "900 Industrial Pkwy",
    "address2": "",
    "city": "Fostoria",
    "state": "OH",
    "zip": "44830",
    "country": "US",
    "phone1": "419-435-0404",
    "email1": "ap@summitretail.example",
    "email2": "",
    "website": "",
    "creditlimit": "25000.0000",
    "invoicetermsid": 112,
    "invoiceterms": "Net 30",
    "currency": "USD",
    "nocredit": false,
    "taxgroupid": 4,
    "taxgroup": "OH-SEN",
    "taxexemptid": 0,
    "taxexempt": "Resale",
    "salestaxnum": "",
    "salesmanid": 3,
    "salesman": "Sales Person",
    "salesglacctid": 0,
    "salesglacct": "4000",
    "groupid": 0,
    "cancel": false,
    "closed": false,
    "on_hold": false,
    "default_po": "",
    "notes": "",
    "externalid": "crm-8842",
    "lastchangedate": "2026-07-31T14:02:11Z"
}
GET/customers/{id}/balance 200404

Open balance, per currency.

Replaces v1's customer-balance action. Computed by Customer_model::getAgingSummary() - the AR Aging report's own code, so this and the report cannot disagree. For the same figure split by age, use /customers/{id}/aging.

Requires scope customers:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
asofdatequerystringDefaults to today.
When it fails
StatusCodeMeaning
404not_foundNo customer with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/customers/104/balance' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "balances": [
        {
            "currency": "Example currency",
            "balance": "125.0000"
        }
    ]
}
POST/customers/batch 207

Create many.

Always answers 207, one result per item.

Requires scope customers:write.

Parameters
NameInTypeNotes
Body array
FieldTypeDescription
idread-onlyintegerNolaPro id.
companynamestring(100)The customer name. Required on create. Not unique, and not a lookup key - use customercode.
companyname2string(50)Second name line.
customercodestring(30)Your short code for this customer, and the key the customer reference field resolves against. About a quarter of customers have none.
chargecodestring(30)Charge code shown beside the name in some screens.
displaynameread-onlystring(255)Generated by the database from the name and code. Read-only.
fullnameread-onlystring(255)Generated by the database. Read-only.
address1string(100)Street address.
address2string(100)Second address line.
citystring(50)City of the billing address.
statestring(20)State or province.
zipstring(15)Postal code.
countrystring(20)Country of the billing address.
phone1string(20)Primary phone.
email1string(255)Primary email. Where invoices go unless email2sendinvoices says otherwise.
email2string(255)Secondary email.
websitestring(100)Customer’s website URL.
creditlimitmoneystringZero means no limit. Stored as a double, not DECIMAL(19,4) - see Conventions on money.
invoicetermsidintegerTerms id. Defaulted from the company setting when omitted on create.
invoicetermsstring(30)Terms code, matched against invoiceterms.verbal. Send this or invoicetermsid, not both unless they agree.
currencystring(10)Currency code for this customer.
nocreditbooleanNo credit allowed - this customer pays up front.
taxgroupidintegerTax group applied to the customer’s sales.
taxgroupstring(20)Tax group code instead of the id.
taxexemptidintegerTax exemption id, 0 for none.
taxexemptstring(32)Tax exemption name (taxexempt.exemptname) instead of the id.
salestaxnumstring(30)Sales tax registration number.
salesmanidintegerSalesperson id.
salesmanstring(50)Salesperson name (salesman.name) instead of the id.
salesglacctidintegerSales GL account id, 0 to use the company default.
salesglacctstring(20)GL account NUMBER (glaccount.name) instead of the id.
groupidintegerCustomer group id. Id only - the table this points at is not identifiable from the column name, so there is no human key to send instead.
cancelbooleanTrue once cancelled by DELETE. Hidden from lists unless you ask for it.
closedbooleanThe relationship has ended. Not the same as cancelled.
on_holdbooleanTrading is suspended, usually for credit. Check this before shipping - an on-hold customer is not cancelled and will otherwise accept orders.
on_hold_dateread-onlystringWhen the hold was applied.
default_postring(30)Default PO number applied to this customer’s orders.
notestextFree-text notes. Stored as longtext, so there is no practical length limit.
externalidstring(100)Your own key for this customer. Scoped to your company.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/customers/batch' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '[
    {
        "id": 1187,
        "companyname": "Summit Retail LLC",
        "companyname2": "",
        "customercode": "SUMMIT-01",
        "chargecode": "",
        "displayname": "Summit Retail LLC (SUMMIT-01)",
        "fullname": "Summit Retail LLC",
        "address1": "900 Industrial Pkwy",
        "address2": "",
        "city": "Fostoria",
        "state": "OH",
        "zip": "44830",
        "country": "US",
        "phone1": "419-435-0404",
        "email1": "ap@summitretail.example",
        "email2": "",
        "website": "",
        "creditlimit": "25000.0000",
        "invoicetermsid": 112,
        "invoiceterms": "Net 30",
        "currency": "USD",
        "nocredit": false,
        "taxgroupid": 4,
        "taxgroup": "OH-SEN",
        "taxexemptid": 0,
        "taxexempt": "Resale",
        "salestaxnum": "",
        "salesmanid": 3,
        "salesman": "Sales Person",
        "salesglacctid": 0,
        "salesglacct": "4000",
        "groupid": 0,
        "cancel": false,
        "closed": false,
        "on_hold": false,
        "default_po": "",
        "notes": "",
        "externalid": "crm-8842",
        "lastchangedate": "2026-07-31T14:02:11Z"
    }
]'
GET/customers/{id}/aging 200404

Open balance split into aging buckets.

Replaces v1's customer-aging action. Computed by Customer_model::getAgingSummary() - the AR Aging report's own code, so this and the report cannot disagree.

Requires scope customers:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
asofdatequerystringDefaults to today.
When it fails
StatusCodeMeaning
404not_foundNo customer with that id.
curl \
  'https://acme.nolapro.com/!/api/v2/customers/104/aging' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "aging": [
        {
            "buckets": [
                {
                    "label": "Example label",
                    "fromdays": 1,
                    "todays": 1,
                    "amount": "125.0000"
                }
            ]
        }
    ]
}
GET/customers/{id}/statement 200

Customer statement as a PDF

The account statement, covering the last twelve months. 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 customers:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
curl \
  'https://acme.nolapro.com/!/api/v2/customers/104/statement' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/customers/{id}/invoicestatus 200

Customer invoice status as a PDF

Where each of the customer’s orders and invoices currently stands. 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 customers:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe customer id.
curl \
  'https://acme.nolapro.com/!/api/v2/customers/104/invoicestatus' \
  -H 'Authorization: Bearer $NP_TOKEN'