Skip to main content

Camera Search API

API Endpoint

The default API Endpoint is as follows, and the current latest version is 2023-02.

  • https://api.kr.omnicommerce.ai/2022-08/
  • https://api.kr.omnicommerce.ai/2023-02/

POST /similar-items/search: New Search

Request a new search by uploading an image in url or Base64 format.

Request Header

NameRequiredTypeDescription
X-Api-KeyRequiredStringAPI Key (refer to API Authentication Guide)

Request Body

caution

The product ID is internally treated as a Unique Key and is also used in the form of a URL Path Parameter when calling API. Accordingly, the use of URL Unsafe Characters based on [RFC3986] is restricted. <space> / % < > [ ] { } | \ ^

Name
RequiredTypeDescription
imageRequiredObjectAn object containing information about the image to be retrieved
├ image.typeRequiredStringChoose url or base64 depending on the type of the image
└ image.contentRequiredStringIn the case of image.type is url: URL of the image to be retrieved
In the case of image.type is base64: base64-encoded image file to be retrieved (See: Image Guide)
transactionIdOptionalStringID to identify a request of the previous search. If there is no value, a random value is assigned.
limitOptionalStringMaximum number of items to recommend (default: 10, max: 100)
showInfoOptionalList[String]Select additional information to be displayed along with a recommendation result (multiple selections possible)
[METADATA, IMAGE_INFO, CONTEXT_INFO]
metadataFilterOptionalStringMetadata Filter Query (see: Metadata Filter)

Request Example

When image.type is base64 format

{
"image": {
"type": "base64",
"content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQYV2Poi5b8DwAEfwICWoNPegAAAABJRU5ErkJggg=="
},
"transactionId": "A14425770",
"showInfo" : ["METADATA", "IMAGE_INFO", "CONTEXT_INFO"]
}

When image.type is url

{
"image": {
"type": "url",
"content": "http://imageserver.net/some/image.jpeg"
},
"transactionId": "A14425770",
"showInfo": ["METADATA", "IMAGE_INFO", "CONTEXT_INFO"]
}

When a filter condition exists

{
"image": {
"type": "url",
"content": "http://imageserver.net/some/image.jpeg"
},
"transactionId": "A14425770",
"limit": 100,
"showInfo": ["METADATA", "IMAGE_INFO", "CONTEXT_INFO"],
"metadataFilter" : {
"productName": {
"eq": "skirt"
}
}
}

Response

Name
TypeDescription
transactionIdStringID to identify a request of the previous search.
limitintegerMaximum number of items to recommend
expirationDateStringExpiration date (isoformat, UTC)
showInfoList[String]Selected additional information to be displayed along with a recommendation result
metadataFilterOptionalObject
resultsList[Object]Product information that is detected in the request image with related recommendation results
├ results[].objectObjectInformation about the object detected in the request image
ㅤ├ results[].object.idStringAn ID of the detected object
ㅤ├ results[].object.detectionStringDetection Category information predicted by the model (see [Detection Field])
ㅤ└ results[].object.positionObjectThe information of the center position of the detected product from the request image
ㅤㅤ├ results[].object.position.xNumberThe x-axis coordinate of the center position of the product
ㅤㅤ└ results[].object.position.yNumberThe y-axis coordinate of the center position of the product
└ results[].recommendationList[Recommendation]Recommendation results (see below)
Recommendation
Name
TypeDescription
orderIntegerAn integer number as sorted in order by similarity (zero-based)
idStringUnique ID of the query product to be recommended
similarityScorefloatBetween 0 and 1, the higher the value, the higher the similarity. [This is available in 2023-02 version only.]
metadataObjectVarious product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata)
Null if no value (default)
imageInfoObjectImage information of the recommended product. If there is IMAGE_INFO as the input value of showInfo field in the request, the value will be displayed. Null if no value (default)
├ imageInfo.detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
└ imageInfo.urlStringThe URL of the representative image of the product.
contextInfoObjectContext information of the recommended product. If there is CONTEXT_INFO as the input value of showInfo field, the value will be displayed. Null if no value (default)
├ contextInfo.salesUrlStringURL of the page where the product is being sold
└ contextInfo.mobileSalesUrlStringMobile version URL of the page where the product is being sold

Response Example

400 Bad Request

Invalid Request Format

{
"errors": "json format error."
}

When product recommendations are temporarily unavailable due to the Index is not prepared yet

caution

