Restaurant - Invoice
InvoiceController_update
PATCH
/restaurant/invoices/{id}
const url = 'https://api.inspow.tech/api/v1/restaurant/invoices/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"subscription":"645cc3d3f8a9c9a2b88a22f1","dueDate":"2025-05-10T23:59:59.000Z","amount":45000,"status":"PAID","createdBy":"645cc3d3f8a9c9a2b88a22c4","updatedBy":"645cc3d3f8a9c9a2b88a22c5","paymentReference":"REF123456","periodStart":"2024-01-01T00:00:00.000Z","periodEnd":"2024-01-31T23:59:59.999Z","businessDaysCount":20}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.inspow.tech/api/v1/restaurant/invoices/example \ --header 'Content-Type: application/json' \ --data '{ "subscription": "645cc3d3f8a9c9a2b88a22f1", "dueDate": "2025-05-10T23:59:59.000Z", "amount": 45000, "status": "PAID", "createdBy": "645cc3d3f8a9c9a2b88a22c4", "updatedBy": "645cc3d3f8a9c9a2b88a22c5", "paymentReference": "REF123456", "periodStart": "2024-01-01T00:00:00.000Z", "periodEnd": "2024-01-31T23:59:59.999Z", "businessDaysCount": 20 }'Parameters
Sección titulada « Parameters »Path Parameters
Sección titulada «Path Parameters » id
required
string
Request Body required
Sección titulada «Request Body required » Media type application/json
object
subscription
The ID of the subscription this invoice covers.
string
Example
645cc3d3f8a9c9a2b88a22f1 dueDate
Due date for payment (will be auto-calculated if not provided based on INVOICE_DUE_DAYS env variable)
string format: date-time
Example
2025-05-10T23:59:59.000Z amount
Amount billed in this invoice.
number
Example
45000 status
Status of the payment.
string
Example
PENDING createdBy
The ID of the user who created this record.
string format: MongoId
Example
645cc3d3f8a9c9a2b88a22c4 updatedBy
The ID of the user who last updated this record.
string format: MongoId
Example
645cc3d3f8a9c9a2b88a22c5 paymentReference
Payment reference number
string
Example
REF123456 periodStart
Start date of the billing period
string format: date-time
Example
2024-01-01T00:00:00.000Z periodEnd
End date of the billing period
string format: date-time
Example
2024-01-31T23:59:59.999Z businessDaysCount
Número de días hábiles facturados (editable para ajustar según asistencia)
number
Example
20 pricePerDay
Precio por día (referencia del plan, solo lectura)
number
Example
14000