website logo
⌘K
🚀Welcome to Eyrene!
🎉What's New
😎Tutorials
📱Mobile App
💻Web Portal
🔌API
Docs powered by archbee 

Reports

Methods allow you to get list of available reports, view information about them, and update them forcibly.



GET /reports

Retrieves a list of all available reports.

Reports are JSON documents created for a scene based on recognized images and, optionally, pre-loaded display master data such as a planogram. The system provides a small set of basic report types in all instances, though it is not uncommon to implement custom report types based on specific client requirements. These custom reports are available on specific instances only and are documented elsewhere.

GET /reports
GET
Params
Header Parameters
Authorization
required
String
String in "Token XXXXXX...." format.
Body Parameters
limit
optional
Integer
Number of results to return per page.
offset
optional
Integer
The initial index from which to return the results.


The response to the request returns a list of available reports with the IDs. Detailed information about the report can be viewed via /reports/{report_id}.

Response parameters​



id string

Report ID.



status string

Report status.

  • NOT_READY — the report is in the process of preparation. The client must repeat the request later.
  • READY — the report was successfully prepared. The client can use the "data" field.
  • ERROR — error in the process of preparing the report. The error message is available in the «error» field.


report_type string

Type of report.



created_date string (date-time)

Date the report was created in the format "YYYY-MM-DDTHH:MM:SSZ".



updated_date string (date-time)

Date of information update in the report in the format "YYYY-MM-DDTHH:MM:SSZ".



visit string

Visit ID




GET /reports/{report_id}

Get report details by ID.

GET /reports/{report_id}
GET
Params
Path Params
report_id
required
String
Report ID.
Header Parameters
Authorization
required
String
String in "Token XXXXXX...." format.


Response parameters​



id string

Report ID.



status string

Report status.

  • NOT_READY — the report is in the process of preparation. The client must repeat the request later.
  • READY — the report was successfully prepared. The client can use the "data" field.
  • ERROR — error in the process of preparing the report. The error message is available in the "error" field.


report_type string

Type of report.



For reports with the status READY​



created_date string (date-time)

Date the report was created in the format "YYYY-MM-DDTHH:MM:SSZ".



previous_report string (report ID)

The ID of the previous report with the same type, display, and customer_id or null.



json Object

Report data. The schema depends on the report type.



For reports with the status ERROR​



error string

Error message.







POST /reports/force_update

Updates report details. Use this method to retrospectively update reports when needed, e.g. when master data has changed.

Note

This method does not trigger image recognition, just reports of business logic.

POST /reports/force_update
POST
Params
Header Parameters
Authorization
optional
String
String in "Token XXXXXX...." format.
Body Parameters
reports 
required
Object
List of reports IDs. Before the end of processing, each report from this list will receive the status of NOT_READY. If the report is ready, its status changes to READY.
webhook
optional
String
URL Use webhook to reduce latency. If specified, the reports will be sent by POST request to this URL immediately when ready (one by one). If not specified, the client should explicitly poll reports.


If the webhook is specified, as soon as the reports are updated to it, a JSON will be sent as a POST request.

200
|
{
   "1786":{
      "..." // request JSON-object
   },
   :{
      "..." // request JSON-object
   },
   :{
      "..." // request JSON-object
   }
}






Types of reports

The type of the report in the response to the request is specified in the type field. Depending on the type of report, the contents of the JSON object in the response will be different.

FACING_COUNT​

FACING_COUNT report provides information on all distinct SKU recognized in the scene with facing count and share of the shelf (measured as a fraction of facings). Use facing count report to measure share of shelf and share of assortment KPIs.

Master data: none.

JSON example​

JSON
|
[
   {
      "sku_id":10, // SKU ID
      "count":6   // Number of facings
   },
// ...   
]


SHARE_OF_SPACE​

SHARE_OF_SPACE report provides information about the fraction of facing count and facing width for every recognized SKU.

Master data: none.

JSON example​

JSON
|
[
   {
      "sku_id":10,               // SKU ID
      "share_of_count":0.015,    // Number of facings / total number of facings
      "share_of_space":0.017     // Total SKU facings width / total width
   },
// ...   
]


REALOGRAM​

