Orders

Sales orders. One table serves several documents. ordertype is fulfillment, service or rental; status is quote, unconfirmed, open, partial or billed. A quote is status: "quote" - it is not an order type, and it wins over ordertype, so a service order that is still a quote is a quote. Converting a quote to an order is a PATCH of status to open, which commits inventory.

The object#

FieldTypeDescription
idread-onlyintegerNolaPro id.
ordernumberread-onlyintegerEquals id - set by the system immediately after insert, kept only for legacy joins. Not a sequence, not money (the column is a double for historical reasons), and never writable. The human-facing number is onum.
onumstring(30)Display order number when it differs from the record id; imported orders keep their original numbers here.
ponumberstring(30)The customer's purchase order number.
orderbycompanyidintegerOrderbycompanyid. Id only.
shiptocompanyidintegerShiptocompanyid. Id only.
statusstringWhere the document is in its life. A quote is a status, not an order type, and it wins over ordertype. Stored as int -1/-2/0/1/2; never exposed or accepted (D35). One of quote, unconfirmed, open, partial, billed.
customerbillcodestring(20)Customer Bill Code printed on order documents.
pricelevelidintegerPricelevelid. Id only.
inventorylocationidintegerInventorylocationid. Id only.
inventorylocationstring(20)The locationcode of the referenced inventorylocations, instead of the id. Send this or inventorylocationid, not both unless they agree.
cancelbooleanCancelled. Always a boolean on the wire, whatever integer width the column uses (D23).
entrydatestringWhen the record was created.
duedatestringDate payment is due.
lastchangedateread-onlystringLast modification. Drives modifiedsince.
payment_methodstring(12)Payment method text carried in from the web store order.
shipping_methodstring(32)Shipping method text carried in from the web store order.
orders_date_finishedstringDate the web store marked the order finished.
currencystring(10)Currency the order is priced in.
transaction_idread-onlystring(32)Payment gateway reference. Read-only: written by the gateway, never by a caller.
customers_idintegerCustomer id in the osCommerce-style web store tables, for cart integrations.
customersstring(30)The customercode of the referenced customers, instead of the id. Send this or customers_id, not both unless they agree.
shipping_costmoneystring(4dp)Stored as decimal(19,4).
order_weightnumberstring(2dp)Numeric string, 2 decimal places. Not money - do not apply currency rounding.
currency_valuenumberstring(6dp)Numeric string, 6 decimal places. Not money - do not apply currency rounding.
wherefromstring(100)Module or channel that created the order; empty for orders entered in NolaPro.
confirmed_bystring(100)Who confirmed the order.
confirmed_datestring(100)Date the order was confirmed.
confirmedstring(100)1 once the order is confirmed with the customer.
paymethintegerPayment method: 1 = cash, 2 = check, 3 = credit card, 4 = ACH/EFT, 5 = card terminal; 0 = on account or unset.
ordertypestringWhat kind of document this is. Stored as int 0/1/2; the integer is never exposed or accepted (D35). One of fulfillment, service, rental.
estimatemoneystring(4dp)Stored as decimal(19,4).
depositmoneystring(4dp)Stored as decimal(19,4).
salesmanidintegerReference to salesmen, by id. Write either this or salesman.
salesmanstring(50)The name of the referenced salesmen, instead of the id. Send this or salesmanid, not both unless they agree.
sales_categoriesidintegerSales category the order reports under.
sales_categoriesstring(50)The description of the referenced salescategories, instead of the id. Send this or sales_categoriesid, not both unless they agree.
statusidintegerStatusid. Id only.
rma_arorder_returnedidintegerRma arorder returnedid. Id only.
rma_orig_arorderidintegerRma orig arorderid. Id only.
carrierserviceid_preferredintegerCarrier service the customer prefers for shipping this order.
finalshipinteger1 when the order is Marked Final - no more shipments are expected.
curratenumberstring(10dp)Numeric string, 10 decimal places. Not money - do not apply currency rounding.
arglaccountidintegerArglaccountid. Id only.
arglaccountstring(20)The name of the referenced glaccounts, instead of the id. Send this or arglaccountid, not both unless they agree.
defaultworktypeidintegerReference to worktypes, by id. Write either this or defaultworktype.
defaultworktypestring(50)The name of the referenced worktypes, instead of the id. Send this or defaultworktypeid, not both unless they agree.
jobidintegerJobid. Id only.
defaultworksubtypeidintegerDefaultworksubtypeid. Id only.
stageidintegerStageid. Id only.
ediinteger1 when the order arrived through EDI.
costcodeidintegerCost code.
costcodestring(20)Code for the referenced costcode, instead of the id.
outsidesalesmarginintegerMargin percentage used for outside-sales commission on the order; -1 when the margin was overridden.
ediasninteger1 once the EDI advance ship notice (ASN) has been sent for the order.
ediinvoiceinteger1 once the invoice has been sent through EDI.
lastshipdateread-onlystringDate of the most recent shipment on the order.
defaultvendoridintegerReference to vendors, by id. Write either this or defaultvendor.
defaultvendorstring(30)The vendorcode of the referenced vendors, instead of the id. Send this or defaultvendorid, not both unless they agree.
shippingnotestextShippingnotes. Stored as text, no practical length limit.
contactnameidintegerContactnameid. Id only.
dropshipbooleanTrue when the order drop-ships from the vendor directly to the customer.
glcategoryidintegerGlcategoryid. Id only.
glcategorystring(20)The code of the referenced glcategories, instead of the id. Send this or glcategoryid, not both unless they agree.
pickticklastprintread-onlystringWhen the pick ticket was last printed. Maintained by the print flow, so it cannot be written through the API.
pickticknumprintread-onlyintegerHow many times the pick ticket has printed. Maintained by the print flow, so it cannot be written through the API.
revisionread-onlyintegerRevision counter, incremented each time the order is edited with changes.
taxclassidintegerTaxclassid. Id only.
taxclassstring(100)The name of the referenced taxclasses, instead of the id. Send this or taxclassid, not both unless they agree.
unreadboolean1 until someone opens the order in NolaPro; new web and B2B orders arrive unread.
clonedquotearorderidintegerClonedquotearorderid. Id only.
ordertotalmoneystring(4dp)Stored as decimal(19,4).
rentalsbillwhenbooleanFor rental orders: when rentals bill (0 = on return, 1 = periodically while out).
signaturerequiredboolean1 when delivery requires a signature.
taxexemptidintegerReference to taxexempts, by id. Write either this or taxexempt.
taxexemptstring(32)The exemptname of the referenced taxexempts, instead of the id. Send this or taxexemptid, not both unless they agree.
usecontactdetailsboolean1 prints the order contact’s details on documents instead of the customer’s main details.
billtoshiptoidintegerBilltoshiptoid. Id only.
defaultassetidintegerDefaultassetid. Id only.
effective_statusread-onlyintegerCached derived status used by order lists: -98 = cancelled, -97 = complete, -96 = out on rent, otherwise the order status code. Maintained by the calculation cache, so it cannot be written through the API.
passthrucontactidintegerPassthrucontactid. Id only.
passthrucustomerbilltoshiptoidintegerPassthrucustomerbilltoshiptoid. Id only.
passthrucustomeridintegerPassthrucustomerid. Id only.
passthrucustomerstring(30)The customercode of the referenced customers, instead of the id. Send this or passthrucustomerid, not both unless they agree.
ordernumberdisplayread-onlystring(30)STORED GENERATED in the database. Read-only - MySQL computes it, and a value sent here is silently discarded.
estimatedmultiplierintegerEstimated Multiplier applied when estimating the order’s pricing.
hidebettervalueinfopdfinteger1 hides the better-value pricing block on the printed quote PDF.
externalidstring(100)Your own key. Scoped to your company.