Index calculation occurs once a day at midnight. If new product information was added to the Workspace, recommendations will become available after a day has passed.

{
"errors": "No product id exists."
}

HTTP Status Code : 200

This response may occur in the following situations:

  1. No products were detected from the image.
  2. The product does not exist.
{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": [
"METADATA",
"IMAGE_INFO",
"CONTEXT_INFO"
],
"results": [],
"metadataFilter" : {"productName": {"eq": "skirt"}}
}

When 3 objects are detected, but no recommendation results are found for all 3 detected objects from the request image

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"showInfo": [
"METADATA",
"IMAGE_INFO",
"CONTEXT_INFO"
],
"metadataFilter" : {"productName": {"eq": "skirt"}},
"expirationDate": "2022-09-20T00:05:23",
"results": [
{
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
},
{
"object": {
"id": "1",
"detection": "BAG",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
},
{
"object": {
"id": "2",
"detection": "SHOES",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
}
]
}

HTTP Status Code : 201

When 3 objects are detected, and there are recommendation results for at least one of the detected objects from the request image

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"showInfo": [
"METADATA",
"IMAGE_INFO",
"CONTEXT_INFO"
],
"expirationDate": "2022-09-20T00:05:23",
"metadataFilter" : {"productName": {"eq": "skirt"}},
"results": [
{
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
},
{
"object": {
"id": "1",
"detection": "BAG",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": [
{
"order": 0,
"id": "66ff313a806eddfe0ffd8276d670131a",
"similarityScore": 0.99,
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"order": 1,
"id": "98deb22e5caf6239fcf7191e09630fa9",
"similarityScore": 0.98,
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",,
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
},
{
"order": 2,
"id": "df8335f51c53addbe3d4eee529eac8fb",
"similarityScore": 0.97,
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "http://imageserverurl/m/example"
}
}
]
},
{
"object": {
"id": "2",
"detection": "SHOES",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
}
]
}


Get search results from the previous result

Instead of uploading a new request image, the search result corresponding to the Transaction ID and Object ID received as a response of [POST /similar-items/search: New Search] can be quickly retrieved due to no need for running an inference job. Unlike a new search, you can receive a quick response and filter the recommended results based on Metadata.

info

Cached search results will expire after a certain period of time. The expiration date can be checked through the expirationDate field of the response value, and if an expired result is requested, 400 Bad Request will be returned.

Get the search results corresponding to Transaction ID and Object ID.

Request Header

NameRequiredTypeDescription
X-Api-KeyRequiredStringAPI Key (refer to API Authentication Guide)

Path Parameter

NameRequiredTypeDescription
transaction idRequiredStringID to identify a request of the previous search, which is received as a response to the New Search API call
object idRequiredStringID to identify a specific object detected by the previous search (results[].id)

Request Parameter

NameRequiredTypeDescription
limitOptionalStringMaximum number of items to recommend (default: 10, max: 500)
showInfoOptionalList[String]Select additional information to be displayed along with a recommendation result (multiple selections possible)
[METADATA, IMAGE_INFO, CONTEXT_INFO]
metadataFilterOptionalObjectMetadata Filter Query (see: Metadata Filter)

Request Example

1. In case of receiving up to 100 recommendation results, including all meta information such as metadata, imageInfo, and contextInfo
GET /similar-items/search/b3057c85-676d-4dec-9b45-d2eec1594df8/0/?limit=100&showInfo=IMAGE_INFO&showInfo=METADATA&showInfo=CONTEXT_INFO
2. In case of only metadata and contextInfo information are included, up to 100 recommendations are received, and a metadata filter condition is that the name of the metadata of each product is skirt
GET /similar-items/search/b3057c85-676d-4dec-9b45-d2eec1594df8/0/?limit=100&showInfo=METADATA&showInfo=CONTEXT_INFO&metadataFilter.name.eq=skirt
3. In the case of requesting recommendations that include only contextInfo information and receive up to 500 recommendation results, a metadata filter condition is that the name of the product is skirt.
GET /similar-items/search/b3057c85-676d-4dec-9b45-d2eec1594df8/0/?limit=500&showInfo=CONTEXT_INFO&metadataFilter.name.eq=skirt

Response

