POST /:token

POST /ingredient_matchers/{token}.yml

Create ingredient matcher

Body Required

  • category string Required

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

  • time_of_day string

    Values are AM, PM, or BOTH.

Responses

  • 201

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id integer
      • user_id integer
      • analyze_ingredient_list_log_uuid string
      • product_category_id integer
      • matchers array[string]
      • time_of_day string
      • created_at string(DateTime)
  • 500

    Server Error

  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 409

    Conflict occurred

  • 422

    Unprocessable Entity

POST /ingredient_matchers/{token}.yml
curl \
 -X POST https://api.cosmily.com/api/v1/ingredient_matchers/{token}.yml \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"category":"cleanser","time_of_day":"AM"}'
Request example
{
  "category": "cleanser",
  "time_of_day": "AM"
}
Request examples
{
  "category": "cleanser",
  "time_of_day": "AM"
}
Response examples (201)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "analyze_ingredient_list_log_uuid": "string",
    "product_category_id": 42,
    "matchers": [
      "string"
    ],
    "time_of_day": "string",
    "created_at": "string"
  }
}
Response examples (201)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "analyze_ingredient_list_log_uuid": "string",
    "product_category_id": 42,
    "matchers": [
      "string"
    ],
    "time_of_day": "string",
    "created_at": "string"
  }
}