Endpoints#

GET/orders/{id}/notes 200422

Notes on an order and its lines.

As with invoices, but for orders. private marks a note as internal - a support or CRM integration reading these should respect it before showing anything to a customer.

Requires scope orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe order id.
When it fails
StatusCodeMeaning
422unknown_valueNo such parent record in this company.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/notes' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/orders/{id}/tax 200422

Tax charged on an order, by jurisdiction.

The order-level equivalent of the invoice line breakdown. Useful before the order is billed, when the invoice tax detail does not exist yet.

Requires scope orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe order id.
When it fails
StatusCodeMeaning
422unknown_valueNo such parent record in this company.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/tax' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/orders/batch 207400422

Create many.

Requires scope orders:write.

Parameters
NameInTypeNotes
Body array
FieldTypeDescription
customeridrequiredintegerWho is ordering.
datestringOrder date. Defaults to today.
ponumberstring(30)The customer's PO number.
shiptoidintegerShip-to company, if different from the customer.
numberstring(30)Order number. Leave it out and NolaPro allocates one.
ordertypestringOrder type: fulfillment, service, or rental. One of fulfillment, service, rental.
statusstringSend quote to raise a quote, which does NOT commit stock. Anything else confirms the order and reserves inventory. One of quote, unconfirmed, open, partial, billed.
externalidstring(100)Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again.
linesrequiredarray of objectAt least one line. The total is derived - do not send it.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
422cannot_invoice_quoteThe order is still a quote, so there is nothing billable.
422nothing_to_invoiceNothing shipped and unbilled remains on the document.
422rule_violationNolaPro refused the document. message carries its reason.
422unknown_valueA reference did not resolve in this company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/orders/batch' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '[
    {
        "customerid": 104,
        "date": "2026-08-02",
        "ordertype": "fulfillment",
        "status": "quote",
        "externalid": "crm-8842",
        "lines": [
            {
                "quantity": "3.000000",
                "price": "125.0000"
            }
        ]
    }
]'
Response 207
{
    "results": [
        {
            "index": 1,
            "status": 1
        }
    ]
}
GET/orders 200403