Name
TypeDescription
transactionIdStringID to identify a request of the previous search, which is received as a response to the New Search API call
limitintegerMaximum number of items to recommend
expirationDateStringExpiration date (isoformat, UTC)
showInfoList[String]Selected additional information to be displayed along with a recommendation result
metadataFilterObjectMetadata Filter Query (See: Metadata Filter)
objectObjectInformation about the object detected in the request image
├ object.idStringAn ID of the detected object
├ object.detectionStringDetection Category information predicted by the model (see [Detection Field])
└ object.positionObjectThe information of the center position of the detected product from the request image
ㅤ├ object.position.xNumberThe x-axis coordinate of the center position of the product
ㅤ└ object.position.yNumberThe y-axis coordinate of the center position of the product
recommendationList[Recommendation]Recommendation results (see below)
Recommendation
Name
TypeDescription
orderIntegerAn integer number as sorted in order by similarity (zero-based)
idStringUnique ID of the query product to be recommended
similarityScorefloatBetween 0 and 1, the higher the value, the higher the similarity. [This is available in 2023-02 version only.]
metadataObjectVarious product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata)
Null if no value (default)
imageInfoObjectImage information of the recommended product. If there is IMAGE_INFO as the input value of showInfo field in the request, the value will be displayed. Null if no value (default)
├ imageInfo.detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
└ imageInfo.urlStringThe URL of the representative image of the product.
contextInfoObjectContext information of the recommended product. If there is CONTEXT_INFO as the input value of showInfo field, the value will be displayed. Null if no value (default)
├ contextInfo.salesUrlStringURL of the page where the product is being sold
└ contextInfo.mobileSalesUrlStringMobile version URL of the page where the product is being sold

Example Responses

HTTP Status Code: 400 Bad Request

In case of the result corresponding to the given transaction ID and object ID does not exist or has expired

{
"errors": "Transaction 'b3057c85-676d-4dec-9b45-d2eec1594df8' not exist or expired"
}

HTTP Status Code : 200

When recommendations does not exist

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": ["METADATA","IMAGE_INFO"],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
}

HTTP Status Code : 201

When recommendations exist

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": [],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": [
{
"order": 0,
"id": "AT000123FB",
"similarityScore": 0.99,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 1,
"id": "AT00158AE",
"similarityScore": 0.98,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 2,
"id": "F800158GA",
"similarityScore": 0.97,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 3,
"id": "AF10881GK",
"similarityScore": 0.96,
"metadata": null,
"imageInfo": null,
"contextInfo": null
}
]
}

