コンテンツにスキップ
14日間無料で試す
日本語
Claudeで開く このページについて質問するChatGPTで開く このページについて質問する

Registration Form用API

公開APIを使って、登録フォームを作成、更新、一覧表示、削除します。

このページでは、卸売のお客様が送信するサインアップフォームである登録フォームを管理するための公開APIについて説明します。4つの操作はすべて、公開APIで説明している共通のベースURL、ヘッダー、認証を使用します。

POST https://wholesale.samita.io/api/v1/registration-forms
ヘッダー 説明 必須
X-SAMITA-API-KEY Wholesaleアプリで発行されたAPIキー はい
X-SAMITA-SHOP-URL xxx.myshopify.com形式のShopifyストアドメイン はい
CONTENT-TYPE application/jsonを指定する必要があります はい

このAPIには、APIキーのCreate権限が必要です。

トップレベルのフィールド:

フィールド 型 必須 説明
title string 推奨 アプリ内でのフォーム名です。
status boolean 推奨 フォームが有効かどうかです。
shopify_integration object はい 送信内容をShopifyの顧客とどのように連携させるかを制御します。以下をご覧ください。
elements array はい フォームのフィールドを表示順に指定します。以下をご覧ください。
header object いいえ フォームの上部に表示されるヘッダーテキストです。
footer object いいえ フォームの下部に表示されるフッターのボタンとテキストです。
general object いいえ 承認の動作とデフォルトの顧客タグです。
errorMessage object いいえ カスタムの検証エラーテキストです。
reCaptcha object いいえ このフォームでreCAPTCHAを必須にするかどうかです。
afterSubmit object いいえ お客様が送信した後の動作です。
shopify_integration
フィールド 型 備考
ifExist string(必須) returnError、continueAndUpdate、continueAndIgnoreErrorのいずれかです。送信されたメールアドレスにすでに顧客アカウントがある場合の動作を指定します。
showMessage boolean 代わりにログインするよう案内するメッセージを表示します。
messageRedirectToLogin string そのメッセージのテキストです。
sendEmailInvite boolean Shopifyのアカウント有効化メールを送信します。
acceptsMarketing boolean 新規顧客をマーケティングメールの受信対象にします。
elements(フィールドオブジェクトの配列)

すべての要素にtypeが必要です。一般的なタイプには、text、email、phone、password、number、name、url、checkbox、radio、country、datetime、file、hidden、heading、paragraph、devider、htmlがあります。

フィールド 型 適用対象 備考
type string(必須) すべて 要素のタイプです。
columnWidth number(deviderを除き必須) すべて 33.33、50、100のいずれかです。
label / placeholder / description string 入力タイプ フィールドのラベル表示です。
required boolean(heading、paragraph、devider、htmlでは必須) それらのタイプ フィールドの入力が必須かどうかです。
hasConfirm, labelConfirm, placeholderConfirm, descriptionConfirm — password パスワード確認フィールドを追加します。
options, defaultOptions, defaultOption, defaultSelected — checkbox, radio, country 選択肢リストの設定です。
inlineOption number(必須) checkbox, radio 20、25、33.33、50、100のいずれかです。
heading / text string heading / paragraph 表示内容です。
html string html 生のHTMLブロックです。
allowed-multiple boolean file 複数ファイルのアップロードを許可します。
allowed-extension array file 次のいずれかです:csv、pdf、jpg、jpeg、gif、svg、png、psd、ai、stl、stp、step、doc、docx、txt、ex2、dxf、gbr、eps、mov、mp4、xls、xlsx、ods、numbers、xlsm、zip、heic、heif。
format, date-format, time-format string datetime format:date/time/date-and-time。date-format:Y-m-d/d-m-Y/m-d-Y/d-m/m-d。time-format:12h/24h。
integration string 任意 このフィールドをShopifyの顧客プロパティに対応付けます:email、phone、first_name、last_name、addresses.address1、addresses.address2、addresses.city、addresses.province、addresses.zip、addresses.company、addresses.country、password、tags[]、note[]。
header, footer, general, errorMessage, reCaptcha, afterSubmit
セクション フィールド 型 備考
header active boolean ヘッダーの表示/非表示です。
header title string、最大255文字
header description string
footer description string
footer previousText, nextText, submitText, resetButtonText string ボタンのラベルです。
footer resetButton, submitFullWidth boolean
footer submitAlignment string left、center、rightのいずれかです。
general customerTaxExempt boolean
general customerProcess string review-approving(手動承認)またはapproving(自動)。
general customerTags array 承認されたお客様に付けるタグです。
errorMessage required, invalidName, invalidEmail, invalidURL, invalidPhone, invalidNumber, invalidPassword, confirmPasswordNotMatch, customerAlreadyExists, fileSizeLimit, fileNotAllowed, requiredCaptcha, shopifyInvalidPhone, shopifyPhoneHasAlready, shopifyInvalidProvice, otherError string 検証エラーごとのカスタムテキストです。
reCaptcha enable boolean
afterSubmit action string clearForm、redirectToPage、hideFormのいずれかです。
afterSubmit message, redirectUrl string

