POST /analyze/effects

POST /analyze/effects

Returns the positive, harmful, and notable effects for the submitted list of ingredients

Body Required

  • ingredient_ids array[integer] Required

Responses

  • 200

    successful operation

    Hide response attributes Show response attributes object
    • effects object
      Hide effects attributes Show effects attributes object
      • positive array[object]
        Hide positive attributes Show positive attributes array[object]
        • effect string
        • ingredient_ids array[integer]
      • harmful array[object]
        Hide harmful attributes Show harmful attributes array[object]
        • effect string
        • ingredient_ids array[integer]
      • notable array[object]
        Hide notable attributes Show notable attributes array[object]
        • effect string
        • ingredient_ids array[integer]
    • supported object
      Hide supported attributes Show supported attributes object
      • positive array
      • harmful array
      • notable array
  • 500

    Server Error

  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Requested resource not found

  • 422

    Unprocessable Entity

POST /analyze/effects
curl \
 -X POST https://api.cosmily.com/api/v1/analyze/effects \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"ingredient_ids":[42]}'
Request example
{
  "ingredient_ids": [
    42
  ]
}
Request examples
{
  "ingredient_ids": [
    42
  ]
}
Response examples (200)
{
  "effects": {
    "positive": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "harmful": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "notable": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ]
  },
  "supported": {
    "positive": [],
    "harmful": [],
    "notable": []
  }
}
Response examples (200)
{
  "effects": {
    "positive": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "harmful": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "notable": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ]
  },
  "supported": {
    "positive": [],
    "harmful": [],
    "notable": []
  }
}