ファネルアクション作成
curl --request POST \
--url https://api.utage-system.com/v1/funnel-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"action_group_id": "<string>",
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
'import requests
url = "https://api.utage-system.com/v1/funnel-actions"
payload = {
"name": "<string>",
"action_group_id": "<string>",
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
action_group_id: '<string>',
details: [
{
type: 'scenario',
url: '<string>',
data: [{name: '<string>', value: '<string>'}],
funnel_id: '<string>',
bundle_course_id: '<string>',
product_id: '<string>',
spreadsheet_account_id: '<string>',
spreadsheet_url: '<string>',
spreadsheet_sheet_name: '<string>',
sheet: [{name: '<string>', value: '<string>'}]
}
]
})
};
fetch('https://api.utage-system.com/v1/funnel-actions', 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/funnel-actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'action_group_id' => '<string>',
'details' => [
[
'type' => 'scenario',
'url' => '<string>',
'data' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'funnel_id' => '<string>',
'bundle_course_id' => '<string>',
'product_id' => '<string>',
'spreadsheet_account_id' => '<string>',
'spreadsheet_url' => '<string>',
'spreadsheet_sheet_name' => '<string>',
'sheet' => [
[
'name' => '<string>',
'value' => '<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/funnel-actions"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.utage-system.com/v1/funnel-actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/funnel-actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"action_group_id": "<string>",
"is_archived": true,
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "Googleスプレッドシート連携は利用できません"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"details.0.url": [
"URLはhttpsで始まる1024文字以内の有効なURLで指定してください"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}ファネルアクション
ファネルアクション作成
ファネルアクションを作成します。動作(details)は配列の順に実行されます。種類ごとの項目は FunnelActionDetail を参照してください。
作成したファネルアクションは、ファネルページのフォーム要素・決済要素などの action_id で参照して紐づけます(紐づけはページの作成・更新で行います)。
ファネルアクション作成
curl --request POST \
--url https://api.utage-system.com/v1/funnel-actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"action_group_id": "<string>",
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
'import requests
url = "https://api.utage-system.com/v1/funnel-actions"
payload = {
"name": "<string>",
"action_group_id": "<string>",
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
action_group_id: '<string>',
details: [
{
type: 'scenario',
url: '<string>',
data: [{name: '<string>', value: '<string>'}],
funnel_id: '<string>',
bundle_course_id: '<string>',
product_id: '<string>',
spreadsheet_account_id: '<string>',
spreadsheet_url: '<string>',
spreadsheet_sheet_name: '<string>',
sheet: [{name: '<string>', value: '<string>'}]
}
]
})
};
fetch('https://api.utage-system.com/v1/funnel-actions', 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/funnel-actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'action_group_id' => '<string>',
'details' => [
[
'type' => 'scenario',
'url' => '<string>',
'data' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'funnel_id' => '<string>',
'bundle_course_id' => '<string>',
'product_id' => '<string>',
'spreadsheet_account_id' => '<string>',
'spreadsheet_url' => '<string>',
'spreadsheet_sheet_name' => '<string>',
'sheet' => [
[
'name' => '<string>',
'value' => '<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/funnel-actions"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.utage-system.com/v1/funnel-actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/funnel-actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"action_group_id\": \"<string>\",\n \"details\": [\n {\n \"type\": \"scenario\",\n \"url\": \"<string>\",\n \"data\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"funnel_id\": \"<string>\",\n \"bundle_course_id\": \"<string>\",\n \"product_id\": \"<string>\",\n \"spreadsheet_account_id\": \"<string>\",\n \"spreadsheet_url\": \"<string>\",\n \"spreadsheet_sheet_name\": \"<string>\",\n \"sheet\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"action_group_id": "<string>",
"is_archived": true,
"details": [
{
"type": "scenario",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"funnel_id": "<string>",
"bundle_course_id": "<string>",
"product_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "bad_request",
"message": "Googleスプレッドシート連携は利用できません"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "validation_error",
"message": "入力内容に誤りがあります",
"details": {
"details.0.url": [
"URLはhttpsで始まる1024文字以内の有効なURLで指定してください"
]
}
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}POST
https://api.utage-system.com/v1/funnel-actions
Body
application/json