{
  "swagger": "2.0",
  "info": {
    "version": "1.0",
    "title": "Business Intelligence API",
    "description": "API endpoints for accessing Business Intelligence data warehouse views. Requires SuperAdmin or CompanyAdmin role."
  },
  "host": "your-api-host.com",
  "basePath": "/",
  "schemes": ["https", "http"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "securityDefinitions": {
    "Bearer": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header",
      "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\""
    }
  },
  "paths": {
    "/api/Account/GetToken": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Get authentication token",
        "description": "Obtain an access token for API authentication using username/password or refresh token",
        "operationId": "GetToken",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authentication successful",
            "schema": {
              "$ref": "#/definitions/TokenResponse"
            }
          },
          "401": {
            "description": "Invalid credentials or user disabled"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Categories": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get all BI categories",
        "description": "Retrieve all business intelligence categories from vwBICategories view",
        "operationId": "GetBICategories",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI categories retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BICategoryDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/CostCenters": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get all BI cost centers",
        "description": "Retrieve all business intelligence cost centers from vwBICostCenters view",
        "operationId": "GetBICostCenters",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI cost centers retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BICostCenterDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Products": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get all BI products",
        "description": "Retrieve all business intelligence products from vwBIProducts view",
        "operationId": "GetBIProducts",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI products retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIProductDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Goods": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI goods",
        "description": "Retrieve all business intelligence goods from vwBIGoods view",
        "operationId": "GetBIGoods",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI goods retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIGoodDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Stores": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI stores",
        "description": "Retrieve all business intelligence stores from vwBIStores view",
        "operationId": "GetBIStores",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI stores retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIStoreDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Units": {
      "get": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI units",
        "description": "Retrieve all business intelligence units from vwBIUnits view",
        "operationId": "GetBIUnits",
        "security": [{ "Bearer": [] }],
        "responses": {
          "200": {
            "description": "BI units retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIUnitDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Sellings": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI sellings",
        "description": "Retrieve business intelligence sellings data from vwBISellings view",
        "operationId": "GetBISellings",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI sellings retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BISellingDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Purchases": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI purchases",
        "description": "Retrieve business intelligence purchases data from vwBIPurchase view",
        "operationId": "GetBIPurchases",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI purchases retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIPurchaseDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Wastes": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI wastes",
        "description": "Retrieve business intelligence wastes data from vwBIWaste view",
        "operationId": "GetBIWastes",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI wastes retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIWasteDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Inventories": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI inventories",
        "description": "Retrieve business intelligence inventories data from vwBIInventory view",
        "operationId": "GetBIInventories",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI inventories retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BIInventoryDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Transfers": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI transfers",
        "description": "Retrieve business intelligence transfers data from vwBITransfers view",
        "operationId": "GetBITransfers",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI transfers retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BITransferDTO"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    },
    "/api/BusinessIntelligence/Consumptions": {
      "post": {
        "tags": ["BusinessIntelligence"],
        "summary": "Get BI consumptions",
        "description": "Retrieve business intelligence consumptions data from vwBIConsumptions view or consumption analysis",
        "operationId": "GetBIConsumptions",
        "security": [{ "Bearer": [] }],
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DateAndStoreFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "BI consumptions retrieved successfully",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ConsumptioItem"
              }
            }
          },
          "401": {
            "description": "User is not authorized"
          },
          "500": {
            "description": "Internal server error occurred"
          }
        }
      }
    }
  },
  "definitions": {
    "TokenRequest": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "Username for authentication"
        },
        "password": {
          "type": "string",
          "description": "Password for authentication"
        },
        "refreshToken": {
          "type": "string",
          "description": "Refresh token for token renewal"
        }
      }
    },
    "TokenResponse": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        },
        "access_token": {
          "type": "string"
        },
        "refresh_token": {
          "type": "string"
        },
        "token_type": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer",
          "format": "int32"
        },
        "userName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "emailConfirmed": {
          "type": "boolean"
        },
        "issued": {
          "type": "string",
          "format": "date-time"
        },
        "expires": {
          "type": "string",
          "format": "date-time"
        },
        "roles": {
          "type": "string"
        },
        "imageUrl": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "hasCovers": {
          "type": "boolean"
        },
        "error": {
          "type": "string"
        },
        "error_description": {
          "type": "string"
        }
      }
    },
    "DateFilter": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time",
          "description": "Start date (inclusive)"
        },
        "end": {
          "type": "string",
          "format": "date-time",
          "description": "End date (inclusive)"
        },
        "list": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "date-time"
          },
          "description": "Specific dates to include"
        }
      }
    },
    "DateAndStoreFilter": {
      "type": "object",
      "properties": {
        "dateFilter": {
          "$ref": "#/definitions/DateFilter"
        },
        "stores": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Store codes to filter by"
        }
      }
    },
    "BICategoryDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "fbType": {
          "type": "integer",
          "format": "int32",
          "description": "0=Food, 1=Beverage, 2=Other"
        },
        "isCover": {
          "type": "boolean"
        }
      }
    },
    "BICostCenterDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "BIProductDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "categoryId": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "vat": {
          "type": "number",
          "format": "double"
        },
        "type": {
          "type": "integer",
          "format": "int32"
        },
        "yield": {
          "type": "number",
          "format": "double"
        },
        "isCover": {
          "type": "boolean"
        },
        "unitId": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "BIGoodDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "aliasName": {
          "type": "string"
        },
        "categoryId": {
          "type": "integer",
          "format": "int32"
        },
        "categoryName": {
          "type": "string"
        },
        "fbType": {
          "type": "integer",
          "format": "int32"
        },
        "isFresh": {
          "type": "boolean"
        },
        "tag": {
          "type": "string"
        },
        "supplier": {
          "type": "string"
        },
        "unit1": {
          "type": "string"
        },
        "unit2": {
          "type": "string"
        },
        "ratio1": {
          "type": "number",
          "format": "double"
        },
        "ratio2": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "BIStoreDTO": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "area": {
          "type": "string"
        },
        "group": {
          "type": "string"
        },
        "company": {
          "type": "string"
        }
      }
    },
    "BIUnitDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "BISellingDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "productId": {
          "type": "integer",
          "format": "int32"
        },
        "foodCost": {
          "type": "number",
          "format": "double"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "vat": {
          "type": "number",
          "format": "double"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "store": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "costCenterId": {
          "type": "string"
        },
        "documentNumber": {
          "type": "string"
        },
        "time": {
          "type": "string"
        },
        "isWaste": {
          "type": "boolean"
        },
        "discount": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "BIPurchaseDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "store": {
          "type": "string"
        },
        "costCenterId": {
          "type": "string"
        },
        "costCenterName": {
          "type": "string"
        },
        "goodsId": {
          "type": "integer",
          "format": "int32"
        },
        "goodsCode": {
          "type": "string"
        },
        "goodsName": {
          "type": "string"
        },
        "goodsAlias": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "unit": {
          "type": "string"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "unitBase": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "ratio": {
          "type": "number",
          "format": "double"
        },
        "amount": {
          "type": "number",
          "format": "double"
        },
        "documentNumber": {
          "type": "string"
        },
        "supplierId": {
          "type": "integer",
          "format": "int32"
        },
        "supplierName": {
          "type": "string"
        },
        "discount": {
          "type": "number",
          "format": "double"
        },
        "isTraining": {
          "type": "boolean"
        }
      }
    },
    "BIWasteDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "store": {
          "type": "string"
        },
        "costCenterId": {
          "type": "string"
        },
        "costCenterName": {
          "type": "string"
        },
        "goodsId": {
          "type": "integer",
          "format": "int32"
        },
        "goodsCode": {
          "type": "string"
        },
        "goodsName": {
          "type": "string"
        },
        "goodsAlias": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "unit": {
          "type": "string"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "unitBase": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "ratio": {
          "type": "number",
          "format": "double"
        },
        "amount": {
          "type": "number",
          "format": "double"
        },
        "wasteType": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "BIInventoryDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "store": {
          "type": "string"
        },
        "costCenterId": {
          "type": "string"
        },
        "costCenterName": {
          "type": "string"
        },
        "goodsId": {
          "type": "integer",
          "format": "int32"
        },
        "goodsCode": {
          "type": "string"
        },
        "goodsName": {
          "type": "string"
        },
        "goodsAlias": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "unit": {
          "type": "string"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "unitBase": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "ratio": {
          "type": "number",
          "format": "double"
        },
        "amount": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "BITransferDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "sourceStore": {
          "type": "string"
        },
        "targetStore": {
          "type": "string"
        },
        "sourceCostCenterId": {
          "type": "string"
        },
        "sourceCostCenterName": {
          "type": "string"
        },
        "targetCostCenterId": {
          "type": "string"
        },
        "targetCostCenterName": {
          "type": "string"
        },
        "goodsId": {
          "type": "integer",
          "format": "int32"
        },
        "goodsName": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "unit": {
          "type": "string"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "unitBase": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "ratio": {
          "type": "number",
          "format": "double"
        },
        "amount": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "BIConsumptionDTO": {
      "type": "object",
      "properties": {
        "inner_Code": {
          "type": "string"
        },
        "store": {
          "type": "string"
        },
        "costCenterId": {
          "type": "string"
        },
        "costCenterName": {
          "type": "string"
        },
        "goodsId": {
          "type": "integer",
          "format": "int32"
        },
        "goodsName": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "unit": {
          "type": "string"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "unitBase": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "ratio": {
          "type": "number",
          "format": "double"
        },
        "amount": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "ConsumptioItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "code": {
          "type": "string"
        },
        "category": {
          "$ref": "#/definitions/BaseDTO"
        },
        "goods": {
          "$ref": "#/definitions/SimpleGoodsDTO"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "priceBase": {
          "type": "number",
          "format": "double"
        },
        "units": {
          "$ref": "#/definitions/Units"
        },
        "baseConsumption": {
          "type": "number",
          "format": "double"
        },
        "warehouseConsumption": {
          "type": "number",
          "format": "double"
        },
        "purchase": {
          "type": "number",
          "format": "double"
        },
        "purchaseBase": {
          "type": "number",
          "format": "double"
        },
        "transfert": {
          "type": "number",
          "format": "double"
        },
        "transfertBase": {
          "type": "number",
          "format": "double"
        },
        "inventory": {
          "$ref": "#/definitions/InventoryQuantity"
        },
        "prevInventory": {
          "$ref": "#/definitions/InventoryQuantity"
        },
        "inventoryExact": {
          "$ref": "#/definitions/InventoryQuantity"
        },
        "prevInventoryExact": {
          "$ref": "#/definitions/InventoryQuantity"
        },
        "adjustments": {
          "type": "number",
          "format": "double"
        },
        "adjustmentsBase": {
          "type": "number",
          "format": "double"
        },
        "available": {
          "type": "number",
          "format": "double"
        },
        "final": {
          "type": "number",
          "format": "double"
        },
        "effectiveConsumption": {
          "type": "number",
          "format": "double"
        },
        "rest": {
          "type": "number",
          "format": "double"
        },
        "availableBase": {
          "type": "number",
          "format": "double"
        },
        "finalBase": {
          "type": "number",
          "format": "double"
        },
        "effectiveConsumptionBase": {
          "type": "number",
          "format": "double"
        },
        "restBase": {
          "type": "number",
          "format": "double"
        },
        "effectiveConsumptionValue": {
          "type": "number",
          "format": "double"
        },
        "effectiveConsumptionPerc": {
          "type": "number",
          "format": "double"
        },
        "restValue": {
          "type": "number",
          "format": "double"
        },
        "restVariancePerc": {
          "type": "number",
          "format": "double"
        },
        "deviationAlert": {
          "type": "boolean"
        },
        "transfertAmount": {
          "type": "number",
          "format": "double"
        },
        "adjustmentsAmount": {
          "type": "number",
          "format": "double"
        },
        "purchaseAmount": {
          "type": "number",
          "format": "double"
        },
        "noInitialInventoryDate": {
          "type": "boolean"
        },
        "err1": {
          "type": "boolean"
        },
        "err2": {
          "type": "boolean"
        },
        "err3": {
          "type": "boolean"
        },
        "absValue": {
          "type": "number",
          "format": "double"
        },
        "absAmount": {
          "type": "number",
          "format": "double"
        },
        "impact": {
          "type": "number",
          "format": "double"
        },
        "weighthOverTotal": {
          "type": "number",
          "format": "double"
        },
        "severityIndex": {
          "type": "number",
          "format": "double"
        },
        "meaning": {
          "type": "boolean"
        },
        "severityStatus": {
          "type": "string",
          "enum": ["None", "NotSignificant", "Favorable", "Ok", "Warning", "Critical"]
        }
      }
    },
    "BaseDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "SimpleGoodsDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string"
        }
      }
    },
    "Units": {
      "type": "object",
      "properties": {
        "baseUnit": {
          "type": "string"
        },
        "warehouseUnit": {
          "type": "string"
        }
      }
    },
    "InventoryQuantity": {
      "type": "object",
      "properties": {
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "quantityBase": {
          "type": "number",
          "format": "double"
        },
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "amount": {
          "type": "number",
          "format": "double"
        }
      }
    }
  }
}
