CreateCreditNote
CreateCreditNoteCreates a new credit note record from scratch.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | CreditNoteInput! | All credit note data. |
Example Query:
mutation CreateCreditNote($input: CreditNoteInput!) {
CreateCreditNote(input: $input) {
id
label
status
dated_at
}
}CreateCreditNoteFrom
CreateCreditNoteFromCreates a credit note by copying data from existing Invoices or Product Returns.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | CreditNoteFromInput! | IDs of source documents. |
UpdateCreditNote
UpdateCreditNoteUpdates an existing credit note record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the credit note document. |
input | CreditNoteInput! | Fields to update. |
DeleteCreditNote / DeleteCreditNotes
DeleteCreditNote / DeleteCreditNotesDeletes one or multiple credit notes.
GenerateCreditNoteNumber
GenerateCreditNoteNumberGenerates the next available sequence label for a new credit note.
Input Data Types
CreditNoteInput
CreditNoteInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
label | String | Credit note number. |
dated_at | Date | Document date. |
status | CreditNoteStatus | Initial or updated status. |
tax_type | TaxType | "exclusive" or "inclusive". |
exchange_rate | Float | Exchange rate value. |
notes | String | Public notes. |
internal_notes | String | Private notes. |
currency | CurrencyInput | Currency data link. |
customer | CustomerInput | Linked customer link. |
price_level | PriceLevelInput | Price level link. |
account_representative | AccountRepresentativeInput | Sales rep link. |
billing_address | AddressInput | Billing address link. |
pdf_template | PdfTemplateInput | PDF template link. |
season | SeasonInput | Season link. |
line_items | [LineItemCreditNoteInput] | List of items to credit. |
files | [FileInput] | Attachments. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
CreditNoteFromInput
CreditNoteFromInputGenerateCreditNotesPdfs
GenerateCreditNotesPdfsGenerates PDF files for the specified credit notes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of credit note IDs. |
Example Query:
mutation GenerateCreditNotesPdfs($ids: [ID!]!) {
GenerateCreditNotesPdfs(ids: $ids)
}| Return Type | Description |
|---|---|
String | Status message. |
Enums
CreditNoteStatus
CreditNoteStatus| Value | Description |
|---|---|
unpublished | Draft status (hidden). |
draft | Document created, not yet published. |
pending | Published and awaiting allocation. |
refunded | Fully settled. |
cancelled | Document voided. |
TaxType
TaxType| Value | Description |
|---|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |
