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

Body Required

Responses

  • successful operation

    Hide response attribute Show response attribute object
    • Hide failing_rules attributes Show failing_rules attributes object
  • Bad Request

  • Authorization information is missing or invalid.

  • Requested resource not found

  • Unprocessable Entity

  • 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
}
Request examples
{
  "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"
      }
    ]
  }
}
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"
      }
    ]
  }
}