List orders.

Requires scope orders:read.

Parameters
NameInTypeNotes
ordertypequerystringRestrict to one ordertype. One of: fulfillment, service, rental.
statusquerystringRestrict to one status. One of: quote, unconfirmed, open, partial, billed.
orderbycompanyidquerystringRestrict to one orderbycompanyid.
shiptocompanyidquerystringRestrict to one shiptocompanyid.
inventorylocationidquerystringRestrict to one inventorylocationid.
salesmanidquerystringRestrict to one salesmanid.
jobidquerystringRestrict to one jobid.
onumquerystringonum. Partial match, case-insensitive.
ponumberquerystringponumber. Partial match, case-insensitive.
ordernumberquerystringPartial 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/orders' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/orders 201400422

Create.

Creates an order, a quote or a service order - which one is decided by ordertype and status, not by the URL. Optionally send lines, hours and shipments in the same request: each is attached to the new order inside one transaction. The response echoes the tree in the order you sent it, with real ids, so you can map your input positions.

Requires scope orders:write.

Parameters
NameInTypeNotes
Body
FieldTypeDescription
customeridrequiredintegerWho is ordering.
datestringOrder date. Defaults to today.
ponumberstring(30)The customer's PO number.
shiptoidintegerShip-to company, if different from the customer.
numberstring(30)Order number. Leave it out and NolaPro allocates one.
ordertypestringOrder type: fulfillment, service, or rental. One of fulfillment, service, rental.
statusstringSend quote to raise a quote, which does NOT commit stock. Anything else confirms the order and reserves inventory. One of quote, unconfirmed, open, partial, billed.
externalidstring(100)Your own identifier for this record. Stored verbatim and returned on reads; GET /<resource>?externalid=... finds it again.
linesrequiredarray of objectAt least one line. The total is derived - do not send it.
When it fails
StatusCodeMeaning
400invalid_requestA required field was missing.
422cannot_invoice_quoteThe order is still a quote, so there is nothing billable.
422nothing_to_invoiceNothing shipped and unbilled remains on the document.
422rule_violationNolaPro refused the document. message carries its reason.
422unknown_valueA reference did not resolve in this company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/orders' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "customerid": 104,
    "date": "2026-08-02",
    "ordertype": "fulfillment",
    "status": "quote",
    "externalid": "crm-8842",
    "lines": [
        {
            "quantity": "3.000000",
            "price": "125.0000"
        }
    ]
}'
Response 201
{
    "ordertype": "fulfillment",
    "status": "quote"
}
GET/orders/{id} 200404

Retrieve one record.

Requires scope orders: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/orders/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
Response 200
{
    "status": "quote",
    "ordertype": "fulfillment"
}
PATCH/orders/{id} 200400404409422

Update.

Only the fields you send change. Children cannot be sent here - lines, hours and shipments are create-only (see Conventions). Use the child resource to add, change or remove one. Changing status from quote to open commits inventory for every line and is reported back as an inventory_committed warning.

