Waffo Pancake GraphQL API は、すべてのデータへの読み取り専用 アクセスを提供します。書き込みには REST アクションエンドポイントを使用し、クエリには GraphQL を使用してください。
認証: API Key
クエリ深度制限 :ネストの最大深度は 7レベル です。これを超えると 400 が返されます。深度はルートの query フィールドからカウントされます。ネストされたオブジェクト選択ごとに深度が1増加します。スカラーフィールドは深度を増加させません — サブ選択を含むオブジェクト/リストフィールドのみがカウントされます。 query { # depth 1
orders { # depth 2
id # (scalar, no depth increase)
payments { # depth 3
id
refunds { # depth 4
id
refundTicket { # depth 5
id
versions { # depth 6
id
reviewedByMerchant { # depth 7 (limit)
id # OK -- scalar at depth 7
# store { ... } # Would be depth 8 -- REJECTED
}
}
}
}
}
}
}
クエリが制限を超える場合は、複数のクエリに分割するか、不要なネストレベルを削除して簡素化してください。
リクエストの実行
リクエストボディ
フィールド 型 必須 説明 querystring はい GraphQL クエリ文字列 variablesobject いいえ クエリ変数
SDK
TypeScript (fetch)
Java
Python
Go
Rust
C
C++
cURL
wget
import { WaffoPancake } from "@waffo/pancake-ts" ;
const client = new WaffoPancake ({
merchantId: process . env . WAFFO_MERCHANT_ID ! ,
privateKey: process . env . WAFFO_PRIVATE_KEY ! ,
});
interface StoresQuery {
stores : Array <{ id : string ; name : string ; status : string }>;
}
const result = await client . graphql . query < StoresQuery >({
query: `{ stores { id name status } }` ,
});
console . log ( result . stores );
// => [{ id: "STO_2aUyqjCzEIiEcYMKj7TZtw", name: "My Store", status: "active" }]
ステータスコード
ステータス 説明 200 クエリ成功(GraphQL エラーはレスポンスボディの errors フィールドに含まれます) 400 クエリなし / 深度超過 / 無効な環境 / ロールなしまたは無効なロール 401 認証失敗 403 操作タイプが許可されていません(Query のみサポート) 500 内部サーバーエラー
スキーマイントロスペクション
推奨: 標準の GraphQL イントロスペクションを使用してスキーマ全体を確認してください。これにより、常に最新の型とフィールドで作業できます。
利用可能なすべてのクエリを確認
query {
__schema {
queryType {
fields {
name
description
args {
name
type { name kind }
}
}
}
}
}
型のフィールドを確認
query {
__type ( name : "Store" ) {
name
fields {
name
type { name kind ofType { name } }
}
}
}
API Key authentication gives you access to 18 query types including single-entity queries, list queries with filters, count queries, and analytics queries.
フィルタリング
GraphQL クエリは型付きフィルターオブジェクトを使用したフィルタリングをサポートしています:
型 演算子 例 StringFiltereq, ne, in, contains{ storeId: { eq: "STO_xxx" } }DateTimeFiltereq, gt, lt, gte, lte{ createdAt: { gte: "2026-01-01" } }IntFiltereq, gt, lt, gte, lte{ amount: { gte: 1000 } }BooleanFiltereq{ isActive: { eq: true } }
query {
onetimeProducts (
filter : {
storeId : { eq : "STO_3bVzrkD0FJjFdZNLk8Ualx" }
status : { eq : "active" }
}
) {
id
name
prices
}
}
ページネーション
ページネーションには limit と offset を使用します。*Count クエリを使用して合計件数を取得します。
query {
onetimeProducts (
filter : { storeId : { eq : "STO_3bVzrkD0FJjFdZNLk8Ualx" } }
limit : 10
offset : 0
) {
id
name
}
onetimeProductsCount (
filter : { storeId : { eq : "STO_3bVzrkD0FJjFdZNLk8Ualx" } }
)
}
パラメーター 型 説明 limitinteger Maximum number of results to return offsetinteger Number of results to skip
環境固有のフィールド
API Key の環境は、返される商品データに影響します:
version — Returns the version for the specified environment
status — Returns the status in the specified environment
まだ公開されていない場合、商品はテストで active でも本番で inactive の場合があります。
クエリ例
ストアと商品 ストア、単発商品、サブスクリプション商品、商品バージョンのクエリ
注文と支払い 注文、サブスクリプション注文、支払い、返金チケットのクエリ
アナリティクス 収益統計、支払い分析、トレンド分析、顧客インサイト