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

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • category string

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

  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Ingredient List Analysis Not Found

  • 422

    Failed to infer product category

    Hide response attribute Show response attribute object
  • 500

    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 (422)
{
  "error": "unknown"
}