Requires scope orders:write.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
Body
FieldTypeDescription
ponumberstring(30)The customer's own PO reference.
duedatestringWhen payment or delivery is expected.
externalidstring(100)Your own identifier for this record.
statusidintegerService status, by id from GET /orderstatusoptions. Service orders only - no other order type carries the field. 0 clears it. Locked once the order is cancelled or fully billed, exactly as the service order screen locks it.
statusoptionstring(50)Service status by NAME instead of id ("Order Complete"). Exact match, trimmed, case-insensitive, against this company's statuses. Send either spelling; both get the same validation.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
404not_foundNo such record, or it belongs to another company.
409order_already_billedThe order has billed quantities so its header is part of an invoice; or, for the service status, the order is fully billed and the screen locks the status there too.
409stale_recordIf-Match did not match; someone else changed it first.
422rule_violationNolaPro refused the change. message carries its reason.
422unknown_valuestatusid or statusoption did not match a service status in this company.
curl -X PATCH \
  'https://acme.nolapro.com/!/api/v2/orders/104' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "ponumber": "INV-88421",
    "duedate": "2026-08-01",
    "statusid": 104,
    "statusoption": "Example statusoption"
}'
DELETE/orders/{id} 200400409422

Cancel.

Requires scope orders: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.
422unknown_valueNo such record in this company.
curl -X DELETE \
  'https://acme.nolapro.com/!/api/v2/orders/104' \
  -H 'Authorization: Bearer $NP_TOKEN'
POST/orders/{id}/invoice 201400422

Invoice this order.

Turns shipped-but-unbilled quantity into invoices. Which engine runs depends on ordertype, and they are not interchangeable: - service - the hours logged against the order are first converted into lines and a shipment, then invoiced. The order becomes billed. - fulfillment - invoices whatever has shipped and not yet been billed. Ship first; there is nothing to invoice otherwise. - rental - invoices rental periods that have come due. A quote cannot be invoiced. Convert it to an order first. A deposit alone is invoiceable. arorder2invoice.php:323-324 admits an order when it has shipped-but-unbilled quantity or any arorder_deposit row, so an order with a deposit and nothing shipped still produces an invoice.

Requires scope invoices:write.

Parameters
NameInTypeNotes
idrequiredpathinteger
Body
FieldTypeDescription
invoicedatestringInvoice date. Defaults to what NolaPro would use.
When it fails
StatusCodeMeaning
400invalid_requestThe request was malformed.
422cannot_invoice_quoteThe order is still a quote, so there is nothing billable.
422nothing_to_invoiceNothing shipped and unbilled remains on the document.
422rule_violationNolaPro refused the document. message carries its reason.
422unknown_valueA reference did not resolve in this company.
curl -X POST \
  'https://acme.nolapro.com/!/api/v2/orders/104/invoice' \
  -H 'Authorization: Bearer $NP_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: your-unique-key' \
  -d '{
    "invoicedate": "2026-08-02"
}'
Response 201
{
    "orderid": 104,
    "notices": "Example notices"
}
GET/orders/{id}/pdf 200

Order confirmation as a PDF

The order confirmation exactly as NolaPro prints it, including any Document Center attachments set to combine. 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 orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/pdf' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/orders/{id}/quote 200

Order as a quote PDF

The same order rendered as a customer-facing quote rather than a confirmation. Prices and terms are laid out for someone deciding, not for someone who has already ordered. 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 orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/quote' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/orders/{id}/pickticket 200

Pick ticket as a PDF

The warehouse pick list for the order: what to pull and from where. Carries no prices, because it goes to the floor rather than to the customer. 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 orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/pickticket' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/orders/{id}/serviceticket 200

Service ticket as a PDF

The service ticket for a service order: the work to be done and the details the technician needs on site. 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 orders:read.

Parameters
NameInTypeNotes
idrequiredpathintegerThe record id.
curl \
  'https://acme.nolapro.com/!/api/v2/orders/104/serviceticket' \
  -H 'Authorization: Bearer $NP_TOKEN'
GET/orders/{id}/proofrequest 200

Paper/mylar proof request as a PDF

The proof request that goes with the order to the plate room. 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 orders:read.

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