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

# Create Invoice

> Create a new invoice for a patient

## Body Parameters

<ParamField body="patientId" type="string" required>The patient ID</ParamField>

<ParamField body="items" type="array" required>
  Invoice line items

  <Expandable title="items">
    <ParamField body="description" type="string" required>Item description</ParamField>
    <ParamField body="procedureId" type="string">Link to a clinical procedure</ParamField>
    <ParamField body="quantity" type="integer" required>Quantity</ParamField>
    <ParamField body="unitPrice" type="number" required>Price per unit (in COP)</ParamField>
    <ParamField body="taxRate" type="number" default="0.19">Tax rate (0-1)</ParamField>
  </Expandable>
</ParamField>

<ParamField body="notes" type="string">Invoice notes</ParamField>
<ParamField body="discount" type="number">Discount amount in COP</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.nevatal.com/api/v1/billing/invoices" \
    -H "Authorization: Bearer nvtl_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "patientId": "pat_abc123",
      "items": [
        {
          "description": "Consulta General",
          "procedureId": "proc_general_consult",
          "quantity": 1,
          "unitPrice": 150000,
          "taxRate": 0.19
        }
      ],
      "notes": "Follow-up appointment billing"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "inv_002",
    "invoiceNumber": "FV-2025-0043",
    "patientId": "pat_abc123",
    "status": "draft",
    "subtotal": 150000,
    "tax": 28500,
    "total": 178500,
    "currency": "COP",
    "createdAt": "2025-03-16T09:00:00Z"
  }
  ```
</ResponseExample>
