Reporting
Reporting endpoints for sales, waste, stock, and usage reports
Get sales report
AuthorizationBearer <token>
In: header
Query Parameters
start*string
Format
date-timeend*string
Format
date-timegroupingScale?string
Value in
"DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/reporting/sales?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"{
"averageOrderValue": 0.1,
"collectionRate": 0.1,
"orderStatusBreakdown": {
"property1": 0,
"property2": 0
},
"revenueBySubsidiary": [
{
"name": "string",
"revenue": 0.1,
"subsidiaryId": "string"
}
],
"revenueOverTime": [
{
"date": "string",
"label": "string",
"value": 0.1
}
],
"topClients": [
{
"averageOrderValue": 0.1,
"clientId": "string",
"clientName": "string",
"totalAmount": 0.1,
"totalOrders": 0
}
],
"topProducts": [
{
"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,
"totalRevenue": 0.1
}
],
"totalOrders": 0,
"totalRevenue": 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"
}Get stock report
AuthorizationBearer <token>
In: header
Query Parameters
siteId?string
daysToExpiry?integer
Default
30Format
int32Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/reporting/stock"{
"expiringItems": [
{
"batchNumber": "string",
"daysUntilExpiry": 0,
"expirationDate": "string",
"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"
}
]
},
"quantity": 0.1,
"siteId": "string",
"siteName": "string",
"unitPrice": 0.1
}
],
"expiringSoonCount": 0,
"outOfStockCount": 0,
"stockBySite": [
{
"siteId": "string",
"siteName": "string",
"totalItems": 0,
"totalValue": 0.1
}
],
"stockStatusBreakdown": {
"property1": 0,
"property2": 0
},
"totalItems": 0,
"totalStockValue": 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"
}Get usage report
AuthorizationBearer <token>
In: header
Query Parameters
start*string
Format
date-timeend*string
Format
date-timesiteId?string
groupingScale?string
Value in
"DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/reporting/usage?start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"{
"materialUsage": [
{
"expectedUsage": 0.1,
"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"
}
]
},
"totalUsage": 0.1,
"waste": 0.1,
"wastePercentage": 0.1
}
],
"totalExpectedUsage": 0.1,
"totalUsage": 0.1,
"totalWaste": 0.1,
"usageOverTime": [
{
"date": "string",
"label": "string",
"value": 0.1
}
],
"wastePercentage": 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"
}Get waste report
AuthorizationBearer <token>
In: header
Query Parameters
start*string
Format
date-timeend*string
Format
date-timesiteId?string
groupingScale?string
Value in
"DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR"Response Body
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"{
"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"
}