Skip to main content

appApplyCreditNote

Requires permission sales:credit_note:update.

Apply part or all of a credit note to a sales invoice from an installed app. The invoice must be the note's customer's and in the note's currency; the amount cannot exceed the note's remaining amount or what is still owed on the invoice. Needs write_credit_notes.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation AppApplyCreditNote($input: AppApplyCreditNoteInput!) {
appApplyCreditNote(input: $input) {
id
creditNoteNumber
partnerName
status
type
createdAt
createdBy {
name
}
}
}

Variables:

{
"input": {
"amount": 0,
"creditNoteId": "id",
"invoiceId": "id"
}
}

Response:

{
"data": {
"appApplyCreditNote": {
"id": "id",
"creditNoteNumber": "string",
"partnerName": "string",
"status": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"createdBy": {
"name": "string"
}
}
}
}
appApplyCreditNote(
input: AppApplyCreditNoteInput!
): CreditNote!

Arguments​

appApplyCreditNote.input ● AppApplyCreditNoteInput! non-null input​

The note, the invoice and the amount.

Type​

CreditNote object​

A credit note: money owed back to a customer, from a sales return, a price adjustment or goodwill.