Create a sales invoice concept
Saves a sales invoice as a concept, without sending it.
POST https://cotlet.dev/api/v1/snelstart/customers/{customer_id}/sales-invoices
write
Does what "Tussentijds opslaan" does: it keeps a concept in the invoice overview. A concept has no invoice number and nobody receives it, so it does not ask for confirmation. Discounts apply to the whole invoice. The response shows the totals SnelStart calculated.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id string required | string | Customer ID from list_customers. |
| lines array required | array | Lines of {article_id, quantity, description (optional)}. Article IDs come from search_articles. |
| vat_mode string | string | One of: inclusive, exclusive, reverse_charged. Default: exclusive. |
| discount_percent number | number | Discount on the whole invoice, in percent. |
| order_reference string | string | Optional order reference. |
Request
curl -X POST https://cotlet.dev/api/v1/snelstart/customers/cus_8f21/sales-invoices \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]}' result = client.call("snelstart", "create_sales_invoice", {"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]}) const result = await cotlet.call('snelstart', 'create_sales_invoice', {"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]}); cotlet call snelstart create_sales_invoice --data '{"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]}' Example response
{
"invoice_id": "inv_c_0041",
"number": null,
"status": "concept",
"customer": "Northwind Studio",
"vat_mode": "exclusive",
"lines": [
{
"description": "Consulting hour",
"quantity": 12,
"unit_price": 95
}
],
"amount_excl": 1140,
"vat": 239.4,
"amount_total": 1379.4
}