読者更新
curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"base_date": "<string>",
"has_step_scheduled": true,
"has_reminder": true,
"message_tracking_id": "<string>",
"funnel_tracking_id": "<string>"
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}"
payload = {
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"base_date": "<string>",
"has_step_scheduled": True,
"has_reminder": True,
"message_tracking_id": "<string>",
"funnel_tracking_id": "<string>"
}
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({
scenario_fields: {},
common_fields: {},
memo: '<string>',
base_date: '<string>',
has_step_scheduled: true,
has_reminder: true,
message_tracking_id: '<string>',
funnel_tracking_id: '<string>'
})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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([
'scenario_fields' => [
],
'common_fields' => [
],
'memo' => '<string>',
'base_date' => '<string>',
'has_step_scheduled' => true,
'has_reminder' => true,
'message_tracking_id' => '<string>',
'funnel_tracking_id' => '<string>'
]),
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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}"
payload := strings.NewReader("{\n \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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 \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"common_reader_id": "<string>",
"scenario_id": "<string>",
"ip": "<string>",
"line_display_name": "<string>",
"line_picture_url": "<string>",
"line_friend_id": "<string>",
"base_date": "<string>",
"is_blocked": true,
"is_line_blocked": true,
"is_mail_error": true,
"is_sms_blocked": true,
"block_datetime": "<string>",
"partner": {
"project_name": "<string>",
"name": "<string>",
"reward": 123
},
"has_step_scheduled": true,
"has_reminder": true,
"message_tracking_id": "<string>",
"message_tracking_name": "<string>",
"funnel_tracking_id": "<string>",
"funnel_tracking_name": "<string>",
"referrer": "<string>",
"labels": [
{
"id": "<string>",
"name": "<string>",
"assigned_at": "<string>"
}
],
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"created_at": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "認証に失敗しました"
}
}{
"error": {
"code": "not_found",
"message": "リソースが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "バリデーションエラーが発生しました"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "リクエスト上限を超えました。しばらく時間を空けて再試行してください"
}
}読者
読者更新
プレビュー機能。仕様は今後変更される可能性があります。 読者を部分更新します。リクエストに含めたフィールドのみ変更し、省略したフィールドは既存値を維持します。
scenario_fields / common_fields はいずれも指定したキーのみ更新します。common_fields の更新は同一人物の全シナリオに波及します。
読者更新
curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"base_date": "<string>",
"has_step_scheduled": true,
"has_reminder": true,
"message_tracking_id": "<string>",
"funnel_tracking_id": "<string>"
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}"
payload = {
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"base_date": "<string>",
"has_step_scheduled": True,
"has_reminder": True,
"message_tracking_id": "<string>",
"funnel_tracking_id": "<string>"
}
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({
scenario_fields: {},
common_fields: {},
memo: '<string>',
base_date: '<string>',
has_step_scheduled: true,
has_reminder: true,
message_tracking_id: '<string>',
funnel_tracking_id: '<string>'
})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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([
'scenario_fields' => [
],
'common_fields' => [
],
'memo' => '<string>',
'base_date' => '<string>',
'has_step_scheduled' => true,
'has_reminder' => true,
'message_tracking_id' => '<string>',
'funnel_tracking_id' => '<string>'
]),
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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}"
payload := strings.NewReader("{\n \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\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/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_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 \"scenario_fields\": {},\n \"common_fields\": {},\n \"memo\": \"<string>\",\n \"base_date\": \"<string>\",\n \"has_step_scheduled\": true,\n \"has_reminder\": true,\n \"message_tracking_id\": \"<string>\",\n \"funnel_tracking_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"common_reader_id": "<string>",
"scenario_id": "<string>",
"ip": "<string>",
"line_display_name": "<string>",
"line_picture_url": "<string>",
"line_friend_id": "<string>",
"base_date": "<string>",
"is_blocked": true,
"is_line_blocked": true,
"is_mail_error": true,
"is_sms_blocked": true,
"block_datetime": "<string>",
"partner": {
"project_name": "<string>",
"name": "<string>",
"reward": 123
},
"has_step_scheduled": true,
"has_reminder": true,
"message_tracking_id": "<string>",
"message_tracking_name": "<string>",
"funnel_tracking_id": "<string>",
"funnel_tracking_name": "<string>",
"referrer": "<string>",
"labels": [
{
"id": "<string>",
"name": "<string>",
"assigned_at": "<string>"
}
],
"scenario_fields": {},
"common_fields": {},
"memo": "<string>",
"created_at": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "認証に失敗しました"
}
}{
"error": {
"code": "not_found",
"message": "リソースが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "バリデーションエラーが発生しました"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "リクエスト上限を超えました。しばらく時間を空けて再試行してください"
}
}PATCH
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/readers/{reader_id}
この機能はプレビュー版です。仕様が変更される場合があります。
Authorizations
APIキーをBearerトークンとして指定
Path Parameters
アカウントID
シナリオID
読者ID
Body
application/json
シナリオ固有の読者項目(キー=項目名、値=文字列)。指定したキーのみ更新
全シナリオ共通の読者項目(キー=項目名、値=文字列)。指定したキーのみ更新。更新すると同一人物の全シナリオに波及する
メモ(全シナリオ共通の読者データ)
配信基準日時(Y-m-d または Y-m-d H:i:s)。日付形式が厳密に検証され、不正な値(例: 2026-02-30, tomorrow)は422になります
ステップ配信の対象にする
リマインダ配信の対象にする
シナリオ登録経路ID。空文字を指定するとnullに更新(該当シナリオが所有するものに限る)
ファネル登録経路ID。空文字を指定するとnullに更新(所有チェックあり)
Response
更新された読者
読者の詳細情報。読者項目はトップレベルではなく scenario_fields(シナリオ固有)/ common_fields(全シナリオ共通)の2グループで返る。トップレベルはシステム情報のみ。
Show child attributes
Show child attributes
⌘I