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

# Alquiler de Inmuebles

> Recibo de alquiler de bienes inmuebles propios. Sector 2.

Documento para el alquiler de bienes inmuebles propios. Se emite por el endpoint unificado `POST /api/v1/invoices` con `documentSectorType: 2`.

## Datos del sector

| Campo                | Valor                                                            |
| -------------------- | ---------------------------------------------------------------- |
| `documentSectorType` | `2`                                                              |
| Servicio SIAT        | Facturación Electrónica / Computarizada (genérico por modalidad) |
| Representación       | PDF "FACTURA DE ALQUILER" (A4 + ticket)                          |

## Campos específicos

Además de los campos estándar de [Crear Factura](/api/create-invoice):

| Campo                | Tipo    | Req | Descripción                                                                                    |
| -------------------- | ------- | --- | ---------------------------------------------------------------------------------------------- |
| `documentSectorType` | integer | Sí  | `2`                                                                                            |
| `billedPeriod`       | string  | Sí  | Periodo facturado (`periodoFacturado`), ej. `"2026-07"` o `"Julio 2026"`. Requerido por el XSD |

<Note>
  La cantidad en el detalle se representa con 2 decimales (`1.00`), como exige la representación
  gráfica oficial de alquiler. El sector no usa gift card.
</Note>

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST https://sandbox.cucu.bo/api/v1/invoices \
    -H "Content-Type: application/json" \
    -H "X-API-Key: YOUR_API_KEY" \
    -d '{
      "pointOfSaleId": "660e8400-e29b-41d4-a716-446655440004",
      "documentSectorType": 2,
      "clientDocumentType": 5,
      "clientDocumentNumber": "1023456789",
      "clientBusinessName": "EMPRESA DEMO S.R.L.",
      "paymentMethodCode": 1,
      "billedPeriod": "2026-07",
      "details": [
        {
          "activityEconomic": "681000",
          "codeProductSin": "83111",
          "description": "Alquiler oficina - Julio 2026",
          "quantity": 1,
          "unitMeasure": 58,
          "priceUnit": 3500.00
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://sandbox.cucu.bo/api/v1/invoices', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      pointOfSaleId: '660e8400-e29b-41d4-a716-446655440004',
      documentSectorType: 2,
      clientDocumentType: 5,
      clientDocumentNumber: '1023456789',
      clientBusinessName: 'EMPRESA DEMO S.R.L.',
      paymentMethodCode: 1,
      billedPeriod: '2026-07',
      details: [{
        activityEconomic: '681000',
        codeProductSin: '83111',
        description: 'Alquiler oficina - Julio 2026',
        quantity: 1,
        unitMeasure: 58,
        priceUnit: 3500.00
      }]
    })
  });
  ```

  ```python Python theme={"system"}
  import requests

  response = requests.post(
      'https://sandbox.cucu.bo/api/v1/invoices',
      headers={
          'Content-Type': 'application/json',
          'X-API-Key': 'YOUR_API_KEY'
      },
      json={
          'pointOfSaleId': '660e8400-e29b-41d4-a716-446655440004',
          'documentSectorType': 2,
          'clientDocumentType': 5,
          'clientDocumentNumber': '1023456789',
          'clientBusinessName': 'EMPRESA DEMO S.R.L.',
          'paymentMethodCode': 1,
          'billedPeriod': '2026-07',
          'details': [{
              'activityEconomic': '681000',
              'codeProductSin': '83111',
              'description': 'Alquiler oficina - Julio 2026',
              'quantity': 1,
              'unitMeasure': 58,
              'priceUnit': 3500.00
          }]
      }
  )
  ```
</CodeGroup>
