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

# Inicio rápido

> Ejemplo de envío de una factura ordinaria básica

## Encabezados HTTP

<CodeGroup>
  ```http Headers HTTP theme={"dark"}
  Accept: application/json
  X-Qbikode-ClientApiKey: API-KEY de la empresa
  ```

  ```bash cURL theme={"dark"}
  curl -H 'Accept: application/json' \
       -H 'X-Qbikode-ClientApiKey: API-KEY de la empresa' \
       …
  ```
</CodeGroup>

## Cuerpo JSON de la petición

Este ejemplo muestra de la remisión de una factura ordinaria por un total de `121.00€`, con un concepto por valor de `100.00€` + IVA del `21.00%`.

<CodeGroup>
  ```json Body theme={"dark"}
  {
    "sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
    "invoice_type_key": "F1", // Factura (art. 6, 7.2 y 7.3 del RD 1619/2012)
    "sender_data": {
      "company_name": "Empresa emisora de ejemplo",
      "tax_id_number": "J27290840"
    },
    "recipients": [
      {
        "company_name": "Empresa receptora de ejemplo",
        "tax_id_number": "B99014037"
      }
    ],
    "full_invoice_number": "2025-000001",
    "fiscal_year": "2025",
    "issue_date": "2025-01-01",
    "operation_description": "Factura ordinaria por entrega de mercancías.",
    "total_quota": 21.00,
    "total_amount": 121.00,
    "lines": [
      {
        "tax_type_key": "01", // Impuesto sobre el Valor Añadido (IVA)
        "vat_tax_regime_key": "01", // Operación de régimen general
        "operation_type_key": "S1", // Operación Sujeta y No exenta - Sin inversión del sujeto pasivo
        "tax_base": "100.00",
        "tax_rate": "21.00",
        "tax_quota": "21.00"
      }
    ]
  }
  ```

  ```bash cURL theme={"dark"}
  curl -X "POST" "https://kubifactu.kubicode.test/api/invoices" \
       -H 'Accept: application/json' \
       -H 'Content-Type: text/plain; charset=utf-8' \
       -H 'X-Qbikode-ClientApiKey: API-KEY de la empresa' \
       -d $'{
    "sif_id": "9db0bca1-187e-4cf4-b87c-96f2044008d7",
    "invoice_type_key": "F1",
    "sender_data": {
      "company_name": "Empresa emisora de ejemplo",
      "tax_id_number": "J27290840"
    },
    "recipients": [
      {
        "company_name": "Empresa receptora de ejemplo",
        "tax_id_number": "B99014037"
      }
    ],
    "full_invoice_number": "2025-000001",
    "fiscal_year": "2025",
    "issue_date": "2025-01-01",
    "operation_description": "Factura ordinaria por entrega de mercancías.",
    "total_quota": 21.00,
    "total_amount": 121.00,
    "lines": [
      {
        "tax_type_key": "01",
        "vat_tax_regime_key": "01",
        "operation_type_key": "S1",
        "tax_base": "100.00",
        "tax_rate": "21.00",
        "tax_quota": "21.00"
      }
    ]
  }'
  ```
</CodeGroup>
