GET /products/:id_or_alias/effects

GET /products/{id_or_alias}/effects

Returns the positive, harmful, and notable effects of a single product

Path parameters

  • id_or_alias string Required

    ID of the resource to return

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute 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]
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Product not found

  • 500

    Server Error

GET /products/{id_or_alias}/effects
curl \
 -X GET https://api.cosmily.com/api/v1/products/{id_or_alias}/effects \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "effects": {
    "positive": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "harmful": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "notable": [
      {
        "effect": "string",
        "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
        ]
      }
    ]
  }
}