Skip to main content

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

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

Request Parameter

caution

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.

NameRequiredTypeDescription
limitOptionalStringMaximum number of sets of outfits to recommend (default: 3, max: 10)
showInfoOptionalList[String]Select additional information to be displayed along with a recommendation result (multiple selections possible)
[METADATA, IMAGE_INFO, CONTEXT_INFO]
genderOptionalStringGender information to filter among styling recommendation results (choose one of the items below)
[MALE, FEMALE, UNISEX]

Request Example

/styling-recommend/A1101?limit=500&showInfo=IMAGE_INFO&showInfo=METADATA&showInfo=CONTEXT_INFO&gender=FEMALE

Response

Name
TypeDescription
idStringUnique ID of the query product to be recommended
limitintegerMaximum number of sets of outfits to recommend (1 ~ 10)
genderStringGender information to filter among styling recommendation results (choose one of the items below)
[MALE, FEMALE, UNISEX]
showInfoList[String]Selected additional information to be displayed along with a recommendation result
resultsList[Object]Results of styling recommendation
├ results[].orderintegerAn integer number as sorted in order by similarity (zero-based)
└ results[].recommendationList[Recommendation]Recommendation results (see below)
Recommendation
Name
TypeDescription
idStringUnique ID of the query product to be recommended
detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
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.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

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

The following situations can lead to this response:

  1. No products were recommended.
  2. The product does not exist.
  3. Recommendation was requested for a product that was newly registered on the same day.
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.

{
"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

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

Request Body

caution

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.

NameRequiredTypeDescription
limitOptionalStringMaximum number of sets of outfits to recommend (default: 3, max: 10)
showInfoOptionalList[String]Select additional information to be displayed along with a recommendation result (multiple selections possible)
[METADATA, IMAGE_INFO, CONTEXT_INFO]
genderOptionalStringGender 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
TypeDescription
idStringUnique ID of the query product to be recommended
limitintegerMaximum number of sets of outfits to recommend (1 ~ 10)
genderStringGender information to filter among styling recommendation results (choose one of the items below)
[MALE, FEMALE, UNISEX]
showInfoList[String]Selected additional information to be displayed along with a recommendation result
resultsList[Object]Results of styling recommendation
├ results[].orderintegerAn integer number as sorted in order by similarity (zero-based)
└ results[].recommendationList[Recommendation]Recommendation results (see below)
Recommendation
Name
TypeDescription
idStringUnique ID of the query product to be recommended
detectionStringThe detection field which is provided by the client when the product information was put into the workspace. (see Detection Field)
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.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

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."
}

When style recommendation does not exist

HTTP Status Code : 200

The following situations can lead to this response:

  1. No products were recommended.
  2. The product does not exist.
  3. Recommendation was requested for a product that was newly registered on the same day.
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.

{
"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",

}
}
]
}
]
}