GET /analyze/:token/rules

GET /analyze/{token}/rules

Get product fit results

Path parameters

  • token string(uuid) Required

    token reference to desired resource

Query parameters

Responses

GET /analyze/{token}/rules
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"
Response examples (200)
{
  "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"
        }
      ]
    }
  }
}
Response examples (200)
{
  "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"
        }
      ]
    }
  }
}
Response examples (422)
{
  "error": "unknown"
}
Response examples (422)
{
  "error": "unknown"
}