SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Invoices

POST

Tie An Invoice To An Entry Already Booked

For an invoice whose A/R you already booked by hand. The draft uses that entry as its booking, so the A/R is never counted twice. Nothing new is posted, pushed to QuickBooks or emailed.

Parameters

params.invoice_idString!required

A draft invoice

params.event_idString!required

The entry already booked for it: DR A/R for the invoice total, with the same tax, customer, currency and date

params.date_tolerance_daysInt

Days the entry's date may differ from the invoice's issue date (default 0). The preview shows the difference

applyBoolean

true to tie them

Request
mutation {
  previewOp(organizationId: "a1b2c3d4-...", name: "link_invoice_to_entry",
            params: { invoice_id: "9f3c...", event_id: "77e7...", date_tolerance_days: 1 }) { success result }
}
Response
{
  "data": {
    "previewOp": {
      "success": true,
      "result": {
        "summary": "INV-00031 For Harbour Rentals: CAD 1130.00 (Tax 130.00), Tied To The A/R Entry Already Booked On 2026-11-20. Nothing New Is Booked And No Email Goes Out.",
        "warnings": [
          "The Entry Is Dated 2026-11-20, 1 Day From The Invoice's 2026-11-21.",
          "The Entry Had No Customer. It's Now Tagged To Harbour Rentals."
        ],
        "data": {
          "status": "sent",
          "ledger_event_id": "77e7...",
          "adopted": { "event_id": "77e7...", "ar_amount": "1130.00", "tax_amount": "130.00", "contact_set": true, "date_difference_days": 1 }
        }
      }
    }
  }
}