API
Image Recognition API

Reports

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



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
Request
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 report details by ID.

GET /reports/{report_id}
GET
Request
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.







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
Request
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






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


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


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


PRICE_TAGS

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

Master data: none.

JSON example

JSON


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


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


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




Updated 03 Mar 2023
Did this page help you?