Invoices Mutations

CreateInvoice

Creates a new invoice record from scratch.

Parameters:

ParameterTypeDescription
inputInvoiceInput!All invoice data.

Example Query:

mutation CreateInvoice($input: InvoiceInput!) {
  CreateInvoice(input: $input) {
    id
    label
    status
    total
  }
}

CreateInvoiceFrom

Creates a new invoice by copying data from existing Estimates, Sales Orders, or Shipping Orders.

Parameters:

ParameterTypeDescription
inputInvoiceFromInput!IDs of source documents.

CreateDepositInvoiceFrom

Creates a deposit (down payment) invoice from an Estimate or Order.

Parameters:

ParameterTypeDescription
inputDepositInvoiceFromInput!Source and deposit details.

UpdateInvoice

Updates an existing invoice record.

Parameters:

ParameterTypeDescription
idInt!ID of the invoice document.
inputInvoiceInput!Fields to update.

DeleteInvoice / DeleteInvoices

Deletes one or multiple invoices.


DuplicateInvoice

Creates a full copy of an existing invoice.


GenerateInvoiceNumber

Generates the next available sequence label for a new invoice.


GenerateInvoicePublicId / DisableInvoicePublicId

Manages the public URL token for customer viewing.


GenerateInvoicesPdfs

Generates PDF documents for multiple invoices.


CreditInvoice / UpdateCreditInvoice / UncreditInvoice

Manages the link between invoices and credit notes for reimbursement.


ValidateEInvoice

Performs compliance checks for electronic invoicing.


Input Data Types

InvoiceInput

FieldTypeDescription
idIntID for updates.
labelStringInvoice number.
statusInvoiceStatusInitial or updated status.
currencyCurrencyInputCurrency link data.
depositBooleanWhether it's a deposit invoice.
exchange_rateFloatCurrency exchange rate.
tax_typeTaxType"exclusive" or "inclusive".
default_discountFloatGlobal discount value.
discount_typeDiscountType"percentage" or "amount".
dated_atDateDocument date.
due_atDatePayment deadline.
notesStringPublic notes.
internal_notesStringPrivate notes.
for_the_attention_ofStringSpecific recipient.
vat_payment_methodStringVAT strategy (e.g. "on_payments").
external_referenceStringInternal reference.
customerCustomerInputLinked customer.
line_items[LineItemInvoiceInput]List of items.
price_levelPriceLevelInputApplied price list.
account_representativeAccountRepresentativeInputAssigned representative.
seasonSeasonInputBusiness season.
payment_informationPaymentInformationInputBank details for PDF.
billing_addressAddressInputDocument billing address.
shipping_addressAddressInputDelivery address.
pdf_templatePdfTemplateInputPDF design link.
files[FileInput]Attachments.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

InvoiceFromInput

FieldTypeDescription
Estimate[Int]Source Estimate IDs array.
Order[Int]Source Sales Order IDs array.
ShippingOrder[Int]Source Shipping Order IDs array.

CreditInvoiceInput

FieldTypeDescription
amountFloat!Amount to credit (required).
invoice_payable_line_idIDSpecific payable line ID.
credit_noteCreditNoteInput!Credit note data (required).

UncreditInvoiceInput

FieldTypeDescription
invoice_payment_idID!Invoice payment ID to uncredit (required).

DepositInvoiceFromInput

FieldTypeDescription
EstimateIdIntSource Estimate ID.
OrderIdIntSource Sales Order ID.
typeDepositInvoiceFromType"percentage" or "amount".
valueFloatDeposit value.
due_atDateDue date for deposit.
payment_information_idIntBank details ID.

Enums

InvoiceStatus

ValueDescription
unpublishedDraft status (hidden).
draftDocument created, not sent.
unpaidPublished and pending payment.
partially_paidPartial payment received.
paidFully settled.
cancelledDocument voided.
sent_to_quickbooksExported to QB.

DepositInvoiceFromType

ValueDescription
percentageDeposit calculated as a percentage of the total.
amountDeposit set to a fixed amount.

DiscountType

ValueDescription
amountFixed discount amount.
percentagePercentage-based discount.

TaxType

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