Book invoice

Book a draft invoice, and optionally send it by email or EAN.

POST https://cotlet.dev/api/v1/e-conomic/draft-invoices/{draft_invoice_number}/invoices

write Confirm

Books the draft, which gives it an invoice number, and a booked invoice cannot be edited any more. With send_by email or ean, the invoice is sent to the customer after booking, and only if booking succeeds. Without it nothing is sent. An EAN invoice needs your CVR and country in master data and a recipient identifier on the customer. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: book_invoice
NameTypeDescription
draft_invoice_number integer required integer Draft invoice number from list_draft_invoices or create_draft_invoice.
send_by string string none, email or ean. Default: none.
book_with_number integer integer Own invoice number. Default: next number in the sequence.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/e-conomic/draft-invoices/118/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"send_by":"email"}'
Python
result = client.call("e-conomic", "book_invoice", {"draft_invoice_number":118,"send_by":"email"})
Node.js
const result = await cotlet.call('e-conomic', 'book_invoice', {"draft_invoice_number":118,"send_by":"email"});
CLI
cotlet call e-conomic book_invoice --data '{"draft_invoice_number":118,"send_by":"email"}'

Example response

JSON

{
  "invoice_number": 1042,
  "draft_invoice_number": 118,
  "customer_number": 14,
  "total_gross": 1500,
  "currency": "DKK",
  "sent_by": "email",
  "status": "booked"
}

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.