Real-Time Guest Check Transaction Data

Follow the procedure below to get real time transaction data for a location 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 real time guest check transaction data:

  1. Obtain a valid OAuth token for your API account. See Authenticate.
  2. Get the latest business date.

    Request Body

    curl -i -X POST -H "Authorization: Bearer
       " -H "Content-Type:application/json" -d {"locRef":"1234"} https://baseurl/bi/v1/orgidentifier/getLatestBusinessDate

    Example of Response Body

    {
        "curUTC": "2020-10-20T15:15:00",
        "locRef": "1234",
        "latestBusDt": "2020-10-20"
    }
  3. Get latest guest checks for the day, up to the current time for the current business date.

    Request Body

    curl -i -X POST -H "Authorization: Bearer
       " -H "Content-Type:application/json" -d {"locRef":"1234","opnBusDt":"2020-10-20"} https://baseurl/bi/v1/orgidentifier/getGuestChecks

    Example of Response Body

    {
     "curUTC": "2020-10-20T15:15:00",
     "locRef": "1234",
     "guestChecks":[{
        "guestCheckId": 124563,
        "chkNum": 7,
        "chkName": "Paul's Tab",
        "opnBusDt": "2020-10-20", 
        "opnUTC": "2020-10-20T14:15:20",
        "clsdBusDt": "2020-10-20",
        "clsdUTC": "2020-10-20T15:10:10",
        "reopnClsdChkClsdBusDt": "2020-10-20",
        "reopnClsdChkClsdUTC": "2020-10-20T15:10:10",
        "lastUpdatedUTC": "2020-10-20T15:10:10",
        "clsdFlag": true,
        "gstCnt": 2,
        "subTtl": 123.50,
        "autoSvcTtl": 0.00,
        "svcChgTtl": 2.50,
        "nonTxblSlsTtl": 1.25,
        "txblSlsTtl": 22.00,
        "taxExmpSlsTtl":1.75,
        "taxCollTtl": 1.45,
        "chkTtl": 25.00,
        "dscTtl": 3.00,
        "payTtl": 0.00,
        "balDueTtl": 0.00,
        "reopnFrmChk": 1,
        "reopnToChk": 1,
        "spltFrmChk": 1,
        "rvcNum": 123,
        "otNum": 12,
        "tblNum": 123,
        "tblName": "123",
        "empNum": 21334,
        "chkInfo": "Manually Entered Text",
        "taxes":[{
            "taxNum": 123
            "txblSlsTtl": 12.34,
            "taxCollTtl": 1.34,
        }],
        "detailLines":[{
            "guestCheckLineItemId": 123
            "lineNum:1,
            "dtlId": 1,
            "parDtlId": 2,
            "detailUTC": "2020-10-20T14:59"58",
            "busDt": "2020-10-20",
            "prepCost":  123.45,
            "vdFlag": false,
            "errCorFlag": false,
            "wsNum": 1,
            "refInfo1": "Manually Entered Text",
            "refInfo2": "Manually Entered Text",
            "dspTtl": 123.45,
            "dspQty": 1,
            "aggTtl" : 123.45,
            "aggQty": 1,
            "doNotShowFlag": false,
            "chkEmpId": 123,
            "transEmpId": 123,
            "mgrEmpId": 123,
            "rsnCodeNum": 123,
            "svcRdNum": 1,
            "cashierNum": 1234,
            "menuItem":{
                "miNum": 1234556,
                "modFlag": false,
                "modPrfx": 0,
                "inclTax": 0.45, 
                "rtrnFlag": false,
                "activeTaxes": "1,2,5",
                "prcLvl": 1
            },
            "discount":{
                "dscNum": 12345,
                "dscMiNum": 1234, 
                "mealEmpNum": 247913,
                "vatTaxTtl": 123.45
            },
            "serviceCharge":{
                "svcChgNum": 1223344,
            },
            "tenderMedia":{
                "tmedNum": 1234,
                "tipTotal": 10.00,
                "mealEmpNum": 247913
            },
            "other":{
                "detailType": 1,
                "detailNum": 12354
            }
        }]
     }]
    }
  4. Store the curUTC attribute from the response.
  5. After a certain time interval, for example 15 minutes, retrieve the latest guest checks by passing the curUTC attribute value as the changedSinceUTC request parameter.

    Request Body

    curl -i -X POST -H "Authorization: Bearer
       " -H "Content-Type:application/json" -d {"locRef":"1234","opnBusDt":"2020-10-20","changedSinceUTC":"2020-10-20T15:15:00"} https://baseurl/bi/v1/orgidentifier/getGuestChecks

    Example of Response Body

    {
     "curUTC": "2020-10-20T15:20:59",
     "locRef": "1234",
     "guestChecks":[{
        "guestCheckId": 124563,
        "chkNum": 7,
        "chkName": "Check Name",
        "opnBusDt": "2020-10-20", 
        "opnUTC": "2020-10-20T15:20:20",
        "clsdBusDt": "2020-10-20",
        "clsdUTC": "2020-10-20T16:16:10",
        "reopnClsdChkClsdBusDt": "2020-10-20",
        "reopnClsdChkClsdUTC": "2020-10-20T16:16:10",
        "lastUpdatedUTC": "2020-10-20T16:16:10",
        "clsdFlag": true,
        "gstCnt": 2,
        "subTtl": 123.50,
        "autoSvcTtl": 0.00,
        "svcChgTtl": 2.50,
        "nonTxblSlsTtl": 1.25,
        "txblSlsTtl": 22.00,
        "taxExmpSlsTtl":1.75,
        "taxCollTtl": 1.45,
        "chkTtl": 25.00,
        "dscTtl": 3.00,
        "payTtl": 0.00,
        "balDueTtl": 0.00,
        "reopnFrmChk": 1,
        "reopnToChk": 1,
        "spltFrmChk": 1,
        "rvcNum": 123,
        "otNum": 12,
        "tblNum": 123,
        "tblName": "123",
        "empNum": 21334,
        "chkInfo": "Manually Entered Text",
        "taxes":[{
            "taxNum": 123
            "txblSlsTtl": 12.34,
            "taxCollTtl": 1.34,
        }],
        "detailLines":[{
            "guestCheckLineItemId": 123
            "lineNum:1,
            "dtlId": 1,
            "parDtlId": 2,
            "detailUTC": "2020-10-20T14:59"58",
            "busDt": "2020-10-20",
            "prepCost":  123.45,
            "vdFlag": false,
            "errCorFlag": false,
            "wsNum": 1,
            "refInfo1": "Manually Entered Text",
            "refInfo2": "Manually Entered Text",
            "dspTtl": 123.45,
            "dspQty": 1,
            "aggTtl" : 123.45,
            "aggQty": 1,
            "doNotShowFlag": false,
            "chkEmpId": 123,
            "transEmpId": 123,
            "mgrEmpId": 123,
            "rsnCodeNum": 123,
            "svcRdNum": 1,
            "cashierNum": 1234,
            "menuItem":{
                "miNum": 1234556,
                "modFlag": false,
                "modPrfx": 0,
                "inclTax": 0.45,
                "rtrnFlag": false,
                "activeTaxes": "1,2,5",
                "prcLvl": 1
            },
            "discount":{
                "dscNum": 12345,
                "dscMiNum": 1234, 
                "mealEmpNum": 247913,
                "vatTaxTtl": 123.45
            },
            "serviceCharge":{
                "svcChgNum": 1223344,
            },
            "tenderMedia":{
                "tmedNum": 1234,
                "tipTotal": 10.00,
                "mealEmpNum": 247913
            },
            "other":{
                "detailType": 1,
                "detailNum": 12354
            }
        }]
     }]
    }