GET /routines

GET /routines

Return all routines

Query parameters

  • page integer

    requested page number

    Minimum value is 1. Default value is 1.

  • page_size integer

    requested page size

    Minimum value is 1, maximum value is 100. Default value is 12.

  • routine_type array[string]

    Search by Routine Types

    Values are AM, PM, or BOTH. Default value is All Routine Types.

  • user_type array[string]

    Search by User Types

    Values are expert or enthusiast. Default value is All User Types.

  • Order by condition

    Value is weekly_top. Default value is newest.

Responses

GET /routines
curl \
 -X GET https://api.cosmily.com/api/v1/routines \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "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"
      },
      "user": {
        "id": 42,
        "username": "string",
        "user_type": "string",
        "last_active": "string"
      }
    }
  ],
  "links": {
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}
Response examples (200)
{
  "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"
      },
      "user": {
        "id": 42,
        "username": "string",
        "user_type": "string",
        "last_active": "string"
      }
    }
  ],
  "links": {
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}