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

  • category string Required

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

  • timeslot string

    Values are AM, PM, or BOTH. Default value is BOTH.

  • am_routine_id integer
  • pm_routine_id integer

Responses

  • 401

    Authorization information is missing or invalid.

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • failing_rules object
      Hide failing_rules attributes Show failing_rules attributes object
      • preference array[object]
        Hide preference attributes Show preference attributes array[object]
        • rule array[string]
        • message string
      • safety array[object]
        Hide safety attributes Show safety attributes array[object]
        • rule array[string]
        • message string
      • product array[object]
        Hide product attributes Show product attributes array[object]
        • rule array[string]
        • message string
      • routine array[object]
        Hide routine attributes Show routine attributes array[object]
        • rule array[string]
        • message string
  • 404

    Requested resource not found

  • 422

    Unprocessable Entity

  • 400

    Bad Request

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