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({
documentSectorType: 13,
pointOfSaleId: '660e8400-e29b-41d4-a716-446655440004',
clientDocumentType: 1,
clientDocumentNumber: '8765432',
clientBusinessName: 'CARLOS MENDOZA QUISPE',
paymentMethodCode: 1,
month: 'Febrero',
gestation: 2026,
city: 'La Paz',
zone: 'Sopocachi',
meterNumber: 'MED-2024-00158',
customerAddress: 'Av. 6 de Agosto #2450',
consumptionPeriod: 185.5,
beneficiary1886: 0,
rateSewage: 12.50,
rateLighting: 8.00,
details: [{
activityEconomic: '351000',
codeProductSin: '69101',
description: 'Consumo energia electrica - Febrero 2026',
quantity: 185.5,
unitMeasure: 53,
priceUnit: 0.68
}]
})
});