Get Menu Item Sales Belonging to a Family Group

Follow the procedure below to get menu item dimensions belonging to a family group using the Oracle MICROS Business Intelligence REST API.

Note:

  • Ensure that the Business Intelligence API account is created and assigned to the desired organizational level with required data access permissions. See Obtain Account Information.

  • This use case requires the API account to have the Sales and Operations data access permission.

  • The cURL command examples use the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain. See Send Requests.

To get the daily sales for the menu items belonging to a given family group:

  1. Obtain a valid OAuth token for your API account. See Authenticate.
  2. Get menu item numbers belonging to a family group for the location.

    Request Body

    curl -i -X POST -H "Authorization: Bearer <token>"  -H "Content-Type:application/json" -d {"locRef":"1234","searchCriteria":"where equals(menuItems.famGrpName,'Sides'))","include":"locRef, menuItems.num, menuItems.famGrpName"} https://baseurl/bi/v1/orgidentifier/getMenuItemDimensions

    Example of Response Body

    {
        "locRef": "1234",
        "menuItems":[
         {
            "num": 15253,
            "famGrpName": "Sides"
         },
         {
            "num": 15254,
            "famGrpName": "Sides"
         },
         {
            "num": 15255,
            "famGrpName": "Sides"
         },
         ]
    }
  3. Get daily menu item sales for the business date and location for each menu item number returned in the response of Step 2.

    Request Body

    curl -i -X POST -H "Authorization: Bearer <token>" -H "Content-Type:application/json" -d {"locRef":"1234","busDt":"2020-07-20","searchCriteria":"where equals(revenueCenters.menuItems.miNum,15253))"} https://baseurl/bi/v1/orgidentifier/getMenuItemDailyTotals

    Example of Response Body

    {
        "locRef": "1234",
        "busDt: "2020-07-20",
        "revenueCenters":[{
            "rvcNum": 1372,
            "menuItems":[{
                "miNum": 12345,
                "prcLvlNum": 1,
                "otNum": 12345,
                "slsTtl": 1234.56,
                "slsCnt": 123,
                "rtnCnt": 123,
                "dscTtl": 1234.56,
                "vol": 1234.56,
                "prepCost": 1234.56,
                "vatTtl": 1234.567890,
                "dscVatTtl": 1234.567890
            }]
        }]
    }
  4. You can now aggregate all the menu item sales for the family group.