コンテンツにスキップ
アプリをインストール
日本語

[GET] 設定

AI による概要

タイムゾーン、日付形式、ストアフロントのテキスト、予約注文と近日公開の表示オプションなど、ストアのアプリ設定を返す読み取り専用のエンドポイントを説明します。

  • パラメーターなしで GET /shop-api/settings を呼び出します。レート制限は throttle:60,1 です。
  • 設定は API では読み取りのみ可能です。変更はアプリの管理画面で行ってください。
  • timezone、date_format、translation には有効なトークンであればどれでも使用できます。preorder と coming_soon のグループには対応する読み取りスコープが必要で、ない場合は省略されます。
  • use_selling_plan はストアのモデルを示します。Shopify の販売プランモデルの場合は true、レガシーモデルの場合は false です。
  • translation.default は常に存在します。その他のロケールには翻訳済みのキーのみが含まれる場合があるため、default にフォールバックしてください。

AI が生成した要約です。誤りが含まれる場合があるため、下記のガイド全文をご確認ください。

[GET] 設定

* 認証

必須 Authorization

制限 throttle:60,1

エンドポイント GET - /shop-api/settings

読み取り専用です。ストアの設定は Shop API では読み取りのみ可能で、変更はアプリの管理画面で行います。

ヘッダー

ヘッダー 必須 説明
Authorization はい ストアの公開 API キー Bearer token
Content-Type はい application/json

スコープ

有効な API トークンであれば、このエンドポイントを呼び出せます。返されるグループはトークンのスコープによって異なり、トークンが読み取れないグループはレスポンスから除外されます。

グループ 必要なスコープ
timezone, date_format, translation なし(有効なトークンであれば可)
preorder read_preorders(または write_preorders)
coming_soon read_coming_soon(または write_coming_soon)

1. リクエストペイロード

パラメーターも JSON ボディもありません。

例

GET /shop-api/settings
Authorization: Bearer token ************

2. 成功レスポンス 200

read_preorders と read_coming_soon を持つトークンの場合(この例では translation を省略しています):

{
"success": true,
"data": {
"timezone": "America/New_York",
"date_format": "MMM DD, YYYY",
"translation": {
"default": {
"preorderText": "Pre Order",
"messageAboveText": "Don't miss out - Grab yours now before we sell out again!",
"messageBellowText": "We will fulfill the item as soon as it becomes available",
"preorderBadge": "Pre Order",
"preorderLabel": "Pre-order",
"comingSoonAddToCartText": "Coming soon",
"partialPaymentLabel": "Payment option",
"partialPaymentReleased": "You will be charged the remaining balance when the product is released on {{ released }}"
},
"fr": {
"preorderText": "Précommander",
"preorderBadge": "Précommande"
}
},
"preorder": {
"use_selling_plan": true,
"hide_buy_now_button": true,
"required_continue_selling": false,
"show_preorder_badge": true,
"show_preorder_label": true,
"show_payment_option_on_collection": true,
"show_messages_on_collection": false
},
"coming_soon": {
"show_coming_soon_badge": false,
"show_messages_on_collection": false
}
}
}

3. レスポンスのキーとフィールド

トップレベル

キー 型 説明
success boolean 成功時は true
data object ストアの設定オブジェクト

data 設定オブジェクト

フィールド 型 説明
timezone string ストアの IANA タイムゾーン(例:America/New_York)。Shop API で作成されたオファーの start_date / end_date にはこのタイムゾーンが使用されます
date_format string アプリで設定した日付の表示形式。Moment.js 形式のトークンを使用します(例:MMM DD, YYYY、DD/MM/YYYY)。デフォルトは MMM DD, YYYY です
translation object ロケールごとのストアフロントのテキスト。下記の translation を参照してください
preorder object 予約注文の設定。read_preorders スコープがある場合のみ
coming_soon object 近日公開の設定。read_coming_soon スコープがある場合のみ

preorder

フィールド 型 説明
use_selling_plan boolean ストアの予約注文モデル:true = Shopifyの販売プランモデル、false = レガシーモデル
hide_buy_now_button boolean 予約注文商品の「今すぐ購入」ボタンを非表示にします(商品ページとクイックビューウィンドウ)
required_continue_selling boolean 商品で「在庫切れ時に販売を続ける」が有効な場合のみ予約注文を表示します
show_preorder_badge boolean 商品リストに予約注文バッジを表示します。現在のプランにバッジが含まれていない場合は常に false になります
show_preorder_label boolean 予約注文ラベルを表示します
show_payment_option_on_collection boolean コレクションページに支払いオプション(全額支払い / 分割支払い)を表示します
show_messages_on_collection boolean コレクションページにプロモーションメッセージとフルフィルメントの注記(ボタンの上 / 下のメッセージ)を表示します

coming_soon

フィールド 型 説明
show_coming_soon_badge boolean 商品リストに近日公開バッジを表示します
show_messages_on_collection boolean コレクションページにボタンの上 / 下の近日公開メッセージを表示します

translation

キー 型 説明
default object ストアのデフォルト言語のテキスト。常に存在します。カスタマイズされていないキーにはアプリのデフォルト値が入ります
<locale> object 他の言語のテキスト。ロケールコード(例:fr)がキーになります。翻訳済みのキーのみを含む場合があります。存在しないキーは default を使用してください

テキストには HTML や、:stock、:max、{{product.title}}、{{variant.title}}、{{ released }} などのプレースホルダーを含めることができます。

翻訳キー(今後キーが追加される場合があります):

グループ キー
予約注文ボタンとメッセージ preorderText, messageAboveText, messageBellowText, naMessageText, soldoutText, comingSoonText, preorderLimitMessage, outOfStockMessage, preorderLabel
カウントダウン labelCountdownStart, labelCountdownEnd, labelCountdownComingsoon, labelCountdownDays, labelCountdownHours, labelCountdownMinutes, labelCountdownSeconds
近日公開 comingSoonAddToCartText, messageComingSoonAboveText, messageComingSoonBellowText
バッジ preorderBadge, comingSoonPreorderBadge, comingSoonAtcBadge
支払い partialPaymentLabel, partialPaymentOptionFull, partialPaymentOptionPart, preorderPrice, partialPaymentTitle, partialPaymentReleased, partialPaymentSaveLavel
カート preorderedItemlabel, preorderContactLink, cartWarningTitle, cartWarningContent, cartWarningCheckboxLabel, cartWarningLimitMessage, cartWarningEndLimitMessage, cartWarningAlertMessage
再入荷 bisTextButton, bisTitleForm, bisHeaderContent, bisPlaceHolderEmail, bisSubscribeTextButton, bisFooterContent, bisSubscribeSuccess, bisSubscribeFail, bisSubscribeRegistered, bisSubscribeRequired, bisPhoneRegistered, bisEmailAlertTitle, bisSmsAlertTitle
配信停止 unsubscribeTitle, unsubscribeButton, unsubscribeSuccess, unsubscribeProductUnsubscribed

4. 失敗レスポンス

トークンがない場合 — 401

{"success": false,"message": "Missing API token"}

無効または取り消されたトークン — 401

{"success": false,"message": "Invalid or revoked API token"}

リクエストが多すぎる場合 — 429

予期しないサーバーエラー — HTTP 200

{"success": false,"message": "Something went wrong, please try again"}

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

問題を報告