商品詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/products/{product_id}/details/{detail_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/products/{product_id}/details/{detail_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/products/{product_id}/details/{detail_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"payment_type": "credit_card",
"payment_provider": "none",
"charge_type": "one_time",
"payment_setting_id": "<string>",
"is_bump": true,
"is_hidden": true,
"amount": 123,
"use_different_first_amount": true,
"recurring_amount": 123,
"installment_count": 123,
"trial_days": 123,
"billing_cycle": "month",
"show_payment_count": true,
"stripe_plan_id": "<string>",
"stripe_test_plan_id": "<string>",
"telecom_rebill_param_id": "<string>",
"has_sales_limit": true,
"max_sales_quantity": 123,
"display_name": "<string>",
"display_price": "<string>",
"use_sales_period": true,
"sales_period_from": "<string>",
"sales_period_to": "<string>",
"receipt_name": "<string>",
"receipt_description": "<string>",
"purchase_register_type": "none",
"purchase_scenario_id": "<string>",
"purchase_form_id": "<string>",
"purchase_bundle_id": "<string>",
"purchase_action_id": "<string>",
"registration_register_type": "none",
"registration_scenario_id": "<string>",
"registration_form_id": "<string>",
"registration_action_id": "<string>",
"has_registration_mail": true,
"registration_from_name": "<string>",
"registration_from_mail": "<string>",
"registration_from_address_type": "own_domain",
"registration_reply_to_mail": "<string>",
"is_registration_custom_mail": true,
"registration_subject": "<string>",
"registration_body": "<string>",
"deadline_days": 123,
"has_deadline_mail": true,
"deadline_from_name": "<string>",
"deadline_from_mail": "<string>",
"deadline_from_address_type": "own_domain",
"deadline_reply_to_mail": "<string>",
"is_deadline_custom_mail": true,
"deadline_subject": "<string>",
"deadline_body": "<string>",
"deadline_mail_sent_before_days": 123,
"cancel_unregister_scenario_id": "<string>",
"cancel_register_type": "none",
"cancel_register_scenario_id": "<string>",
"cancel_form_id": "<string>",
"cancel_bundle_id": "<string>",
"cancel_action_id": "<string>",
"has_failed_mail": true,
"failed_from_name": "<string>",
"failed_from_mail": "<string>",
"failed_from_address_type": "own_domain",
"failed_reply_to_mail": "<string>",
"failed_subject": "<string>",
"failed_body": "<string>",
"has_purchase_mail": true,
"purchase_from_name": "<string>",
"purchase_from_mail": "<string>",
"purchase_from_address_type": "own_domain",
"purchase_reply_to_mail": "<string>",
"is_purchase_custom_mail": true,
"purchase_subject": "<string>",
"purchase_body": "<string>",
"notify_mail": "<string>",
"is_purchase_custom_notify": true,
"purchase_custom_notify_subject": "<string>",
"purchase_custom_notify_body": "<string>",
"chat_notify_type": "none",
"chat_notify_to": "<string>",
"is_chat_custom_notify": true,
"chat_notify_text": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}商品詳細
商品詳細取得
商品詳細の全項目(基本情報・金額・販売設定・申込後 / 購入後 / 解除時の動作設定・支払い期限の設定・課金失敗時の動作設定・通知設定・チャット通知)を取得します。チャット通知の chat_notify_token / chat_notify_webhook_url は設定専用のため応答に含まれません。取得した内容はそのまま商品詳細更新に送り返せます(例外: trial_days が負の値の既存データは 0 以上の範囲で検証されるため、0 以上に直してから送ります)。
商品詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/products/{product_id}/details/{detail_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/products/{product_id}/details/{detail_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/products/{product_id}/details/{detail_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"payment_type": "credit_card",
"payment_provider": "none",
"charge_type": "one_time",
"payment_setting_id": "<string>",
"is_bump": true,
"is_hidden": true,
"amount": 123,
"use_different_first_amount": true,
"recurring_amount": 123,
"installment_count": 123,
"trial_days": 123,
"billing_cycle": "month",
"show_payment_count": true,
"stripe_plan_id": "<string>",
"stripe_test_plan_id": "<string>",
"telecom_rebill_param_id": "<string>",
"has_sales_limit": true,
"max_sales_quantity": 123,
"display_name": "<string>",
"display_price": "<string>",
"use_sales_period": true,
"sales_period_from": "<string>",
"sales_period_to": "<string>",
"receipt_name": "<string>",
"receipt_description": "<string>",
"purchase_register_type": "none",
"purchase_scenario_id": "<string>",
"purchase_form_id": "<string>",
"purchase_bundle_id": "<string>",
"purchase_action_id": "<string>",
"registration_register_type": "none",
"registration_scenario_id": "<string>",
"registration_form_id": "<string>",
"registration_action_id": "<string>",
"has_registration_mail": true,
"registration_from_name": "<string>",
"registration_from_mail": "<string>",
"registration_from_address_type": "own_domain",
"registration_reply_to_mail": "<string>",
"is_registration_custom_mail": true,
"registration_subject": "<string>",
"registration_body": "<string>",
"deadline_days": 123,
"has_deadline_mail": true,
"deadline_from_name": "<string>",
"deadline_from_mail": "<string>",
"deadline_from_address_type": "own_domain",
"deadline_reply_to_mail": "<string>",
"is_deadline_custom_mail": true,
"deadline_subject": "<string>",
"deadline_body": "<string>",
"deadline_mail_sent_before_days": 123,
"cancel_unregister_scenario_id": "<string>",
"cancel_register_type": "none",
"cancel_register_scenario_id": "<string>",
"cancel_form_id": "<string>",
"cancel_bundle_id": "<string>",
"cancel_action_id": "<string>",
"has_failed_mail": true,
"failed_from_name": "<string>",
"failed_from_mail": "<string>",
"failed_from_address_type": "own_domain",
"failed_reply_to_mail": "<string>",
"failed_subject": "<string>",
"failed_body": "<string>",
"has_purchase_mail": true,
"purchase_from_name": "<string>",
"purchase_from_mail": "<string>",
"purchase_from_address_type": "own_domain",
"purchase_reply_to_mail": "<string>",
"is_purchase_custom_mail": true,
"purchase_subject": "<string>",
"purchase_body": "<string>",
"notify_mail": "<string>",
"is_purchase_custom_notify": true,
"purchase_custom_notify_subject": "<string>",
"purchase_custom_notify_body": "<string>",
"chat_notify_type": "none",
"chat_notify_to": "<string>",
"is_chat_custom_notify": true,
"chat_notify_text": "<string>",
"order": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}GET
https://api.utage-system.com/v1/products/{product_id}/details/{detail_id}