Post a draft invoice. If an approval policy matches, responds 202 with { pending_approval: true, approval_instance_id, approval_status_url, message } instead; poll GET /approvals/:id.
Post a draft invoice. If an approval policy matches, responds 202 with { pending_approval: true, approval_instance_id, approval_status_url, message } instead; poll GET /approvals/:id.
POST
https://staging.softsolz.uk/api/v1/services/invoicing/invoices/{id}/postRecent Requests
Log in to see full request historyTimeStatusUser Agent
Make a request to see history.
Path Params
idstringrequiredHeaders
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
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.postInvoice('<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" }}