200 – Successは、作成されたレコードを返します。レスポンスの形式については、下の登録フォームを取得するの例をご覧ください。

PUT https://wholesale.samita.io/api/v1/registration-forms/{id}

ヘッダーは作成時と同じです。変更したいフィールドのみを送信します。title、status、secret_configs(キーconfigsの下にある、GETで返されるものと同じ形式の設定オブジェクト全体)はすべて任意です。指定しなかったフィールドは現在の値が維持されます。このAPIにはUpdate権限が必要です。

GET https://wholesale.samita.io/api/v1/registration-forms/{id}

ヘッダーは作成時と同じで、リクエストボディはありません。このAPIにはView権限が必要です。

200 – Successの例:

{
"id": 1,
"title": "Wholesale Registration",
"status": true,
"created_at": "2026-01-15T10:00:00",
"updated_at": "2026-01-15T10:00:00",
"configs": {
"header": {
"active": true,
"title": "Apply for a wholesale account",
"description": ""
},
"footer": {
"previousText": "Back",
"nextText": "Next",
"submitText": "Submit",
"resetButton": false,
"resetButtonText": "Reset",
"submitFullWidth": false,
"submitAlignment": "left"
},
"general": {
"customerTaxExempt": false,
"customerProcess": "review-approving",
"customerTags": ["wholesale"]
},
"reCaptcha": {
"enable": false
},
"afterSubmit": {
"action": "clearForm",
"message": "Thanks! We'll review your application shortly.",
"redirectUrl": ""
},
"integration": {
"shopify": {
"ifExist": "returnError",
"showMessage": true,
"sendEmailInvite": true,
"acceptsMarketing": false,
"integrationElements": {
"email": "email",
"first_name": "first_name",
"last_name": "last_name"
}
}
},
"elements": [
{ "id": "first_name", "type": "name", "label": "First name", "required": true, "columnWidth": 50 },
{ "id": "last_name", "type": "name", "label": "Last name", "required": true, "columnWidth": 50 },
{ "id": "email", "type": "email", "label": "Email", "required": true, "columnWidth": 100 }
]
}
}
DELETE https://wholesale.samita.io/api/v1/registration-forms/{id}

ヘッダーは作成時と同じです。idsパラメーターを渡します。削除するフォームIDをカンマ区切りで指定したリストで、クエリ文字列パラメーターまたはJSONボディのフィールドとして指定します(例:ids=1,2,3)。このAPIにはDelete権限が必要です。

200 – Success:

{
"success": true
}

4つのエンドポイントはすべて、公開APIのその他のエンドポイントと同じエラーレスポンスを返します。401 Unauthorized、403 Forbidden、429 Too Many Requestsについては、公開APIをご覧ください。

このページは役に立ちましたか?