> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duebox.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# Factuur aanmaken

> Genereert een PDF factuur en stuurt deze (optioneel) direct per mail.



## OpenAPI

````yaml openapi.json post /create-invoice
openapi: 3.0.0
info:
  title: ClientBox API
  version: 1.1.0
  description: >-
    Welkom bij de ClientBox API documentatie.


    Gebruik deze API om klanten te beheren, facturen te sturen en workflows te
    automatiseren vanuit je eigen applicatie.


    ### Authenticatie

    Alle endpoints vereisen een `Bearer Token`. Voeg deze toe aan de header:

    `Authorization: Bearer JOUW_API_KEY`
  contact:
    name: ClientBox Support
    email: support@clientbox.co
servers:
  - url: https://api.clientbox.co/api/1.1/wf
    description: Productie Server
security:
  - BearerAuth: []
tags:
  - name: Customers
    description: Beheer je klantenbestand en contactgegevens.
  - name: Invoices
    description: Maak en verstuur facturen direct naar klanten.
paths:
  /create-invoice:
    post:
      tags:
        - Invoices
      summary: Factuur aanmaken
      description: Genereert een PDF factuur en stuurt deze (optioneel) direct per mail.
      operationId: createInvoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - customer_id
                - amount
                - currency
              properties:
                customer_id:
                  type: string
                  description: ID van de klant die de factuur krijgt.
                  example: cust_12345
                amount:
                  type: number
                  format: float
                  description: Totaalbedrag exclusief BTW.
                  example: 150.5
                currency:
                  type: string
                  description: Valuta code (ISO 4217).
                  enum:
                    - EUR
                    - USD
                    - GBP
                  example: EUR
                items:
                  type: array
                  description: Lijst met factuurregels.
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        example: Consultancy uren
                      price:
                        type: number
                        example: 75.25
      responses:
        '200':
          description: Factuur aangemaakt.
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice_id:
                    type: string
                    example: inv_998877
                  status:
                    type: string
                    example: sent
                  download_url:
                    type: string
                    example: https://clientbox.co/dl/inv_998877.pdf
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````