GET /analyze/:token/personalize
Runs a personalized ruleset on the ingredient analysis
Path parameters
-
token reference to desired resource
Body Required
-
Values are
cleanser
,toner
,serum
,moisturizer
, orspf
. -
timeslot string
Values are
AM
,PM
, orBOTH
. Default value isBOTH
. -
am_routine_id integer
-
pm_routine_id integer
GET /analyze/{token}/personalize
curl \
-X GET https://api.cosmily.com/api/v1/analyze/{token}/personalize \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"category":"cleanser","timeslot":"BOTH","am_routine_id":42,"pm_routine_id":42}'
Request example
{
"category": "cleanser",
"timeslot": "BOTH",
"am_routine_id": 42,
"pm_routine_id": 42
}
Request examples
{
"category": "cleanser",
"timeslot": "BOTH",
"am_routine_id": 42,
"pm_routine_id": 42
}
Response examples (200)
{
"failing_rules": {
"preference": [
{
"rule": [
"string"
],
"message": "string"
}
],
"safety": [
{
"rule": [
"string"
],
"message": "string"
}
],
"product": [
{
"rule": [
"string"
],
"message": "string"
}
],
"routine": [
{
"rule": [
"string"
],
"message": "string"
}
]
}
}
Response examples (200)
{
"failing_rules": {
"preference": [
{
"rule": [
"string"
],
"message": "string"
}
],
"safety": [
{
"rule": [
"string"
],
"message": "string"
}
],
"product": [
{
"rule": [
"string"
],
"message": "string"
}
],
"routine": [
{
"rule": [
"string"
],
"message": "string"
}
]
}
}