In case of receiving up to 10 recommendation results, including all meta information such as metadata, imageInfo, and contextInfo

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": ["METADATA","IMAGE_INFO", "CONTEXT_INFO"],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": [
{
"order": 0,
"id": "AT000123FB",
"similarityScore": 0.99,
"metadata": {
"productName": "a",
"originPrice": 100
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
},
{
"order": 1,
"id": "AT00158AE",
"similarityScore": 0.98,
"metadata": {
"productName": "b",
"originPrice": 200
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
},
{
"order": 2,
"id": "F800158GA",
"similarityScore": 0.97,
"metadata": {
"productName": "c",
"originPrice": 300
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": null
}
},
{
"order": 3,
"id": "AF10881GK",
"similarityScore": 0.96,
"metadata": {
"productName": "d",
"originPrice": 400
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": null,
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
}
]
}

POST /similar-items/search/<transaction id>/<object id>: Get search results from the previous result

Get the search results corresponding to Transaction ID and Object ID.

Request Header

NameRequiredTypeDescription
X-Api-KeyRequiredStringAPI Key (refer to API Authentication Guide)
Content-TypeRequiredStringContent Type. Only Application/json is supported.

Path Parameter

NameRequiredTypeDescription
transaction idRequiredStringID to identify a request of the previous search, which is received as a response to the New Search API call
object idRequiredStringID to identify a specific object detected by the previous search (results[].id)

Request Body

NameRequiredTypeDescription
limitOptionalStringMaximum number of items to recommend (default: 10, max: 500)
showInfoOptionalList[String]Select additional information to be displayed along with a recommendation result (multiple selections possible)
[METADATA, IMAGE_INFO, CONTEXT_INFO]
metadataFilterOptionalObjectMetadata Filter Query (see: Metadata Filter)

Request Example

In case of receiving up to 100 recommendation results, including all meta information such as metadata, imageInfo, and contextInfo
POST /similar-items/search/b3057c85-676d-4dec-9b45-d2eec1594df8/0
{
"limit": 100,
"showInfo": ["METADATA", "IMAGE_INFO", "CONTEXT_INFO"],
}
In case of only metadata and contextInfo information are included, up to 100 recommendations are received, and a metadata filter condition is that the name of the metadata of each product is skirt
POST /similar-items/search/b3057c85-676d-4dec-9b45-d2eec1594df8/0
{
"limit": 100,
"showInfo": ["METADATA", "CONTEXT_INFO"],
"metadataFilter" : {
"productName": {
"eq": "skirt"
}
}
}

Response

Name
TypeDescription
transactionIdStringID to identify a request of the previous search, which is received as a response to the New Search API call
limitintegerMaximum number of items to recommend
expirationDateStringExpiration date (isoformat, UTC)
showInfoList[String]Selected additional information to be displayed along with a recommendation result
metadataFilterObjectMetadata Filter Query (See: Metadata Filter)
objectObjectInformation about the object detected in the request image
├ object.idStringAn ID of the detected object
├ object.detectionStringDetection Category information predicted by the model (see [Detection Field])
└ object.positionObjectThe information of the center position of the detected product from the request image
ㅤ├ object.position.xNumberThe x-axis coordinate of the center position of the product
ㅤ└ object.position.yNumberThe y-axis coordinate of the center position of the product
recommendationList[Recommendation]Recommendation results (see below)
Recommendation
Name
TypeDescription
orderIntegerAn integer number as sorted in order by similarity (zero-based)
idStringUnique ID of the query product to be recommended
similarityScorefloatBetween 0 and 1, the higher the value, the higher the similarity. [This is available in 2023-02 version only.]
metadataObjectVarious product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata)
Null if no value (default)
imageInfoObjectImage information of the recommended product. If there is IMAGE_INFO as the input value of showInfo field in the request, the value will be displayed. Null if no value (default)
├ imageInfo.detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
└ imageInfo.urlStringThe URL of the representative image of the product.
contextInfoObjectContext information of the recommended product. If there is CONTEXT_INFO as the input value of showInfo field, the value will be displayed. Null if no value (default)
├ contextInfo.salesUrlStringURL of the page where the product is being sold
└ contextInfo.mobileSalesUrlStringMobile version URL of the page where the product is being sold

Example Responses

HTTP Status Code: 400 Bad Request

In case of the result corresponding to the given transaction ID and object ID does not exist or has expired

{
"errors": "Transaction 'b3057c85-676d-4dec-9b45-d2eec1594df8' not exist or expired"
}

HTTP Status Code : 200

When recommendations does not exist

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"showInfo": ["METADATA","IMAGE_INFO"],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": []
}

HTTP Status Code : 201

When recommendations exist

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": [],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},



"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": [
{
"order": 0,
"id": "AT000123FB",
"similarityScore": 0.99,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 1,
"id": "AT00158AE",
"similarityScore": 0.98,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 2,
"id": "F800158GA",
"similarityScore": 0.97,
"metadata": null,
"imageInfo": null,
"contextInfo": null
},
{
"order": 3,
"id": "AF10881GK",
"similarityScore": 0.96,
"metadata": null,
"imageInfo": null,
"contextInfo": null
}
]
}

In case of receiving up to 10 recommendation results, including all meta information such as metadata, imageInfo, and contextInfo

Click to Expand

{
"transactionId": "b3057c85-676d-4dec-9b45-d2eec1594df8",
"limit": 10,
"expirationDate": "2022-09-20T00:05:23",
"showInfo": ["METADATA","IMAGE_INFO", "CONTEXT_INFO"],
"metadataFilter": {
"productName": {
"eq": "skirt"
}
},
"object": {
"id": "0",
"detection": "TOP",
"position": {
"x": 0.36875,
"y": 0.46640627500000004
}
},
"recommendation": [
{
"order": 0,
"id": "AT000123FB",
"similarityScore": 0.99,
"metadata": {
"productName": "a",
"originPrice": 100
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
},
{
"order": 1,
"id": "AT00158AE",
"similarityScore": 0.98,
"metadata": {
"productName": "b",
"originPrice": 200
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
},
{
"order": 2,
"id": "F800158GA",
"similarityScore": 0.97,
"metadata": {
"productName": "c",
"originPrice": 300
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "http://imageserverurl/some.image.jpg",
"mobileSalesUrl": null
}
},
{
"order": 3,
"id": "AF10881GK",
"similarityScore": 0.96,
"metadata": {
"productName": "d",
"originPrice": 400
},
"imageInfo": {
"detection": "TOP",
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": null,
"mobileSalesUrl": "http://imageserverurl/some.image.jpg"
}
}
]
}