REALOGRAM report provides detailed "raw" data on coordinates and size in pixels for products and shelves recognized in images of the scene. In the report, the coordinates of the SKUs are relative to the upper-left corner of the corresponding image. "x", "y" are the coordinates of the center of the rectangle describing the product (bounding box). "h", "w" are height and width of this rectangle.

If scene images overlap, some products could be detected in several distinct images. In this case, all but one corresponding annotation will have the "duplicate" field set to "true".

Shelf annotation specifies the start (x1, y1) and end coordinates.

Master data: none.

JSON example​

JSON
|
[      
   {
      "image": 156673,    // Image upload ID, see uploads endpoint
      "annotations": [    // List of sku object found in the image
         {
            "sku_id": 232,  // SKU id, see sku endpoint
            "x": 569,       // Bounding box center x
            "y": 312,       // Bounding box center y
            "h": 112,       // Bounding box height
            "w": 112        // Bounding box width
            "duplicate": false
         },
         "shelf_annotations": [    // List of shelf object found in the image
           "x1": 45,               // x1, y1: shelf start in px
           "y1": 63,
           "x2": 46,               // x2, y2: shelf end in px
           "y2": 89
          ]
      // Other products in the image here
      ]
   },
   // Other images in the scene here
]


PRICE_TAGS​

Provides a relation between SKU and prices as determined based on recognized price tags.

Master data: none.

JSON example​

JSON
|
[
   {  
      "sku_id":28,                                // SKU ID
      "price": 130.57,                            // SKU price
      "price_tag_colors": ["yellow", "white"]     // Primary SKU price tag colors
   },
]


MHL_COMPLIANCE​

Compares assortment of SKU recognized in the scene with a pre-defined must-have list.

Master data: Must-have list (MHL).

JSON example​

JSON
|
{
   "mhl_id": 16752, // Must have list ID
   "compliance": 93.5,  // MHL compliance in %
   "records": [
      {
         "mhl_record_id":70,   // Must have list record ID
         "compliant": false    // True if SKU was recognized in the scene, false otherwise
      },
      // ...
   ]
}


PLANOGRAM_COMPLIANCE​

Provides detailed planogram compliance status and the list of actions required. Aggregated planogram compliance is measured as a fraction of correctly placed faces.

Master data: planogram.

JSON example​

JSON
|
{
   "planogram_id": 13249,     // Planogram ID, see planograms endpoint
   "compliance": 70.4,   // Planogram compliance in %
   "images" : [
      {
         "image_id" : 7877,
         "actions": [              // How to fix the compliance
            {  
               "x": 569,    // Bounding box center x. Not available for the action ADD.
               "y": 312,        // Bounding box center y. Not available for the action ADD.
               "h": 112,    // Bounding box height. Not available for the action ADD.
               "w": 112,    // Bounding box width. Not available for the action ADD.
               "shelf_index":2,         // Shelf ID (top to bottom starting from 0)
               "rack_index": 1,         // Rack ID (left to right starting from 0)
               "product_index": 7,        // Shelf position (left to right starting from 0)
               "sku_id": 77,        // SKU ID as recognized in the image
               "action_type": "ADD", // ADD, DELETE OR REPLACE
               "planogram_sku_id": 76, // Optional. Specified if sku_action=REPLACE
                                                       // SKU ID as found in the planogram
                     // Human-readable prescription. Prescription language depends on instance settings
               "text": "Replace ACME Cola 2000 ml with ACME Orange 2000 ml" 
            }, 
            {"id" :2
            //... 
            },
         ]
      }
      // ...
    ]
}Provides detailed planogram compliance status and the list of actions required. Aggregated planogram compliance is measured as a fraction of correctly placed faces.


PANORAMA​

Provides panoramic images stitched from the images of the scene. Note that it is not guaranteed that the whole scene will be stitched to the single panorama, therefore the report format provides a list of stitched images.

Master data: none.

JSON example​

JSON
|
{
   "rendered": [ // a single image was stitched for this scene
      {
         "id": 156673,
         "url": "https:/test.inspector-cloud.com/media/ c118916f-36b5-4801-8910-c9fc1e575e33.jpg ",
         "width": 7200,
         "height": 12800,
      }
   ]
}




Updated 14 Apr 2022
Did this page help you?
Yes
No
PREVIOUS
Recognition error
NEXT
Brands
Docs powered by archbee 
Request example