Refunds Mutations

CreateRefund

Creates a new refund document.

Parameters:

ParameterTypeDescription
inputRefundInput!Refund data.

Example Query:

mutation CreateRefund($input: RefundInput!) {
  CreateRefund(input: $input) {
    id
    label
    status
  }
}

CreateRefundFrom

Creates a refund from one or multiple Invoices or Product Returns.

Parameters:

ParameterTypeDescription
inputRefundFromInput!Source documents IDs.

UpdateRefund

Updates an existing refund.

Parameters:

ParameterTypeDescription
idInt!ID of the refund.
inputRefundInput!Updated data.

DeleteRefund / DeleteRefunds

Deletes one or multiple refunds.


GenerateRefundNumber

Generates the next available refund label.


Input Data Types

RefundInput

FieldTypeDescription
idIntID.
labelStringRefund number.
dated_atDateDocument date.
statusRefundStatusCurrent status.
tax_typeTaxTypeTax calculation method (Exclusive/Inclusive).
exchange_rateFloatExchange rate.
notesStringPublic notes.
internal_notesStringPrivate notes.
seasonSeasonInputLinked season.
currencyCurrencyInputBilling currency.
customerCustomerInputAssociated customer.
price_levelPriceLevelInputPrice level override.
account_representativeAccountRepresentativeInputAssigned representative.
billing_addressAddressInputBilling address data.
pdf_templatePdfTemplateInputPDF template configuration.
line_items[LineItemRefundInput]List of items refunded.
files[FileInput]Attachments.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

RefundFromInput

FieldTypeDescription
Invoice[Int]Source invoices IDs.
ProductReturn[Int]Source product returns IDs.

GenerateRefundsPdfs

Generates PDF files for the specified refunds.

Parameters:

ParameterTypeDescription
ids[ID!]!List of refund IDs.

Example Query:

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

Enums

RefundStatus

ValueDescription
unpublishedDraft status (no impact).
pendingDocument processed, payment awaiting.
refundedPayment confirmed.
cancelledDocument voided.

TaxType

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