MCP

Orders

Sales orders, invoices, payments, customer credits, returns, PDFs and QuickBooks sync.

Try asking

  • "Which invoices are more than 30 days overdue, and who is the sales rep on each?"
  • "Who were our top 10 customers by revenue last quarter?"
  • "Email the invoice for order 4512 to the buyer."

Customer credits

Cancel a customer creditWrite
Cancels what's left on a customer credit so it can't be spent. Reaches QuickBooks when your settings sync credits and the customer is linked there, unless the credit came from an overpayment.
Get a customer creditRead
Gets one customer credit by ID, with where it came from (sourcePayment or sourceReturn) and where it was applied (creditUses); line items and history are opt-in.
Issue a customer creditWrite
Issues a credit that a customer's later payments can draw on. Reaches QuickBooks when your settings sync credits and the customer is linked there.
Search customer creditsRead
Searches customer credits from overpayments, returns, QuickBooks or issued by hand.
Update a customer creditWrite
Changes a customer credit's amount, notes or owner. Reaches QuickBooks when your settings sync credits and the customer is linked there, unless only the owner changes or the credit came from a QuickBooks credit memo.

Invoice payments

Get an invoice paymentRead
Gets one payment received against an invoice by ID, with the credits it used (creditUses) and the credits its overpayment created (overpaymentCredits).
Record an invoice paymentWrite
Records a payment received against an invoice. QuickBooks gets the invoice if it isn't there yet, otherwise the payment when your QuickBooks settings sync payments. LeafLink gets the payment when your LeafLink settings sync payments and the order is linked to LeafLink.
Search invoice paymentsRead
Searches payments received against invoices, one row per payment, without the credits it used or created (use distru-get-invoice-payment for those).
Void an invoice paymentWrite
Voids a payment received against an invoice. Reaches QuickBooks when your QuickBooks settings sync payments, and LeafLink when your LeafLink settings sync payments and the order is linked to LeafLink.

Invoices

Delete an invoiceWrite
Permanently deletes an invoice and its payments. Removes the invoice from QuickBooks if it's there, and its payments too when your settings sync payments.
Get an invoiceRead
Gets one invoice by ID: header detail with totals, paid and remaining amounts, dates, customer, owner, billing location and sales order.
Invoice a sales orderWrite
Creates the invoice of a sales order that has none. Reaches QuickBooks unless its total is negative, and your POS (Dutchie, Blaze or Treez) when the customer is mapped to one of its retailers.
Invoice reportRead
Invoice report: one row per invoice with its dates, sales order, customer, payment status, money totals and tax, charge and discount summaries; no line items.
Search invoicesRead
Searches invoices — one row per invoice with totals, the amount paid, credit applied and the remaining balance, not line items.

PDFs

Download a PDFRead
Creates a PDF of an invoice, order slip, purchase order, work order, COA or Metrc manifest, and returns a download link.
Email a PDFWrite
Emails one of those PDFs as an attachment, with the same email the Distru web app sends.

QuickBooks

Check the QuickBooks connectionRead
Shows whether QuickBooks is connected, when it last synced, and the sync settings.
Search QuickBooks accountsRead
Searches your QuickBooks chart of accounts, as Distru last copied it.
Search QuickBooks itemsRead
Searches the QuickBooks products and services that Distru lines sync to.
Search QuickBooks sync historyRead
Shows each attempt to write a Distru change to QuickBooks, and why it failed.
Sync a record to QuickBooksWrite
Pushes one record to QuickBooks again, with anything it depends on.

Returns

Get a returnRead
Gets one return by ID: header detail with quantities, status, total, company, location, owner and sales order.
Search returnsRead
Searches returns (product a customer sent back, reversing inventory and financials) — header fields only; for one return's line items, use distru-get-return with includeReturnItems.

Sales orders

Get a sales orderRead
Gets one sales order by ID: header detail, customer, owner, shipping and billing locations, menu, the compliance license stock was drawn from and the compliance manifest number.
Order fulfillment reportRead
A grid of products by order for a date range, showing how much of each product each order needs.
Sales order reportRead
Sales order report, one row per order, line item or tax rate.
Sales totals reportRead
Sales totals over a date range, per customer, product or sales rep.
Search sales ordersRead
Searches sales orders — one row per order, not line items.