PATCH /routines/:id/update

PATCH /routines/{id}/update

Update routine

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Body Required

Responses

PATCH /routines/{id}/update
curl \
 -X PATCH https://api.cosmily.com/api/v1/routines/{id}/update \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"title":"string"}'
Request example
{
  "title": "string"
}
Request examples
{
  "title": "string"
}
Response examples (201)
{
  "data": {
    "id": 1,
    "user_id": 1,
    "routine_type": "AM",
    "routine_steps": [
      {
        "id": 1,
        "routine_id": 1,
        "product_id": 1,
        "product_tutorial_id": 1,
        "product_category_id": 1,
        "product_pitch_id": 1,
        "status": "published",
        "created_at": "2021-10-04T13:24:22.000Z",
        "updated_at": "2021-11-13T20:23:18.000Z"
      }
    ],
    "title": "Daily Routine",
    "status": "published",
    "created_at": "2021-10-04T13:24:22.000Z",
    "updated_at": "2021-11-13T20:23:18.000Z"
  }
}
Response examples (201)
{
  "data": {
    "id": 1,
    "title": "Daily Routine",
    "status": "published",
    "user_id": 1,
    "created_at": "2021-10-04T13:24:22.000Z",
    "updated_at": "2021-11-13T20:23:18.000Z",
    "routine_type": "AM",
    "routine_steps": [
      {
        "id": 1,
        "status": "published",
        "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,
        "product_category_id": 1,
        "product_tutorial_id": 1
      }
    ]
  }
}