Ir al contenido

Restaurant - Invoice

InvoiceController_update

PATCH
/restaurant/invoices/{id}
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 }'
id
required
string
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
/^[0-9]+(\.[0-9]{1,2})?$/
Example
45000
status

Status of the payment.

string
default: PENDING
Allowed values: PAID PENDING FAILED REVIEW
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