PATCH /routines/:id/update_routine_step_order

PATCH /routines/{id}/update_routine_step_order

Update routine step order

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

application/json

Body Required

Responses

PATCH /routines/{id}/update_routine_step_order
curl \
 -X PATCH https://api.cosmily.com/api/v1/routines/{id}/update_routine_step_order \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"routine_step_order":[42]}'
Request example
{
  "routine_step_order": [
    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"
      }
    ]
  }
}