Hi,
I’m currently developing an integration with QuickFile using the new REST API and am trying to determine the relationship between an invoice and a credit note raised against that invoice.
The requirement is read-only: given an original invoice ID, I need to determine which credit note(s), if any, have been raised against it.
I have a real example where the QuickFile UI shows credit note CN00106 as having been raised against invoice 281168.
Using the REST API:
GET /invoices/{credit-note-id}
successfully returns the credit note, including its ID, invoice number, amounts, status and item lines. However, I cannot see a field identifying the original/parent invoice.
I have also tested the client payments API. The outgoing refund appears correctly as a negative client payment, and:
GET /client_payments/{payment-id}
contains an invoices[] allocation identifying CN00106, so I can establish:
refund payment → credit note
What I cannot currently establish through the REST API is:
original invoice → credit note
I understand that the previous QuickFile API model included a ParentInvoiceId when working with credit notes, so it appears QuickFile internally retains this relationship.
Is there currently a field or endpoint in the new REST API that allows either:
- retrieving the parent/original invoice ID from a credit note; or
- retrieving the credit notes associated with a particular invoice ID?
I’d prefer to use the QuickFile IDs for this relationship rather than attempting to correlate records using client, amount, date, purchase reference, etc.
If this isn’t currently exposed by the REST API, is exposing the parent invoice relationship planned?
Many thanks,
Matthew