コース更新
curl --request PATCH \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"system_name": "<string>",
"type": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"day": 4999,
"hour": 11,
"url": "<string>",
"type": "bundle_enrolled_date",
"bundle_id": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"release_type": "<string>",
"release_day": 4999,
"release_month": 4999,
"release_date": "<string>",
"release_hour": 11,
"close_type": "<string>",
"close_day": 4999,
"close_date": "<string>",
"close_hour": 11
}
'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}"
payload = {
"name": "<string>",
"system_name": "<string>",
"type": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": True,
"is_video_autoplay_setting": True,
"is_published": True,
"category_ids": ["<string>"],
"require_login": True,
"show_non_purchaser": True,
"url_for_non_purchaser": "<string>",
"use_limited_offer": True,
"limited_offers": [
{
"day": 4999,
"hour": 11,
"url": "<string>",
"type": "bundle_enrolled_date",
"bundle_id": "<string>"
}
],
"has_target_persons": True,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"release_type": "<string>",
"release_day": 4999,
"release_month": 4999,
"release_date": "<string>",
"release_hour": 11,
"close_type": "<string>",
"close_day": 4999,
"close_date": "<string>",
"close_hour": 11
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
system_name: '<string>',
type: '<string>',
url: '<string>',
href_type: '<string>',
image_url: '<string>',
button_text: '<string>',
is_hide_progress: true,
is_video_autoplay_setting: true,
is_published: true,
category_ids: ['<string>'],
require_login: true,
show_non_purchaser: true,
url_for_non_purchaser: '<string>',
use_limited_offer: true,
limited_offers: [
{
day: 4999,
hour: 11,
url: '<string>',
type: 'bundle_enrolled_date',
bundle_id: '<string>'
}
],
has_target_persons: true,
target_persons_date_from: '<string>',
target_persons_date_to: '<string>',
release_type: '<string>',
release_day: 4999,
release_month: 4999,
release_date: '<string>',
release_hour: 11,
close_type: '<string>',
close_day: 4999,
close_date: '<string>',
close_hour: 11
})
};
fetch('https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'system_name' => '<string>',
'type' => '<string>',
'url' => '<string>',
'href_type' => '<string>',
'image_url' => '<string>',
'button_text' => '<string>',
'is_hide_progress' => true,
'is_video_autoplay_setting' => true,
'is_published' => true,
'category_ids' => [
'<string>'
],
'require_login' => true,
'show_non_purchaser' => true,
'url_for_non_purchaser' => '<string>',
'use_limited_offer' => true,
'limited_offers' => [
[
'day' => 4999,
'hour' => 11,
'url' => '<string>',
'type' => 'bundle_enrolled_date',
'bundle_id' => '<string>'
]
],
'has_target_persons' => true,
'target_persons_date_from' => '<string>',
'target_persons_date_to' => '<string>',
'release_type' => '<string>',
'release_day' => 4999,
'release_month' => 4999,
'release_date' => '<string>',
'release_hour' => 11,
'close_type' => '<string>',
'close_day' => 4999,
'close_date' => '<string>',
'close_hour' => 11
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"system_name": "<string>",
"type": "normal",
"course_url": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"comment_setting_type": "individual",
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"type": "bundle_enrolled_date",
"bundle_id": "<string>",
"day": 123,
"hour": 123,
"url": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"course_style": "open_all",
"release_type": "immediately",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"close_type": "none",
"close_day": 123,
"close_date": "<string>",
"close_hour": 123,
"cancel_type": "close",
"course_group_id": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "コースのtypeはnormal, urlのいずれかを指定してください"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"limited_offers": "use_limited_offer=true時にlimited_offersは1件以上必須です"
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}コース
コース更新
コースの設定を更新します。指定したフィールドだけを更新する部分更新で、含めなかったフィールドは現在の値を維持します。コース取得の応答をそのまま送り返しても状態は変わりません。ただし、limited_offers に、過去の起算日時(type が bundle_enrolled_date_addition / reader_date_addition)の要素、参照先のバンドルが削除されて bundle_id が null の要素、または会員サイトの login_type が optional / none ではなくなった後も残っている reader_date の要素が含まれる場合は、その要素を直すか除いてください(そのまま送ると 422、reader_date の要素は 400 になります)。
category_ids/limited_offersは指定した内容で全件置き換えますuse_limited_offerに false を指定すると、登録済みの期間限定オファーは全て削除されます- 更新後の
show_non_purchaserが false の場合、url_for_non_purchaserは null になります course_group_idとorderは変更できません(コース並び替えで変更します)type/href_type/release_type/close_typeの値の検証と、条件付き必須の検証は、関係する値が変わる場合だけ行います(過去に設定された値をそのまま送り返すことはできます)
400(bad_request)になる場合:
typeをnormal/url以外へ変更したrelease_type/close_typeをreader_dateへ変更した、またはlimited_offers[].typeにreader_dateを指定したが、会員サイトのlogin_typeがoptional/noneではない
コース更新
curl --request PATCH \
--url https://api.utage-system.com/v1/members/{site_id}/courses/{course_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"system_name": "<string>",
"type": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"day": 4999,
"hour": 11,
"url": "<string>",
"type": "bundle_enrolled_date",
"bundle_id": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"release_type": "<string>",
"release_day": 4999,
"release_month": 4999,
"release_date": "<string>",
"release_hour": 11,
"close_type": "<string>",
"close_day": 4999,
"close_date": "<string>",
"close_hour": 11
}
'import requests
url = "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}"
payload = {
"name": "<string>",
"system_name": "<string>",
"type": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": True,
"is_video_autoplay_setting": True,
"is_published": True,
"category_ids": ["<string>"],
"require_login": True,
"show_non_purchaser": True,
"url_for_non_purchaser": "<string>",
"use_limited_offer": True,
"limited_offers": [
{
"day": 4999,
"hour": 11,
"url": "<string>",
"type": "bundle_enrolled_date",
"bundle_id": "<string>"
}
],
"has_target_persons": True,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"release_type": "<string>",
"release_day": 4999,
"release_month": 4999,
"release_date": "<string>",
"release_hour": 11,
"close_type": "<string>",
"close_day": 4999,
"close_date": "<string>",
"close_hour": 11
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
system_name: '<string>',
type: '<string>',
url: '<string>',
href_type: '<string>',
image_url: '<string>',
button_text: '<string>',
is_hide_progress: true,
is_video_autoplay_setting: true,
is_published: true,
category_ids: ['<string>'],
require_login: true,
show_non_purchaser: true,
url_for_non_purchaser: '<string>',
use_limited_offer: true,
limited_offers: [
{
day: 4999,
hour: 11,
url: '<string>',
type: 'bundle_enrolled_date',
bundle_id: '<string>'
}
],
has_target_persons: true,
target_persons_date_from: '<string>',
target_persons_date_to: '<string>',
release_type: '<string>',
release_day: 4999,
release_month: 4999,
release_date: '<string>',
release_hour: 11,
close_type: '<string>',
close_day: 4999,
close_date: '<string>',
close_hour: 11
})
};
fetch('https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'system_name' => '<string>',
'type' => '<string>',
'url' => '<string>',
'href_type' => '<string>',
'image_url' => '<string>',
'button_text' => '<string>',
'is_hide_progress' => true,
'is_video_autoplay_setting' => true,
'is_published' => true,
'category_ids' => [
'<string>'
],
'require_login' => true,
'show_non_purchaser' => true,
'url_for_non_purchaser' => '<string>',
'use_limited_offer' => true,
'limited_offers' => [
[
'day' => 4999,
'hour' => 11,
'url' => '<string>',
'type' => 'bundle_enrolled_date',
'bundle_id' => '<string>'
]
],
'has_target_persons' => true,
'target_persons_date_from' => '<string>',
'target_persons_date_to' => '<string>',
'release_type' => '<string>',
'release_day' => 4999,
'release_month' => 4999,
'release_date' => '<string>',
'release_hour' => 11,
'close_type' => '<string>',
'close_day' => 4999,
'close_date' => '<string>',
'close_hour' => 11
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"system_name\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"href_type\": \"<string>\",\n \"image_url\": \"<string>\",\n \"button_text\": \"<string>\",\n \"is_hide_progress\": true,\n \"is_video_autoplay_setting\": true,\n \"is_published\": true,\n \"category_ids\": [\n \"<string>\"\n ],\n \"require_login\": true,\n \"show_non_purchaser\": true,\n \"url_for_non_purchaser\": \"<string>\",\n \"use_limited_offer\": true,\n \"limited_offers\": [\n {\n \"day\": 4999,\n \"hour\": 11,\n \"url\": \"<string>\",\n \"type\": \"bundle_enrolled_date\",\n \"bundle_id\": \"<string>\"\n }\n ],\n \"has_target_persons\": true,\n \"target_persons_date_from\": \"<string>\",\n \"target_persons_date_to\": \"<string>\",\n \"release_type\": \"<string>\",\n \"release_day\": 4999,\n \"release_month\": 4999,\n \"release_date\": \"<string>\",\n \"release_hour\": 11,\n \"close_type\": \"<string>\",\n \"close_day\": 4999,\n \"close_date\": \"<string>\",\n \"close_hour\": 11\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"system_name": "<string>",
"type": "normal",
"course_url": "<string>",
"url": "<string>",
"href_type": "<string>",
"image_url": "<string>",
"button_text": "<string>",
"is_hide_progress": true,
"is_video_autoplay_setting": true,
"comment_setting_type": "individual",
"is_published": true,
"category_ids": [
"<string>"
],
"require_login": true,
"show_non_purchaser": true,
"url_for_non_purchaser": "<string>",
"use_limited_offer": true,
"limited_offers": [
{
"type": "bundle_enrolled_date",
"bundle_id": "<string>",
"day": 123,
"hour": 123,
"url": "<string>"
}
],
"has_target_persons": true,
"target_persons_date_from": "<string>",
"target_persons_date_to": "<string>",
"course_style": "open_all",
"release_type": "immediately",
"release_day": 123,
"release_month": 123,
"release_date": "<string>",
"release_hour": 123,
"action_before_release": "show",
"close_type": "none",
"close_day": 123,
"close_date": "<string>",
"close_hour": 123,
"cancel_type": "close",
"course_group_id": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "コースのtypeはnormal, urlのいずれかを指定してください"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"limited_offers": "use_limited_offer=true時にlimited_offersは1件以上必須です"
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}PATCH
https://api.utage-system.com/v1/members/{site_id}/courses/{course_id}
Body
application/json
コースの更新内容。指定したフィールドだけを更新します。type / href_type / release_type / close_type は、現在の値と同じ値であれば取得応答の値(過去に設定された値を含む)をそのまま送り返せます。limited_offers は全件置き換えのため常に検証され、過去の起算日時(bundle_enrolled_date_addition / reader_date_addition)の要素や、参照先のバンドルが削除されて bundle_id が null の要素は、直すか除かないと 422 になります