ストア
ストアコレクションの作成
公開可能なオファーのコレクションを作成します。
POST
/store/collectionsstore:write行動
変更は検証され、応答する前にキー アカウントに保存されます。返されたリソースを信頼できる情報源としてクエリします。
効果
リソースを変更し、対応するドメイン イベントを発行できます。
繰り返し
ネットワーク障害が発生した場合は、リソースの状態を確認してから再試行してください。バックオフとジッターを使用して 429 と 5xx のみを自動的にやり直します。
リクエスト
namestring · bodyPublic name of the collection.minLength 2 · maxLength 120必須slugstring · body単一の公開ナメクジ。maxLength 80オプションdescriptionstring · bodyコレクションの説明。maxLength 1000オプションimagestring · bodyHTTPS のカバー画像。uriオプションoffer_idsarray · bodyOffers displayed in the collection.オプションactiveboolean · bodyコレクションを公開します。オプションAuthorization
Bearer ach_live_...Accept
application/json範囲
store:write実行ファイルの例
curl
curl -X POST 'https://achadu.com/api/v1/store/collections' \
-H 'Authorization: Bearer ach_live_...' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"name": "My integration",
"slug": "string",
"description": "string",
"image": "https://cdn.example.com/image.jpg"
}'応答とエラー
すべての応答には request_id が含まれます。リストにはページネーションが追加されます。可変リソースは、操作後に永続化された状態を返します。
201 application/json
{
"data": {
"id": "site_01J...",
"subdomain": "mystore",
"name": "Ana's Finds",
"theme": "light",
"active": 1,
"domain_verified": 1
},
"created": true,
"request_id": "req_01J..."
}201Resource created and persisted.400Invalid parameter, body or transition.401キーが見つからない、無効、期限切れ、または取り消されています。402アカウント プランでは、このインターフェイスはリリースされません。403A chave precisa do escopo store:write.404このアカウントには機能が存在しません。409The current state prevents this operation.413The JSON body exceeds 128 KB.4291 分あたり 120 リクエストのウィンドウを超えました。