AlphaAlpha Docs

Get order statistics

Get statistics for orders

GET
/orders/stats
AuthorizationBearer <token>

In: header

Query Parameters

subsidiaryId?string
startDate?string
Formatdate-time
endDate?string
Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/orders/stats"
{
  "averageOrderValue": 0.1,
  "orderByStatus": {
    "property1": 0,
    "property2": 0
  },
  "topClients": [
    {
      "averageOrderValue": 0.1,
      "clientAvatar": {
        "blobId": "string",
        "height": 0,
        "thumbnailBlobId": "string",
        "width": 0
      },
      "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"
          }
        ]
      },
      "totalPrice": 0.1,
      "totalQuantity": 0.1
    }
  ],
  "totalAmount": 0.1,
  "totalOrders": 0
}
{
  "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"
}