Migrated from Redmine #622 | Author: Avi Beetul
Status: Closed | Priority: High, I’m very impatient | Created: 2020-12-09
Hi,
While testing my code, I found a potential bug in the REST API.
Get order/invoice item
Return order/invoice item by id
Endpoint:
/admin/invoices/{id}
Return:
AdminInvoiceEntity
Result contains bookings as expected:
“booking_ids”: [
329
],
"bookings": [
{
"id": 329,
"code": "00694ijm",
"start_datetime": "2020-12-11 17:45:00",
"end_datetime": "2020-12-11 17:50:00",
"location_id": null,
"category_id": null,
"service_id": 1,
"provider_id": 1,
"client_id": 389,
"duration": null
}
],
“invoice_id”: 329,
However, the problem is when I GET all invoices.
Get orders/invoices list
Return orders and invoices list.
Endpoint:
/admin/invoices
Return:
array|AdminInvoiceEntity
Result contains no bookings.
“booking_ids”: [
329
],
“bookings”: null,
“invoice_id”: 329
This is not limited to the invoice_id above.
The returned result of the endpoint /admin/invoices does NOT give me any bookings.
Example:
3160 invoices and they all contain “bookings”: null.
Can you please assist?