The SentToContact field on the CreditNote schema in xero_accounting.yaml is still marked "readOnly: true", even though:
- A merged PR (#616, "INVINP-13442 | Credit notes now have SentToContact as writeable", Aug 26 2024) was explicitly intended to make this field writable, linked to the internal "modernized credit notes" work (Jira INVINP-13442).
- The live Accounting API already accepts "SentToContact" on both Create Credit Notes and Update Credit Note — confirmed directly via the API Explorer on an approved credit note.
Looking at the diff for #616, it only updated the field's "description" text (to match "Invoice.SentToContact"'s wording) and added "SentToContact": true to a couple of JSON examples. It never removed the "readOnly: true" line from the schema itself:
yaml
SentToContact:
description: Boolean to set whether the credit note in the Xero app should be marked
as "sent". This can be set only on credit notes that have been approved
readOnly: true
type: boolean
For comparison, Invoice.SentToContact has the same description pattern but no readOnly flag, and is correctly writable.
This looks like the schema update in #616 was incomplete — the description text was fixed, but the readOnly: true flag was accidentally left in place.
Impact
Because readOnly: true drives code generation for the official SDKs, this has propagated a stale restriction into generated clients ever since — e.g. in Xero-NetStandard, CreditNote.SentToContact has a private setter in every version from at least v13.0.0 through the current v17.0.0, meaning consumers of the .NET SDK cannot set this field on a CreditNote object at all, despite the underlying REST API supporting it. This forces workarounds (reflection to bypass the private setter, or hand-rolled raw HTTP requests bypassing the typed SDK model) for a feature that's otherwise fully supported.
See C# code does not accept the SentToContact:
Suggested fix
Remove the readOnly: true line from CreditNote.SentToContact in xero_accounting.yaml, matching Invoice.SentToContact. This should be a small, self-contained fix, and would let the next SDK regeneration (Xero-NetStandard, and any other generated clients) expose a proper public setter — currently every Xero.NetStandard.OAuth2 release from at least v13.0.0 through the latest v17.0.0 inherits this restriction, so consumers won't see the fix until a new SDK version is cut from an updated spec.
Environment / repro
Confirmed via Xero API Explorer: creating a credit note with SentToContact: true in the request body succeeds.
Confirmed via Xero API Explorer: calling Update Credit Note with only CreditNoteID and SentToContact: true in the body succeeds on an approved credit note.
Confirmed the readOnly: true flag is present in the current master branch of xero_accounting.yaml as of July 2026.
The SentToContact field on the CreditNote schema in xero_accounting.yaml is still marked "readOnly: true", even though:
Looking at the diff for #616, it only updated the field's "description" text (to match "Invoice.SentToContact"'s wording) and added "SentToContact": true to a couple of JSON examples. It never removed the "readOnly: true" line from the schema itself:
yaml
For comparison, Invoice.SentToContact has the same description pattern but no readOnly flag, and is correctly writable.
This looks like the schema update in #616 was incomplete — the description text was fixed, but the readOnly: true flag was accidentally left in place.
Impact
Because readOnly: true drives code generation for the official SDKs, this has propagated a stale restriction into generated clients ever since — e.g. in Xero-NetStandard, CreditNote.SentToContact has a private setter in every version from at least v13.0.0 through the current v17.0.0, meaning consumers of the .NET SDK cannot set this field on a CreditNote object at all, despite the underlying REST API supporting it. This forces workarounds (reflection to bypass the private setter, or hand-rolled raw HTTP requests bypassing the typed SDK model) for a feature that's otherwise fully supported.
See C# code does not accept the SentToContact:
Suggested fix
Remove the
readOnly: trueline fromCreditNote.SentToContactinxero_accounting.yaml, matchingInvoice.SentToContact. This should be a small, self-contained fix, and would let the next SDK regeneration (Xero-NetStandard, and any other generated clients) expose a proper public setter — currently everyXero.NetStandard.OAuth2release from at least v13.0.0 through the latest v17.0.0 inherits this restriction, so consumers won't see the fix until a new SDK version is cut from an updated spec.Environment / repro
Confirmed via Xero API Explorer: creating a credit note with SentToContact: true in the request body succeeds.
Confirmed via Xero API Explorer: calling Update Credit Note with only CreditNoteID and SentToContact: true in the body succeeds on an approved credit note.
Confirmed the readOnly: true flag is present in the current master branch of xero_accounting.yaml as of July 2026.