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: 16,
pointOfSaleId: '660e8400-e29b-41d4-a716-446655440004',
clientDocumentType: 3,
clientDocumentNumber: 'AB123456',
clientBusinessName: 'JOHN SMITH',
paymentMethodCode: 2,
cardNumber: '4532',
qtyGuests: 2,
qtyRooms: 1,
qtyGreater: 2,
qtyMinors: 0,
dateEntryLodging: '2026-03-01T14:00:00',
details: [{
activityEconomic: '551000',
codeProductSin: '63111',
description: 'Habitacion doble - 3 noches (01-04 Mar 2026)',
quantity: 3,
unitMeasure: 58,
priceUnit: 280.00,
codeTypeRoom: 1,
detailGuests: 'John Smith, Jane Smith'
}]
})
});