Invoiced service orders report
Returns how many service orders (status FAC, joined to their invoicing document by number and type) were invoiced today, plus the optional invoiced totals, warehouse echo, single-day comparison and daily series when they were requested. The series is a daily flow, so a day with nothing invoiced is a real zero, and the comparison is one exact day, never an accumulated range. total and total_without_vat are summed independently; do not subtract one from the other to obtain VAT.
In: header
Query Parameters
Restrict every number in the response to one warehouse (lojas.CodLoja). Omit for every warehouse, which is what the legacy widget counts. An id that is not a real warehouse is a 422, never a silent zero.
Number of daily points to return in history, ending on the response date. One of 0, 7, 30 or 90; 0 (the default) omits history entirely. The series is a daily flow, so a day with nothing invoiced is a real zero, never a gap.
0 | 7 | 30 | 90Return a comparison block for the day this many days before the response date -- 1 is yesterday, 7 a week, 28 four weeks. 0 or omitted leaves comparison out of the payload. The comparison is that single day, never an accumulated range.
Set to 1 to add total (invoiced total, VAT included) and total_without_vat (the same total excluding VAT) to the response, to comparison and to every history point. Both are omitted by default. Do not derive VAT by subtracting one from the other: Total is stored rounded and TotalSIVA is not, so the difference drifts over a large enough set.
"0" | "1"Response Body
curl -X GET "https://og-tenant1.test:8003/api/v2/workshop/reports/invoiced-service-orders?warehouse_id=0&history_days=0&compare_days=0&include_totals=0"{
"data": {
"date": "string",
"count": 0,
"total": 0,
"total_without_vat": 0,
"warehouse_id": 0,
"comparison": {},
"history": []
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}{
"data": {
"code": "VALIDATION_FAILED",
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
},
"meta": {
"trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
}
}