Styling Recommendation API
API Endpoint
The default API Endpoint is as follows, and the current latest version is 2022-08
.
https://api.kr.omnicommerce.ai/2022-08/
Styling Recommendation API
GET /styling-recommend/<product id>: Recommend products that match the product ID
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Api-Key | Required | String | API Key (refer to API Authentication Guide) |
Request Parameter
For better quality recommendation results, it is recommended to enter the gender parameters. If gender information is not entered, products are recommended regardless of gender information.
Name | Required | Type | Description |
---|---|---|---|
limit | Optional | String | Maximum number of sets of outfits to recommend (default: 3, max: 10) |
showInfo | Optional | List[String] | Select additional information to be displayed along with a recommendation result (multiple selections possible) [METADATA, IMAGE_INFO, CONTEXT_INFO] |
gender | Optional | String | Gender information to filter among styling recommendation results (choose one of the items below) [MALE, FEMALE, UNISEX] |
Request Example
Response
Name | Type | Description |
---|---|---|
id | String | Unique ID of the query product to be recommended |
limit | integer | Maximum number of sets of outfits to recommend (1 ~ 10) |
gender | String | Gender information to filter among styling recommendation results (choose one of the items below) [MALE, FEMALE, UNISEX] |
showInfo | List[String] | Selected additional information to be displayed along with a recommendation result |
results | List[Object] | Results of styling recommendation |
├ results[].order | integer | An integer number as sorted in order by similarity (zero-based) |
└ results[].recommendation | List[Recommendation] | Recommendation results (see below) |
Recommendation
Name | Type | Description |
---|---|---|
id | String | Unique ID of the query product to be recommended |
detection | String | The detection field which is provided by the client when the product information was put into the workspace. (see Detection Field) |
metadata | Object | Various product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata) Null if no value (default) |
imageInfo | Object | Image 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.url | String | The URL of the representative image of the product. |
contextInfo | Object | Context 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.salesUrl | String | URL of the page where the product is being sold |
└ contextInfo.mobileSalesUrl | String | Mobile version URL of the page where the product is being sold |
Example Responses
400 Bad Request
Invalid request format
{
"errors": "json format error."
}
When product recommendations are temporarily unavailable due to the Index is not prepared yet
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
The following situations can lead to this response:
- No products were recommended.
- The product does not exist.
- Recommendation was requested for a product that was newly registered on the same day.
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.
{
"id": "AT000123FB",
"limit": 10,
"showInfo": ["METADATA","IMAGE_INFO"],
"gener": "MALE",
"results": []
}
HTTP Status Code : 201
When style recommendation exists
{
"id": "queryproduct""limit": 3,
"gender": "MALE",
"showInfo": [
"METADATA",
"IMAGE_INFO",
"CONTEXT_INFO"
],
"results": [
{
"order": 0,
"recommendation": [
{
"detection": "TOP",
"id": "a1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "PANTS",
"id": "b1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "BAG",
"id": "c1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
}
]
},
{
"order": 1,
"recommendation": [
{
"detection": "BAG",
"id": "a2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "BAG",
"id": "b2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "BAG",
"id": "c2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"order": 2,
"recommendation": [
{
"detection": "BAG",
"id": "a3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "TOP",
"id": "b3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "TOP",
"id": "c3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
}
]
}
]
}
POST /styling-recommend/<product id>: Recommend products that match the product ID
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Api-Key | Required | String | API Key (refer to API Authentication Guide) |
Content-Type | Required | String | Content Type. Only Application/json is supported. |
Request Body
For better quality recommendation results, it is recommended to enter the gender parameters. If gender information is not entered, products are recommended regardless of gender information.
Name | Required | Type | Description |
---|---|---|---|
limit | Optional | String | Maximum number of sets of outfits to recommend (default: 3, max: 10) |
showInfo | Optional | List[String] | Select additional information to be displayed along with a recommendation result (multiple selections possible) [METADATA, IMAGE_INFO, CONTEXT_INFO] |
gender | Optional | String | Gender information to filter among styling recommendation results (choose one of the items below) [MALE, FEMALE, UNISEX] |
Request Example
#### Request Example
```json{
"id": "AT000123FB",
"limit": 500,
"gender": "UNISEX"
"showInfo": ["METADATA", "IMAGE_INFO", "CONTEXT_INFO"],
}
Response
Name | Type | Description |
---|---|---|
id | String | Unique ID of the query product to be recommended |
limit | integer | Maximum number of sets of outfits to recommend (1 ~ 10) |
gender | String | Gender information to filter among styling recommendation results (choose one of the items below) [MALE, FEMALE, UNISEX] |
showInfo | List[String] | Selected additional information to be displayed along with a recommendation result |
results | List[Object] | Results of styling recommendation |
├ results[].order | integer | An integer number as sorted in order by similarity (zero-based) |
└ results[].recommendation | List[Recommendation] | Recommendation results (see below) |
Recommendation
Name | Type | Description |
---|---|---|
id | String | Unique ID of the query product to be recommended |
detection | String | The detection field which is provided by the client when the product information was put into the workspace. (see Detection Field) |
metadata | Object | Various product information managed by the customer, such as product name, brand, price, season, and discount rate. (see Product metadata) Null if no value (default) |
imageInfo | Object | Image 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.url | String | The URL of the representative image of the product. |
contextInfo | Object | Context 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.salesUrl | String | URL of the page where the product is being sold |
└ contextInfo.mobileSalesUrl | String | Mobile version URL of the page where the product is being sold |
Example Responses
400 Bad Request
Invalid request format
{
"errors": "json format error."
}
When product recommendations are temporarily unavailable due to the Index is not prepared yet
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."
}
When style recommendation does not exist
HTTP Status Code : 200
The following situations can lead to this response:
- No products were recommended.
- The product does not exist.
- Recommendation was requested for a product that was newly registered on the same day.
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.
{
"id": "AT000123FB",
"limit": 10,
"showInfo": ["METADATA","IMAGE_INFO"],
"gener": "MALE",
"results": []
}
HTTP Status Code : 201
When style recommendation exists**
{
"id": "queryproduct""limit": 3,
"gender": "UNISEX",
"showInfo": [
"METADATA",
"IMAGE_INFO",
"CONTEXT_INFO"
],
"results": [
{
"order": 0,
"recommendation": [
{
"detection": "TOP",
"id": "a1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "PANTS",
"id": "b1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "BAG",
"id": "c1",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "https://www.example.com/p/example",
}
}
]
},
{
"order": 1,
"recommendation": [
{
"detection": "TOP",
"id": "a2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "PANTS",
"id": "b2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "TOP",
"id": "c2",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"order": 2,
"recommendation": [
{
"detection": "TOP",
"id": "a3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "PANTS",
"id": "b3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
},
{
"detection": "BAG",
"id": "c3",
"metadata": {
"name": "d",
"price": 400
},
"imageInfo": {
"url": "http://imageserverurl/some.image.jpg"
},
"contextInfo": {
"salesUrl": "https://www.example.com/p/example",
,
"mobileSalesUrl": "https://www.example.com/p/example",
}
}
]
}
]
}