Skip to main content
レッスン更新
PATCH

Authorizations

Authorization
string
header
required

APIキーをBearerトークンとして指定

Path Parameters

site_id
string
required

会員サイトID

course_id
string
required

コースID

lesson_id
string
required

レッスンID

Body

application/json

指定したフィールドのみ更新する部分更新。null を指定できる項目は null で値をクリアします

name
string

レッスン名

Maximum string length: 255
lesson_group_id
string

レッスングループID。変更すると新しいグループの末尾に移動します。コース配下に無い ID は 422

type
enum<string>

種類。既存と同じ html のみ指定できます(異なる値は 400。種類は変更できません)

Available options:
html
elements
object[]

要素の配列。element_id で既存要素と同期します(あり=部分更新、なし=新規、含めない既存要素=削除、既存要素の children 省略=子要素を維持)。省略すると要素は変更しません

Minimum array length: 1
is_published
boolean

ステータス(true: 公開、false: 下書き)

show_title
boolean

ページ上部へのレッスン名の表示(true: 表示する、false: 表示しない)

width
integer | null

最大幅。100(100%)または 600〜2000 の 10 刻み(px)。null でデフォルトに戻します

background_color
string | null

背景色(#RRGGBB または

use_comment
boolean

コメント機能(true: 利用する、false: 利用しない)

is_comment_override
boolean

コメントの個別設定。コースのコメント設定が「全レッスンで利用する」のとき、true にするとこのレッスンの use_comment に従います

comment_text
string | null

表示文字列(コメント欄の呼称)。null で「コメント」に戻します。課題 を指定すると「課題を提出する」の表示になります

Maximum string length: 255
comment_show_type
string

投稿されたコメントの表示(all: 全て表示する、all_after_post: 投稿後に全て表示する、own: 自身が投稿したコメントだけ表示する)。取得した既存の値はそのまま送り返せます

hide_comment_posted_at
boolean

コメント投稿日(true: 表示しない、false: 表示する)

comment_default_value
string | null

入力欄の初期値。null でクリア

Maximum string length: 65535
has_target_persons
boolean

受講対象者をコース登録日で指定する(false から true に変える場合は、更新後の target_persons_date_from / target_persons_date_to の少なくとも一方が必要)

target_persons_date_from
string<date> | null

受講対象者のコース登録日の開始日(YYYY-MM-DD)。null でクリア

target_persons_date_to
string<date> | null

受講対象者のコース登録日の終了日(YYYY-MM-DD)。null でクリア

release_type
string

開放日(開始日)(immediately / scheduled / scheduled_month / datetime / reader_date)。reader_date へ変更できるのは会員サイトの「ログインなしでの閲覧」が「可」(login_type が optional / none)の場合のみ(それ以外は 400)。取得した既存の値はそのまま送り返せます

release_day
integer | null

開放までの日数。null でクリア。更新後の release_type が scheduled / reader_date のとき必須

Required range: 0 <= x <= 9999
release_month
integer | null

開放までの月数。null でクリア。更新後の release_type が scheduled_month のとき必須

Required range: 0 <= x <= 9999
release_date
string<date> | null

開放日(YYYY-MM-DD)。null でクリア。更新後の release_type が datetime のとき必須

release_hour
integer | null

開放時刻(0〜23 時)。null でクリア。開放日の設定を変更するとき、更新後の release_type が immediately 以外なら必須

Required range: 0 <= x <= 23
action_before_release
enum<string>

開放前の表示(show: 表示する、hide: 表示しない)

Available options:
show,
hide
js_head
string | null

headタグの最後に挿入するJavaScript(scriptタグも含めて記載)。null でクリア

js_body_top
string | null

bodyタグの最初に挿入するJavaScript(scriptタグも含めて記載)。null でクリア

js_body
string | null

bodyタグの最後に挿入するJavaScript(scriptタグも含めて記載)。null でクリア

css
string | null

カスタムCSS(styleタグ不要)。null でクリア

Response

更新されたレッスン

data
object

レッスンの詳細(作成・取得・更新の応答)