GET /analyze/:token/personalize

GET /analyze/{token}/personalize

Runs a personalized ruleset on the ingredient analysis

Path parameters

  • token string(uuid) Required

    token reference to desired resource

application/json

Body Required

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Requested resource not found

  • 422

    Unprocessable Entity

  • 500

    Server Error

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
}
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"
      }
    ]
  }
}