Skip to main content

updateCreditNote

Requires permission sales:credit_note:update.

Changes a credit note. Only a DRAFT or PENDING note that has not been applied to any invoice can be edited; any other status is refused. The same credit limit against the invoice applies as on creation.

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 UpdateCreditNote($id: ID!, $input: UpdateCreditNoteInput!) {
updateCreditNote(id: $id, input: $input) {
id
creditNoteNumber
partnerName
status
type
createdAt
createdBy {
name
}
}
}

Variables:

{
"id": "id",
"input": {
"amount": 0,
"currency": "string",
"items": [
{
"amount": 0,
"description": "string",
"quantity": 0,
"unitPrice": 0
}
],
"partnerId": "string",
"reason": "string",
"type": "string"
}
}

Response:

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

Arguments​

updateCreditNote.id ● ID! non-null scalar​

The ID of the credit note.

updateCreditNote.input ● UpdateCreditNoteInput! non-null input​

The fields of the credit note to change.

Type​

CreditNote object​

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