GET /my/compatibility/product/:id_or_alias

GET /my/compatibility/product/{id_or_alias}

Returns the logged in user's compatibility report for the requested product

Path parameters

Responses

GET /my/compatibility/product/{id_or_alias}
curl \
 -X GET https://api.cosmily.com/api/v1/my/compatibility/product/{id_or_alias} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "ingredient_counts": {
    "liked": 42,
    "disliked": 42
  },
  "effect_counts": {
    "positive": 42,
    "harmful": 42,
    "notable": 42
  },
  "ingredients": {
    "liked": [
      {
        "id": 42,
        "title": "string",
        "alias": "string"
      }
    ],
    "disliked": [
      {
        "id": 42,
        "title": "string",
        "alias": "string"
      }
    ]
  },
  "effects": {
    "positive": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "harmful": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "notable": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ]
  }
}
Response examples (200)
{
  "ingredient_counts": {
    "liked": 42,
    "disliked": 42
  },
  "effect_counts": {
    "positive": 42,
    "harmful": 42,
    "notable": 42
  },
  "ingredients": {
    "liked": [
      {
        "id": 42,
        "title": "string",
        "alias": "string"
      }
    ],
    "disliked": [
      {
        "id": 42,
        "title": "string",
        "alias": "string"
      }
    ]
  },
  "effects": {
    "positive": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "harmful": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "notable": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ]
  }
}