Skip to main content

Report.getHistorical

The method, Report.getHistorical returns transactional data in name/value pairs. This data is reconcilable with the configuration data returned in the Report.getStaticData method.

Parameters

The Report.getHistorical method requires one (1) parameter:

  • "date" in the format of YYYY-MM-DD

The Chef API offers up to two weeks of historical transactional data. A date entered outside of this two week range may not generate the expected output results.

Request Examples

Examples are provided in Curl and PHP.

Curl Example

curl --location --request POST 'http://192.168.1.220/pcu/server/public/index.php/api/json-rpc/v1' \ --header 'Authorization: Bearer {jwt}' \ --header 'Content-Type: text/plain' \ --data-raw '{ "jsonrpc": "2.0", "method": "Report.getHistorical", "params": [{ "date": "yyyy-mm-dd" }], "id": 0 }'

PHP Example

?php $apiUrl = 'https://chef.penguinpos.com/pcu/server/public/index.php/api/json-rpc/v1'; $payload = '{ "method": "Report.getHistorical", "params": [{ "date": "yyyy-mm-dd" }], "id": 1, "jsonrpc": "2.0" }'; $header = array( "Content-Type: application/json", "Authorization: Bearer [jwt]" ); $context = stream_context_create(array( 'http' => array( 'ignore_errors' => true, 'method' => "POST", 'header'  => $header, 'content' => $payload )) ); $result = file_get_contents($apiUrl, false, $context); var_dump($result);

Output Example

Report.getHistorical returns transactional data in name/value pairs. This data includes, but is not limited to:

  • Cook List History

  • Sales History

  • Projections

  • Scoring

  • Fryer Critical Errors

  • Fryer Error Messages

  • Fryer Events

  • Frypot Status

  • Frypot Lane Status

  • Filter and Oil Status

  • Hold Events

  • Fryer System Status

  • Fryer Warning Messages

  • Pan Content

Loading request from Report.getHistorical

{ "jsonrpc": "2.0", "id": 1, "result": { "success": true, "data": { "pan_content": [], "cook_list_history": [{ "cook_list_history_uid": XXXXXX, "ingredient_uid": 2, "projection": 0, "adj_projection": 0, "forced_projection": 0, "sold": 0, "start": 0, "pan_count": 0, "cook_list_new": 0, "cook_list_remaining": 0, "waste": 0, "pans_loaded": 0, "pans_emptied": 0, "remaining": 0, "status_time": "YYYY-MM-DD XX:XX:XX", "multiplier": 1, "auto_quotient": 1, "pans_manually_loaded": 0, "pans_called_for_loaded": 0 }, { ...