Credit Notes Mutations

CreateCreditNote

Creates a new credit note record from scratch.

Parameters:

ParameterTypeDescription
inputCreditNoteInput!All credit note data.

Example Query:

mutation CreateCreditNote($input: CreditNoteInput!) {
  CreateCreditNote(input: $input) {
    id
    label
    status
    dated_at
  }
}

CreateCreditNoteFrom

Creates a credit note by copying data from existing Invoices or Product Returns.

Parameters:

ParameterTypeDescription
inputCreditNoteFromInput!IDs of source documents.

UpdateCreditNote

Updates an existing credit note record.

Parameters:

ParameterTypeDescription
idInt!ID of the credit note document.
inputCreditNoteInput!Fields to update.

DeleteCreditNote / DeleteCreditNotes

Deletes one or multiple credit notes.


GenerateCreditNoteNumber

Generates the next available sequence label for a new credit note.


Input Data Types

CreditNoteInput

FieldTypeDescription
idIntID for updates.
labelStringCredit note number.
dated_atDateDocument date.
statusCreditNoteStatusInitial or updated status.
tax_typeTaxType"exclusive" or "inclusive".
exchange_rateFloatExchange rate value.
notesStringPublic notes.
internal_notesStringPrivate notes.
currencyCurrencyInputCurrency data link.
customerCustomerInputLinked customer link.
price_levelPriceLevelInputPrice level link.
account_representativeAccountRepresentativeInputSales rep link.
billing_addressAddressInputBilling address link.
pdf_templatePdfTemplateInputPDF template link.
seasonSeasonInputSeason link.
line_items[LineItemCreditNoteInput]List of items to credit.
files[FileInput]Attachments.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

CreditNoteFromInput

FieldTypeDescription
Invoice[Int]Source Invoice IDs array.
ProductReturn[Int]Source Product Return IDs array.

GenerateCreditNotesPdfs

Generates PDF files for the specified credit notes.

Parameters:

ParameterTypeDescription
ids[ID!]!List of credit note IDs.

Example Query:

mutation GenerateCreditNotesPdfs($ids: [ID!]!) {
  GenerateCreditNotesPdfs(ids: $ids)
}
Return TypeDescription
StringStatus message.

Enums

CreditNoteStatus

ValueDescription
unpublishedDraft status (hidden).
draftDocument created, not yet published.
pendingPublished and awaiting allocation.
refundedFully settled.
cancelledDocument voided.

TaxType

ValueDescription
exclusiveTax calculated on top of the net price.
inclusiveTax included in the displayed price.