GET /routines/:id/analyze/:token/compatibility
Returns routine step ingredients compatibility with an analyze ingredient list log record
Path parameters
-
ID of the resource to fetch
-
token reference to desired resource
GET /routines/{id}/analyze/{token}/compatibility
curl \
-X GET https://api.cosmily.com/api/v1/routines/{id}/analyze/{token}/compatibility \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
{
"left_product": {
"id": 42,
"title": "string",
"alias": "string",
"routine_step_id": 42,
"product_category_id": 42,
"product_category": {
"id": 42,
"title": "string",
"alias": "string"
},
"product_image": {
"id": 42,
"product_id": 42,
"product_draft_id": 42,
"image": "string",
"url": "string"
},
"brand_id": 42,
"brand": {
"id": 42,
"title": "string",
"alias": "string"
}
},
"right_product": {
"id": 42,
"title": "string",
"alias": "string",
"routine_step_id": 42,
"product_category_id": 42,
"product_category": {
"id": 42,
"title": "string",
"alias": "string"
},
"product_image": {
"id": 42,
"product_id": 42,
"product_draft_id": 42,
"image": "string",
"url": "string"
},
"brand_id": 42,
"brand": {
"id": 42,
"title": "string",
"alias": "string"
}
},
"results": {
"compatible?": true,
"benefit_reasons": [
{
"ingredient_1": "string",
"ingredient_2": "string",
"reason": "string"
}
],
"incompatible_reasons": [
{
"ingredient_1": "string",
"ingredient_2": "string",
"reason": "string"
}
]
}
}
]
Response examples (200)
[
{
"left_product": {
"id": 42,
"title": "string",
"alias": "string",
"routine_step_id": 42,
"product_category_id": 42,
"product_category": {
"id": 42,
"title": "string",
"alias": "string"
},
"product_image": {
"id": 42,
"product_id": 42,
"product_draft_id": 42,
"image": "string",
"url": "string"
},
"brand_id": 42,
"brand": {
"id": 42,
"title": "string",
"alias": "string"
}
},
"right_product": {
"id": 42,
"title": "string",
"alias": "string",
"routine_step_id": 42,
"product_category_id": 42,
"product_category": {
"id": 42,
"title": "string",
"alias": "string"
},
"product_image": {
"id": 42,
"product_id": 42,
"product_draft_id": 42,
"image": "string",
"url": "string"
},
"brand_id": 42,
"brand": {
"id": 42,
"title": "string",
"alias": "string"
}
},
"results": {
"compatible?": true,
"benefit_reasons": [
{
"ingredient_1": "string",
"ingredient_2": "string",
"reason": "string"
}
],
"incompatible_reasons": [
{
"ingredient_1": "string",
"ingredient_2": "string",
"reason": "string"
}
]
}
}
]