登録フォーム項目並び替え
curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form_item_ids": [
"<string>"
]
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder"
payload = { "form_item_ids": ["<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({form_item_ids: ['<string>']})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder', 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}/form-items/reorder",
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([
'form_item_ids' => [
'<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}/form-items/reorder"
payload := strings.NewReader("{\n \"form_item_ids\": [\n \"<string>\"\n ]\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}/form-items/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form_item_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder")
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 \"form_item_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"reader_item_id": "<string>",
"reserved_word": "<string>",
"name": "<string>",
"input_type": "<string>",
"is_required": true,
"default_value": "<string>",
"order": 123
}
]
}{
"error": {
"code": "bad_request",
"message": "LINEアカウントではフォーム項目の変更操作はできません"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"name": [
"管理用タイトルは必須です"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}登録フォーム・読者項目
登録フォーム項目並び替え
登録フォーム項目の表示順を一括で変更します。登録フォーム項目一覧で取得できる全項目の ID を表示順に並べて指定します(過不足があると 422)。
応答は並び替え後の一覧です。LINE の配信アカウントでは操作できません(400 bad_request)。
登録フォーム項目並び替え
curl --request PATCH \
--url https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form_item_ids": [
"<string>"
]
}
'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder"
payload = { "form_item_ids": ["<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({form_item_ids: ['<string>']})
};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder', 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}/form-items/reorder",
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([
'form_item_ids' => [
'<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}/form-items/reorder"
payload := strings.NewReader("{\n \"form_item_ids\": [\n \"<string>\"\n ]\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}/form-items/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form_item_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder")
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 \"form_item_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"reader_item_id": "<string>",
"reserved_word": "<string>",
"name": "<string>",
"input_type": "<string>",
"is_required": true,
"default_value": "<string>",
"order": 123
}
]
}{
"error": {
"code": "bad_request",
"message": "LINEアカウントではフォーム項目の変更操作はできません"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"name": [
"管理用タイトルは必須です"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}PATCH
https://api.utage-system.com/v1/accounts/{account_id}/scenarios/{scenario_id}/form-items/reorder
Body
application/json