API ReferenceReporting
Get waste report
Aggregate waste data by product, reason, site, and time
AuthorizationBearer <token>
In: header
Query Parameters
start*string
Format
date-timeend*string
Format
date-timesiteId?string
siteIds?array<string>
subsidiaryIds?array<string>
storageTypes?array<>
groupingScale?string
Default
"MONTH"Value in
"DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"targetCurrency?string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/reporting/waste?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"{
"accessRestricted": true,
"currencyMeta": {
"baseCurrency": "string",
"convertedAt": "2019-08-24T14:15:22Z",
"displayCurrency": "string",
"warnings": [
{
"asOfDate": "string",
"fromCurrency": "string",
"pivotCurrency": "string",
"reason": "MISSING_RATE",
"rowId": "string",
"toCurrency": "string"
}
]
},
"totalWasteQuantity": 0.1,
"totalWasteValue": 0.1,
"wasteByProduct": [
{
"productId": "string",
"productInfo": {
"brand": "string",
"category": "string",
"description": "string",
"imageBlobId": "string",
"name": "string",
"productId": "string",
"salesPrice": 0.1,
"stockInfo": {
"amountAvailable": 0.1,
"amountReserved": 0.1,
"baseUnit": {
"baseUnit": true,
"cost": 0.1,
"decimal": true,
"isBaseUnit": true,
"isDecimal": true,
"name": "string",
"quantity": 0.1,
"salesPrice": 0.1,
"unit": "string"
},
"currency": "string",
"destinationProductInfo": {
"amountAvailable": 0.1,
"amountReserved": 0.1,
"maximum": 0.1,
"minimum": 0.1,
"stockSiteId": "string",
"stockSiteName": "string",
"totalAmount": 0.1
},
"imageBlobId": "string",
"maximum": 0.1,
"minimum": 0.1,
"productId": "string",
"productName": "string",
"productType": "RAW_MATERIAL",
"salesPrice": 0.1,
"stockSiteId": "string",
"stockSiteName": "string",
"subsidiaryId": "string",
"totalAmount": 0.1,
"unitPrice": 0.1,
"unitsOfMeasurement": [
{
"baseUnit": true,
"cost": 0.1,
"decimal": true,
"isBaseUnit": true,
"isDecimal": true,
"name": "string",
"quantity": 0.1,
"salesPrice": 0.1,
"unit": "string"
}
]
},
"unitPrice": 0.1,
"unitsOfMeasurement": [
{
"baseUnit": true,
"cost": 0.1,
"decimal": true,
"isBaseUnit": true,
"isDecimal": true,
"name": "string",
"quantity": 0.1,
"salesPrice": 0.1,
"unit": "string"
}
]
},
"totalQuantity": 0.1,
"totalValue": 0.1
}
],
"wasteByReason": [
{
"count": 0,
"reason": "string",
"totalQuantity": 0.1
}
],
"wasteBySite": [
{
"siteId": "string",
"siteName": "string",
"totalQuantity": 0.1,
"totalValue": 0.1
}
],
"wasteOverTime": [
{
"date": "string",
"label": "string",
"value": 0.1
}
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}