Partial update invoice

patch
https://api.wafeq.com/v1/invoices/{id}/

Endpoint for partially updating an existing invoice. Without a VAT TRN, the organization can't newly add a Sales rate above 0% or a Reverse charge rate, nor, in the UAE, a zero-rated rate; exempt and out-of-scope rates stay available. Such a request is refused with HTTP 400 and code vat_trn_required; see the tax_rate field.

Path Params
stringrequired
Query Params
string

Comma-separated related objects to return in full instead of as IDs. Accepted values: attachments, branch, contact, contact.persons, journal, line_items, line_items.account, line_items.item, line_items.tax_rate, line_items.cost_center, project, warehouse, discount_cost_center. Nested relations are joined with a dot. Pass journal to replace the journal ID with its object (ID, date, currency, reference, notes and timestamps). Documents without a journal still return null. Journal line items are retrieved separately with GET /v1/journal-line-items/?journal={journal_id}.

Body Params

An invoice issued to a customer.

attachmentsarray of strings

Any files or documents attached to this invoice.

string | null

The branch associated with this invoice.

string

The contact (customer) associated with this invoice.

credit_notesarray of objects

The credit notes applied to this invoice. Sending this field replaces the whole set, and entries left out are unapplied. To apply, change or remove a single credit note, use /v1/invoice-credit-notes/.

stringenum

The currency code for the invoice. A change is refused while a line the document keeps is on a bank account held in the current currency.

View the enum reference

custom_fieldsobject

A mapping of custom field IDs to their values.

string

The account to which the discount will be booked, if applicable.

double≥ 0

The discount amount to apply to the invoice.

string

The cost center associated with the discount, if applicable.

string | null

The tax exemption reason of the discount, when its tax rate takes one: a code that rate offers, or, on the KSA out-of-scope rate, the reason written out. null or "" clears the reason. Left out, a new discount, or one moved to another tax rate, takes the default of its tax rate, and any other discount keeps its reason.

string

The tax rate applied to the discount, if applicable: the ID of the tax rate (tax_…). List the tax rates of the organization with GET /v1/tax-rates/. Without a VAT TRN on the organization, a local Sales rate above 0%, a Reverse charge rate, or, for a UAE organization, a zero-rated Sales rate is refused when newly set on the discount, with HTTP 400 and code vat_trn_required; a discount that already carries the rate keeps it. Add the VAT TRN with PATCH /v1/organization/profile/ (financial_settings.tax_registration_number) or PATCH /v2/organizations/{id}/ (profile.tax_registration_number).

double | null

The exchange rate to the organization base currency at the time of the document.

stringlength ≤ 255

External identifier for the invoice.

date

The date when the invoice was issued.

date

The date by which the invoice should be paid.

string

The unique number assigned to this invoice.

boolean

Whether this invoice summarizes transactions over a period.

stringenumDefaults to en

The language in which the invoice is written.

View the enum reference

Allowed:
line_itemsarray of objects

The individual line items included in this invoice.

string

Additional notes or comments about the invoice.

string

The place of supply for UAE organizations. Must be one of: ABU_DHABI, AJMAN, DUBAI, FUJAIRAH, RAS_AL_KHAIMAH, SHARJAH, UMM_AL_QUWAIN or OUTSIDE_UAE.

string | null

The project associated with this invoice, if applicable.

string

An optional purchase order number or code for this invoice.

string

An optional reference number or code for this invoice.

stringenumDefaults to DRAFT

The current status of the invoice (draft, sent, or finalized).

View the enum reference

Allowed:
date | null

The end date of the period covered by this summary invoice. Required when is_summary is true.

date | null

The start date of the period covered by this summary invoice. Required when is_summary is true.

stringenum

Specifies whether the tax amount is inclusive or exclusive.

View the enum reference

Allowed:
string | null

The warehouse associated with this invoice, if applicable.

Headers
string

Client-provided UUID to uniquely identify a request

string

The id of the organization to act on, from GET /v1/organizations/. Required when the OAuth token or accounting partner API key grants access to several organizations; optional otherwise. With an organization API key, it must name the key's own organization.

stringenumDefaults to application/json

Generated from available request content types

Allowed:
Response