Update a draft invoice. Only draft invoices can be edited.
Update a draft invoice. Only draft invoices can be edited.
https://staging.softsolz.uk/api/v1/services/invoicing/invoices/{id}Recent Requests
Log in to see full request historyPath Params
idstringrequiredHeaders
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Body Params
customer_idintegerActive customer id in this tenant.
linesarray of objectsLine items (at least one).
issue_datestringIssue date; defaults to today (UTC).
due_datestringDue date; defaults to issue_date + customer terms.
currencystring3-letter currency; defaults to the customer currency or USD.
discountnumberFlat discount applied after tax (default 0).
shipping_amountnumberShipping added after tax+discount (default 0).
header_tax_rate_pctnumber | nullWhen set, total tax = subtotal * pct/100 and per-line tax is ignored.
po_numberstring | nullPO number; omit to auto-allocate per customer.
notesstring | nullNotes shown on the invoice.
termsstring | nullPayment terms text.
payment_methodstring | nullPayment path; "stripe" makes the invoice online-payable.
Response
Response Body
idintegerInvoice id.customer_idintegerCustomer id.invoice_numberstringHuman invoice number.issue_datestringIssue date (YYYY-MM-DD).due_datestringDue date (YYYY-MM-DD).currencystringISO 4217 currency code.subtotalstringDecimal amount as a numeric string (NOT minor units).tax_totalstringTotal tax, numeric string.totalstringInvoice total, numeric string.amount_paidstringAmount paid so far, numeric string.statusstringInvoice status.linesarray of objectsInvoice line items.paymentsarray of objectsRecorded payments; payments[].id is the payment_id used when issuing a refund.created_atstringCreation timestamp.updated_atstringLast update timestamp.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.invoicing.updateInvoice('<id>', {});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 200
{ "data": { "id": 0, "customer_id": 0, "invoice_number": "string", "issue_date": "string", "due_date": "string", "currency": "string", "subtotal": "string", "tax_total": "string", "total": "string", "amount_paid": "string", "status": "string", "lines": [], "payments": [], "created_at": "string", "updated_at": "string" }}