コンテンツにスキップ

ご案内ページの下書きを置き換える

PUT
/api/v1/guide-page/draft
curl --request PUT \
--url https://app.goyoka.com/api/v1/guide-page/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "draft": { "hero_image_id": "example", "headline": "example", "intro": "example", "about": "example", "profile": { "image_id": "example", "name": "example", "title": "example", "bio": "example" }, "links": [ { "id": "example", "label": "example", "url": "example", "visible": true } ], "gallery_image_ids": [ "example" ], "colors": { "source": "shop", "preset_id": "example", "primary": "example", "secondary": "example", "accent": "example" }, "sections": { "about": true, "profile": true, "links": true, "gallery": true, "testimonials": true, "menu": true, "events": true, "news": true, "access": true, "contact": true }, "section_order": [ "example" ], "seo": { "title": "example", "description": "example" } } }'

draft⁠の全欄を送ります。保存値と完全一致なら業務検査より先に200⁠を返し、未知の保存欄や削除済み画像の参照も保持します。変更時は新しい画像参照のUUID形式と自店での存在を確認し、不正形式は422、他店・不明は404⁠です。不変の旧参照は維持できます。ギャラリーは先頭6枚、使えないURL⁠のリンクは除外し、リンクの空白・色・節の順序を管理画面と同じ規則で正規化します。正規化後も同値なら保存しません。公開版と公開日時は変えず、画像一覧や件数は返しません。

409 SETTINGS_OPERATION_BLOCKED⁠のdetails.blocks⁠はcode⁠とmessage⁠の1要素配列です。鍵やトークンの持ち主が現在このお店のメンバーでない場合は、同値でも409 SETTINGS_OPERATION_BLOCKED(NOT_CURRENT_MEMBER)です。読取後の保存競合は409 SETTINGS_OPERATION_BLOCKED(CONCURRENT_UPDATE)です。任意の冪等キーを使えます。メールは送りません。

必要な範囲: guide-page:write

ヘッダーのパラメータ

「ヘッダーのパラメータ」の節へ
Idempotency-Key
string

同じ内容の再送に同じ値を使います。異なる内容との再利用や処理中の再送は409 IDEMPOTENCY_KEY_REUSED⁠です。

メディアタイプapplication/json
object
draft
必須
object
hero_image_id
必須
string | null
headline
必須
string
intro
必須
string
about
必須
string
profile
必須
object
image_id
必須
string | null
name
必須
string
title
必須
string
bio
必須
string
links
必須
Array<object>
50件以下
object
id
必須
string
label
必須
string
url
必須
string
visible
必須
boolean
gallery_image_ids
必須
Array<string>
colors
必須
object
source

shop: 設定 › お店のデザインのアクセント色から作る(既定)。own: ご案内ページだけ primary・secondary・accent の3色にする。省略すると、3色が既定の配色のままなら shop、変えていれば own。

string
取りうる値: shop own
preset_id
必須
string | null
32文字以下
primary
必須
string
32文字以下
secondary
必須
string
32文字以下
accent
必須
string
32文字以下
sections
必須
object
about
必須
boolean
profile
必須
boolean
links
必須
boolean
gallery
必須
boolean
testimonials
必須
boolean
menu
必須
boolean
events
必須
boolean
news
必須
boolean
access
必須
boolean
contact
必須
boolean
section_order
必須
Array<string>
seo
必須
object
title
必須
string | null
description
必須
string | null

ご案内ページの下書きを置き換える

メディアタイプapplication/json
object
data
必須
object
draft
必須
object
hero_image_id
必須
string | null
headline
必須
string
intro
必須
string
about
必須
string
profile
必須
object
image_id
必須
string | null
name
必須
string
title
必須
string
bio
必須
string
links
必須
Array<object>
50件以下
object
id
必須
string
label
必須
string
url
必須
string
visible
必須
boolean
gallery_image_ids
必須
Array<string>
colors
必須
object
source

shop: 設定 › お店のデザインのアクセント色から作る(既定)。own: ご案内ページだけ primary・secondary・accent の3色にする。省略すると、3色が既定の配色のままなら shop、変えていれば own。

string
取りうる値: shop own
preset_id
必須
string | null
32文字以下
primary
必須
string
32文字以下
secondary
必須
string
32文字以下
accent
必須
string
32文字以下
sections
必須
object
about
必須
boolean
profile
必須
boolean
links
必須
boolean
gallery
必須
boolean
testimonials
必須
boolean
menu
必須
boolean
events
必須
boolean
news
必須
boolean
access
必須
boolean
contact
必須
boolean
section_order
必須
Array<string>
seo
必須
object
title
必須
string | null
description
必須
string | null
例
{
"data": {
"draft": {
"colors": {
"source": "shop"
}
}
}
}

利用できないヘッダ

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

鍵が無い・無効

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

範囲不足

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

見つからない

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

予約・冪等キーの競合

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

本文が1 MiB⁠を超えている

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

入力の検証失敗

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}

回数の上限

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}
RateLimit-Limit
integer
>= 1

固定窓内の回数上限

RateLimit-Remaining
integer

固定窓内の残り回数

RateLimit-Reset
integer

窓終了までの秒数

Retry-After
integer
>= 1

再試行までの待機秒数

内部エラー

メディアタイプapplication/json
object
error
必須
object
code
必須
string
message
必須
string
details
object
任意のキー
追加の項目
request_id
必須
string
例自動生成
{
"error": {
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
},
"request_id": "example"
}
}