CreateInvoice
CreateInvoiceCreates a new invoice record from scratch.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | InvoiceInput! | All invoice data. |
Example Query:
mutation CreateInvoice($input: InvoiceInput!) {
CreateInvoice(input: $input) {
id
label
status
total
}
}CreateInvoiceFrom
CreateInvoiceFromCreates a new invoice by copying data from existing Estimates, Sales Orders, or Shipping Orders.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | InvoiceFromInput! | IDs of source documents. |
CreateDepositInvoiceFrom
CreateDepositInvoiceFromCreates a deposit (down payment) invoice from an Estimate or Order.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | DepositInvoiceFromInput! | Source and deposit details. |
UpdateInvoice
UpdateInvoiceUpdates an existing invoice record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the invoice document. |
input | InvoiceInput! | Fields to update. |
DeleteInvoice / DeleteInvoices
DeleteInvoice / DeleteInvoicesDeletes one or multiple invoices.
DuplicateInvoice
DuplicateInvoiceCreates a full copy of an existing invoice.
GenerateInvoiceNumber
GenerateInvoiceNumberGenerates the next available sequence label for a new invoice.
GenerateInvoicePublicId / DisableInvoicePublicId
GenerateInvoicePublicId / DisableInvoicePublicIdManages the public URL token for customer viewing.
GenerateInvoicesPdfs
GenerateInvoicesPdfsGenerates PDF documents for multiple invoices.
CreditInvoice / UpdateCreditInvoice / UncreditInvoice
CreditInvoice / UpdateCreditInvoice / UncreditInvoiceManages the link between invoices and credit notes for reimbursement.
ValidateEInvoice
ValidateEInvoicePerforms compliance checks for electronic invoicing.
Input Data Types
InvoiceInput
InvoiceInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
label | String | Invoice number. |
status | InvoiceStatus | Initial or updated status. |
currency | CurrencyInput | Currency link data. |
deposit | Boolean | Whether it's a deposit invoice. |
exchange_rate | Float | Currency exchange rate. |
tax_type | TaxType | "exclusive" or "inclusive". |
default_discount | Float | Global discount value. |
discount_type | DiscountType | "percentage" or "amount". |
dated_at | Date | Document date. |
due_at | Date | Payment deadline. |
notes | String | Public notes. |
internal_notes | String | Private notes. |
for_the_attention_of | String | Specific recipient. |
vat_payment_method | String | VAT strategy (e.g. "on_payments"). |
external_reference | String | Internal reference. |
customer | CustomerInput | Linked customer. |
line_items | [LineItemInvoiceInput] | List of items. |
price_level | PriceLevelInput | Applied price list. |
account_representative | AccountRepresentativeInput | Assigned representative. |
season | SeasonInput | Business season. |
payment_information | PaymentInformationInput | Bank details for PDF. |
billing_address | AddressInput | Document billing address. |
shipping_address | AddressInput | Delivery address. |
pdf_template | PdfTemplateInput | PDF design link. |
files | [FileInput] | Attachments. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
InvoiceFromInput
InvoiceFromInputCreditInvoiceInput
CreditInvoiceInput| Field | Type | Description |
|---|---|---|
amount | Float! | Amount to credit (required). |
invoice_payable_line_id | ID | Specific payable line ID. |
credit_note | CreditNoteInput! | Credit note data (required). |
UncreditInvoiceInput
UncreditInvoiceInput| Field | Type | Description |
|---|---|---|
invoice_payment_id | ID! | Invoice payment ID to uncredit (required). |
DepositInvoiceFromInput
DepositInvoiceFromInputEnums
InvoiceStatus
InvoiceStatus| Value | Description |
|---|---|
unpublished | Draft status (hidden). |
draft | Document created, not sent. |
unpaid | Published and pending payment. |
partially_paid | Partial payment received. |
paid | Fully settled. |
cancelled | Document voided. |
sent_to_quickbooks | Exported to QB. |
DepositInvoiceFromType
DepositInvoiceFromType| Value | Description |
|---|---|
percentage | Deposit calculated as a percentage of the total. |
amount | Deposit set to a fixed amount. |
DiscountType
DiscountType| Value | Description |
|---|---|
amount | Fixed discount amount. |
percentage | Percentage-based discount. |
TaxType
TaxType| Value | Description |
|---|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |
