GET /routines/:id/compatibility

GET /routines/{id}/compatibility

Returns a routine step ingredients compatibility

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Responses

GET /routines/{id}/compatibility
curl \
 -X GET https://api.cosmily.com/api/v1/routines/{id}/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"
        }
      ]
    }
  }
]