Path parameters
-
token reference to desired resource
Query parameters
-
rules based on category
Values are
cleanser
,toner
,serum
,moisturizer
,spf
, orother
. -
time_of_day string
rules based on time of day
Values are
AM
,PM
, orBOTH
. Default value isBOTH
. -
is_living_hot_summer boolean
rules based on is_living_hot_summer
-
is_living_cold_winter boolean
rules based on is_living_cold_winter
-
is_living_dry_climate boolean
rules based on is_living_dry_climate
-
is_living_urban_area boolean
rules based on is_living_urban_area
-
is_constrained_budget boolean
rules based on is_constrained_budget
-
is_constrained_time boolean
rules based on is_constrained_time
-
is_high_sun_exposure boolean
rules based on is_high_sun_exposure
-
is_concerned_parabens boolean
rules based on is_concerned_parabens
Default value is
true
. -
is_concerned_sulfates boolean
rules based on is_concerned_sulfates
Default value is
true
. -
is_concerned_silicones boolean
rules based on is_concerned_silicones
Default value is
true
. -
is_concerned_gluten boolean
rules based on is_concerned_gluten
-
is_condition_acne boolean
rules based on is_condition_acne
-
is_condition_eczema boolean
rules based on is_condition_eczema
-
is_condition_rosacea boolean
rules based on is_condition_rosacea
-
is_condition_dehydration boolean
rules based on is_condition_dehydration
-
rules based on rating_persona_oily
Values are
0
,1
,2
,3
,4
, or5
. -
rules based on rating_persona_sensitive
Values are
0
,1
,2
,3
,4
, or5
. -
rules based on rating_persona_uneven
Values are
0
,1
,2
,3
,4
, or5
. -
rules based on rating_persona_wrinkled
Values are
0
,1
,2
,3
,4
, or5
.
curl \
-X GET https://api.cosmily.com/api/v1/analyze/{token}/rules?category=cleanser&rating_persona_oily=0&rating_persona_sensitive=0&rating_persona_uneven=0&rating_persona_wrinkled=0 \
-H "Authorization: Bearer $ACCESS_TOKEN"
{
"data": {
"bad_ingredients": {
"reason": "string",
"ingredient": {
"id": 42,
"title": "string",
"alias": "string"
},
"explanation": "string"
},
"is_good_for_you": true,
"failed_product_rules": [
{
"explanation": "string",
"identifier": "string",
"label": "string"
}
],
"suggestion": {
"explanations": [
"string"
],
"products": [
{
"id": 42,
"title": "string",
"alias": "string"
}
]
}
}
}
{
"data": {
"bad_ingredients": {
"reason": "string",
"ingredient": {
"id": 42,
"title": "string",
"alias": "string"
},
"explanation": "string"
},
"is_good_for_you": true,
"failed_product_rules": [
{
"explanation": "string",
"identifier": "string",
"label": "string"
}
],
"suggestion": {
"explanations": [
"string"
],
"products": [
{
"id": 42,
"title": "string",
"alias": "string"
}
]
}
}
}
{
"error": "unknown"
}
{
"error": "unknown"
}