GET /analyze/:token/categorize

GET /analyze/{token}/categorize

Infers the product category of an ingredient analysis

Path parameters

  • token string(uuid) Required

    token reference to desired resource

Responses

  • successful operation

    Hide response attribute Show response attribute object
    • category string

      Values are cleanser, toner, serum, moisturizer, or spf.

  • Bad Request

  • Authorization information is missing or invalid.

  • Ingredient List Analysis Not Found

  • Failed to infer product category

    Hide response attribute Show response attribute object
  • Server Error

GET /analyze/{token}/categorize
curl \
 -X GET https://api.cosmily.com/api/v1/analyze/{token}/categorize \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "category": "cleanser"
}
Response examples (200)
{
  "category": "cleanser"
}
Response examples (422)
{
  "error": "unknown"
}
Response examples (422)
{
  "error": "unknown"
}