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: 17,
pointOfSaleId: '660e8400-e29b-41d4-a716-446655440004',
clientDocumentType: 1,
clientDocumentNumber: '8765432',
clientBusinessName: 'MARIA RODRIGUEZ FLORES',
paymentMethodCode: 1,
details: [
{
activityEconomic: '851000',
codeProductSin: '93121',
description: 'Cirugia laparoscopica de vesicula',
quantity: 1,
unitMeasure: 58,
priceUnit: 8500.00,
specialty: 'Cirugia General',
specialtyDetail: 'Colecistectomia laparoscopica',
operatingRoomNumber: 'Q-03',
doctorSpecialty: 'Cirugia General',
doctorName: 'Dr. Roberto Sanchez Gutierrez',
doctorDocument: '4521876',
doctorRegistrationNumber: 'MP-12345'
},
{
activityEconomic: '851000',
codeProductSin: '93121',
description: 'Anestesia general',
quantity: 1,
unitMeasure: 58,
priceUnit: 2500.00,
specialty: 'Anestesiologia',
doctorSpecialty: 'Anestesiologia',
doctorName: 'Dra. Patricia Cuellar Ramos',
doctorDocument: '6789012',
doctorRegistrationNumber: 'MP-67890'
}
]
})
});