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

Parameters: create_sales_invoice
NameTypeDescription
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
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}]}'
Python
result = client.call("snelstart", "create_sales_invoice", {"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]})
Node.js
const result = await cotlet.call('snelstart', 'create_sales_invoice', {"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]});
CLI
cotlet call snelstart create_sales_invoice --data '{"customer_id":"cus_8f21","vat_mode":"exclusive","lines":[{"article_id":"art_104","quantity":12}]}'

Example response

JSON

{
  "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
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.