GET /routines/:id/routine_steps

GET /routines/{id}/routine_steps

Returns routine steps

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • data array[object]
      Hide data attributes Show data attributes array[object]
      • id integer
      • routine_id integer
      • product_id integer
      • product_tutorial_id integer
      • product_category_id integer
      • product_pitch_id integer
      • status string
      • created_at string(DateTime)
      • updated_at string(DateTime)
      • product_pitch object
        Hide product_pitch attributes Show product_pitch attributes object
        • id integer(int32)
        • product_id integer
        • user_id integer
        • effects array[object]
          Hide effects attributes Show effects attributes array[object]
          • effect string
          • ingredient_ids array[integer]
        • preferred_ingredients array[object]
          Hide preferred_ingredients attributes Show preferred_ingredients attributes array[object]
          • effects array[string]
          • ingredient_id integer
        • affiliate_url string
        • coupon_code string
        • created_at string(DateTime)
        • updated_at string(DateTime)
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Requested resource not found

  • 500

    Server Error

GET /routines/{id}/routine_steps
curl \
 -X GET https://api.cosmily.com/api/v1/routines/{id}/routine_steps \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": [
    {
      "id": 1,
      "routine_id": 1,
      "product_id": 1,
      "product_tutorial_id": 1,
      "product_category_id": 1,
      "product_pitch": {
        "id": 1,
        "product_id": 1,
        "user_id": 1,
        "effects": [
          {
            "effect": "effect",
            "ingredient_ids": "[1,2]"
          }
        ],
        "affiliate_url": "http://some.url.com",
        "coupon_code": "new_coupon_code",
        "created_at": "2021-10-04T13:24:22.000Z",
        "updated_at": "2021-11-13T20:23:18.000Z"
      },
      "status": "completed",
      "created_at": "2021-10-04T13:24:22.000Z",
      "updated_at": "2021-11-13T20:23:18.000Z"
    }
  ]
}
Response examples (200)
{
  "data": [
    {
      "id": 1,
      "status": "completed",
      "created_at": "2021-10-04T13:24:22.000Z",
      "product_id": 1,
      "routine_id": 1,
      "updated_at": "2021-11-13T20:23:18.000Z",
      "product_pitch": {
        "id": 1,
        "effects": [
          {
            "effect": "effect",
            "ingredient_ids": "[1,2]"
          }
        ],
        "user_id": 1,
        "created_at": "2021-10-04T13:24:22.000Z",
        "product_id": 1,
        "updated_at": "2021-11-13T20:23:18.000Z",
        "coupon_code": "new_coupon_code",
        "affiliate_url": "http://some.url.com"
      },
      "product_category_id": 1,
      "product_tutorial_id": 1
    }
  ]
}