Planogram Compliance - Match
Run the planogram matching operation against a planogram and a product understanding result.
POST /planogramcompliance:match?api-version=2023-04-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api-version
|
query | True |
string |
Requested API version. |
Request Body
Media Types: "application/json-patch+json"
Name | Required | Type | Description |
---|---|---|---|
detectedProducts | True |
Results from the product understanding operation. |
|
planogram | True |
Describes the planogram for planogram matching operations. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
Error Headers x-ms-error-code: string |
Examples
PlanogramCompliance_Match
Sample request
POST /planogramcompliance:match?api-version=2023-04-01-preview
{
"detectedProducts": {
"imageMetadata": {
"width": 660,
"height": 495
},
"products": [
{
"id": "1",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "class1",
"confidence": 0.92431640625
}
]
}
],
"gaps": [
{
"id": "1",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "gap",
"confidence": 0.92431640625
}
]
}
]
},
"planogram": {
"width": 10,
"height": 16,
"products": [
{
"id": "1",
"name": "product-1",
"w": 8,
"h": 25
}
],
"fixtures": [
{
"id": "1",
"w": 20,
"h": 4,
"x": 0,
"y": 0
}
],
"positions": [
{
"id": "1",
"productId": "1",
"fixtureId": "1",
"x": 0,
"y": 0
}
]
}
}
Sample response
{
"matchingResultPerPosition": [
{
"positionId": "0",
"detectedObject": {
"id": "0",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "class1",
"confidence": 0.92431640625
}
]
}
}
]
}
Definitions
Name | Description |
---|---|
Bounding |
A bounding box for an area inside an image. |
Detected |
Describes a detected object in an image. |
Error |
Response returned when an error occurs. |
Error |
Error info. |
Error |
Detailed error. |
Fixture |
Describes a fixture in a planogram. |
Image |
The image metadata information such as height and width. |
Planogram |
Describes the planogram for planogram matching operations. |
Planogram |
Input to pass into the planogram matching operation. |
Planogram |
Results from the planogram matching operation. |
Position |
Describes a product position in a planogram. |
Position |
Paired planogram position ID and corresponding detected object from product understanding result. |
Product |
Describes a product in the planogram. |
Product |
Results from the product understanding operation. |
Tag |
An entity observation in the image, along with the confidence score. |
BoundingBox
A bounding box for an area inside an image.
Name | Type | Description |
---|---|---|
h |
integer |
Height measured from the top-left point of the area, in pixels. |
w |
integer |
Width measured from the top-left point of the area, in pixels. |
x |
integer |
Left-coordinate of the top left point of the area, in pixels. |
y |
integer |
Top-coordinate of the top left point of the area, in pixels. |
DetectedObject
Describes a detected object in an image.
Name | Type | Description |
---|---|---|
boundingBox |
A bounding box for an area inside an image. |
|
id |
string |
Id of the detected object. |
tags |
Tag[] |
Classification confidences of the detected object. |
ErrorResponse
Response returned when an error occurs.
Name | Type | Description |
---|---|---|
error |
Error info. |
ErrorResponseDetails
Error info.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
List of detailed errors. |
|
innererror |
Detailed error. |
|
message |
string |
Error message. |
target |
string |
Target of the error. |
ErrorResponseInnerError
Detailed error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
innererror |
Detailed error. |
|
message |
string |
Error message. |
FixtureApiModel
Describes a fixture in a planogram.
Name | Type | Description |
---|---|---|
h |
number |
Height of the fixture. |
id |
string |
Id of the fixture. |
w |
number |
Width of the fixture. |
x |
number |
Left offset from the origin, in unit of in inches or centimeters. |
y |
number |
Top offset from the origin, in unit of in inches or centimeters. |
ImageMetadataApiModel
The image metadata information such as height and width.
Name | Type | Description |
---|---|---|
height |
integer |
The height of the image in pixels. |
width |
integer |
The width of the image in pixels. |
PlanogramApiModel
Describes the planogram for planogram matching operations.
Name | Type | Description |
---|---|---|
fixtures |
List of fixtures in the planogram. |
|
height |
number |
Height of the planogram. |
positions |
List of positions in the planogram. |
|
products |
List of products in the planogram. |
|
width |
number |
Width of the planogram. |
PlanogramMatchingRequestApiModel
Input to pass into the planogram matching operation.
Name | Type | Description |
---|---|---|
detectedProducts |
Results from the product understanding operation. |
|
planogram |
Describes the planogram for planogram matching operations. |
PlanogramMatchingResultApiModel
Results from the planogram matching operation.
Name | Type | Description |
---|---|---|
matchingResultPerPosition |
The matched detected object information for each planogram position. |
PositionApiModel
Describes a product position in a planogram.
Name | Type | Description |
---|---|---|
fixtureId |
string |
Id of the fixture that the product is on. |
id |
string |
Id of the position. |
productId |
string |
Id of the product. |
x |
number |
Left offset from the origin, in unit of in inches or centimeters. |
y |
number |
Top offset from the origin, in unit of in inches or centimeters. |
PositionMatchingResultApiModel
Paired planogram position ID and corresponding detected object from product understanding result.
Name | Type | Description |
---|---|---|
detectedObject |
Describes a detected object in an image. |
|
positionId |
string |
The position ID from the planogram matched to the corresponding detected object. |
ProductApiModel
Describes a product in the planogram.
Name | Type | Description |
---|---|---|
h |
number |
Height of the fixture. |
id |
string |
Id of the product. |
name |
string |
Name of the product. |
w |
number |
Width of the product. |
ProductRecognitionResultApiModel
Results from the product understanding operation.
Name | Type | Description |
---|---|---|
gaps |
Gaps detected in the image. |
|
imageMetadata |
The image metadata information such as height and width. |
|
products |
Products detected in the image. |
Tag
An entity observation in the image, along with the confidence score.
Name | Type | Description |
---|---|---|
confidence |
number |
The level of confidence that the entity was observed. |
name |
string |
Name of the entity. |