PATCH /routines/:id/add_routine_step

PATCH /routines/{id}/add_routine_step

Add routine step to routine.

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Body Required

Responses

PATCH /routines/{id}/add_routine_step
curl \
 -X PATCH https://api.cosmily.com/api/v1/routines/{id}/add_routine_step \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"product_id":42}'
Request example
{
  "product_id": 42
}
Request examples
{
  "product_id": 42
}
Response examples (201)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "title": "string",
    "routine_type": "string",
    "status": "string",
    "created_at": "string",
    "updated_at": "string",
    "routine_step_ids": [
      42
    ],
    "routine_step_order": [
      42
    ],
    "favorite_count": 42,
    "routine_steps": [
      {
        "id": 42,
        "routine_id": 42,
        "product_id": 42,
        "product_tutorial_id": 42,
        "product_category_id": 42,
        "product_pitch_id": 42,
        "status": "string",
        "created_at": "string",
        "updated_at": "string"
      }
    ]
  }
}
Response examples (201)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "title": "string",
    "routine_type": "string",
    "status": "string",
    "created_at": "string",
    "updated_at": "string",
    "routine_step_ids": [
      42
    ],
    "routine_step_order": [
      42
    ],
    "favorite_count": 42,
    "routine_steps": [
      {
        "id": 42,
        "routine_id": 42,
        "product_id": 42,
        "product_tutorial_id": 42,
        "product_category_id": 42,
        "product_pitch_id": 42,
        "status": "string",
        "created_at": "string",
        "updated_at": "string"
      }
    ]
  }
}