invoices.get

One invoice with doc_no and doc_label (I-12), its lines, what has been paid, the balance, the due date, and whether a bank payment is still clearing. payments lists each card or bank payment: id is the charge_id invoices.refund takes, plus amount, method, status, paid_at, refunded amount and refunds. refunded_minor is money sent back. net_collected_minor is what remains of the payment after that. A payment status is refunded or partially_refunded once the processor confirms. collected_minor stays the amount that was paid, and balance_minor stays what is still owed, which is 0 after a refund. display_status is payment_pending while a bank payment clears (3 to 5 business days), otherwise the invoice status. last_bank_payment_failed_at is set when the latest bank payment failed and the customer can pay again.

WhoAgents can call this
RESTGET /v1/invoices/get
MCP toolinvoices_get
Writesno
AreaShop

When to use it

One invoice with doc_no and doc_label (I-12), its lines, what has been paid, the balance, the due date, and whether a bank payment is still clearing. payments lists each card or bank payment: id is the charge_id invoices.refund takes, plus amount, method, status, paid_at, refunded amount and refunds.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
invoice_idstring (uuid)yes

Example

GET https://doingwork.work/v1/invoices/get?invoice_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
invoice_idstring (uuid)yes
job_idstring (uuid)yes
statusstringyes
currencystringyes
doc_nointegeryes
doc_labelstringyes
total_minorintegeryes
collected_minorintegeryes
refunded_minorintegeryes
net_collected_minorintegeryes
balance_minorintegeryes
written_off_minorintegeryes
deposit_minor['integer', 'null']yes
issued_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
due_on['string', 'null', ' ', '(', 'd', 'a', 't', 'e', ')']yes
memo['string', 'null']yes
bank_payment_clearingbooleanyes
display_statusstringyes
last_bank_payment_failed_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
paymentsarrayyes
payments[].idstring (uuid)yes
payments[].invoice_idstring (uuid)yes
payments[].amount_minorintegeryes
payments[].methodstringyes
payments[].statusstringyes
payments[].paid_atstring (date-time)yes
payments[].refunded_minorintegeryes
payments[].refundsarrayyes
payments[].refunds[].idstring (uuid)yes
payments[].refunds[].amount_minorintegeryes
payments[].refunds[].created_atstring (date-time)yes
linesarrayyes
lines[].positionintegeryes
lines[].descriptionstringyes
lines[].quantitynumberyes
lines[].unit_price_minorintegeryes
lines[].kindstringyes
lines[].taxablebooleanyes
lines[].amount_minorintegeryes
taxobjectno
tax.name['string', 'null']yes
tax.jurisdiction['string', 'null']yes
tax.rate_bpsintegeryes
tax.taxable_minorintegeryes
tax.tax_minorintegeryes
next_actionsarrayyes
next_actions[].saystringyes
next_actions[].op['string', 'null']yes
next_actions[].whenstring (one of now, later, check, tell_human)yes
next_actions[].due_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']no
next_actions[].args_hintstringno
{
  "invoice_id": "00000000-0000-4000-8000-000000000000",
  "job_id": "00000000-0000-4000-8000-000000000000",
  "status": "...",
  "currency": "...",
  "doc_no": 1,
  "doc_label": "...",
  "total_minor": 50000,
  "collected_minor": 50000,
  "refunded_minor": 50000,
  "net_collected_minor": 50000,
  "balance_minor": 50000,
  "written_off_minor": 50000,
  "deposit_minor": "...",
  "issued_at": "...",
  "due_on": "...",
  "memo": "...",
  "bank_payment_clearing": true,
  "display_status": "...",
  "last_bank_payment_failed_at": "...",
  "payments": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "invoice_id": "00000000-0000-4000-8000-000000000000",
      "amount_minor": 50000,
      "method": "...",
      "status": "...",
      "paid_at": "...",
      "refunded_minor": 50000,
      "refunds": [
        {
          "id": "00000000-0000-4000-8000-000000000000",
          "amount_minor": 50000,
          "created_at": "..."
        }
      ]
    }
  ],
  "lines": [
    {
      "position": 1,
      "description": "40 gallon gas heater, installed",
      "quantity": "...",
      "unit_price_minor": 50000,
      "kind": "...",
      "taxable": true,
      "amount_minor": 50000
    }
  ],
  "next_actions": [
    {
      "say": "...",
      "op": "...",
      "when": "now"
    }
  ]
}

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.