Revost Admin API
104 endpoints across 33 resource groups
System
/api/v1/health
ヘルスチェック
サーバーの動作状態を確認するエンドポイント(認証不要)
Responses
curl -X GET "http://localhost:8081/api/v1/health"const response = await fetch("http://localhost:8081/api/v1/health", {
method: "GET",
});
const data = await response.json();AdminUsers
/api/v1/admin-users/me
管理者ユーザー情報取得
認証された Firebase UID に紐づく管理者ユーザー情報を取得します(管理者認証必須)
Responses
Response Schema (200)
管理者ユーザー(レスポンス用)
管理者ユーザーID
Firebase UID
表示名
curl -X GET "http://localhost:8081/api/v1/admin-users/me" \
-H "Authorization: Bearer <token>"{
"admin_user": {
"id": "string",
"firebase_uid": "string",
"name": "string"
}
}const response = await fetch("http://localhost:8081/api/v1/admin-users/me", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/admin-users/me
管理者ユーザー登録
Firebase ユーザーに紐づく管理者レコードを新規作成します(初回のみ、管理者認証必須)
Request Body
管理者名
Responses
Response Schema (201)
作成された管理者ユーザーID
curl -X POST "http://localhost:8081/api/v1/admin-users/me" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'const response = await fetch("http://localhost:8081/api/v1/admin-users/me", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string"
})
});
const data = await response.json();Gifts
/api/v1/gifts
ギフト一覧
ギフト一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
offset | integer (int32) | — |
is_active | boolean | — |
Responses
Response Schema (200)
ギフトID
ギフト名
ギフト画像URL
ギフト種別(一意)
基本コインコスト(active GiftPriceVersion から取得、未設定時は null)
有効/無効フラグ
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts" \
-H "Authorization: Bearer <token>"{
"gifts": [
{
"id": "string",
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"total_count": 0
}const response = await fetch("http://localhost:8081/api/v1/gifts", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts
ギフト作成
新しいギフトを作成します(管理者認証必須)
Request Body
ギフト名
ギフト画像URL
ギフト種別
基本コインコスト
還元率(0〜1)
有効/無効フラグ(デフォルト: true)
Responses
Response Schema (201)
作成されたギフトID
ギフト画像URL
基本コインコスト
curl -X POST "http://localhost:8081/api/v1/gifts" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"return_rate": 0,
"is_active": true
}'const response = await fetch("http://localhost:8081/api/v1/gifts", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"return_rate": 0,
"is_active": true
})
});
const data = await response.json();/api/v1/gifts/{gift_id}
ギフト詳細
ギフト詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Responses
Response Schema (200)
ギフトID
ギフト名
ギフト画像URL
ギフト種別(一意)
基本コインコスト(active GiftPriceVersion から取得、未設定時は null)
有効/無効フラグ
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}
ギフト更新
ギフトを更新します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Request Body
ギフト名
ギフト画像URL
ギフト種別
基本コインコスト
還元率(0〜1)
有効/無効フラグ
Responses
curl -X PATCH "http://localhost:8081/api/v1/gifts/{gift_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"return_rate": 0,
"is_active": true
}'const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"image_url": "https://example.com",
"type": "string",
"base_coin_cost": 0,
"return_rate": 0,
"is_active": true
})
});
const data = await response.json();/api/v1/gifts/{gift_id}
ギフト削除
ギフトを削除します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Responses
curl -X DELETE "http://localhost:8081/api/v1/gifts/{gift_id}" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();GiftVersions
/api/v1/gifts/{gift_id}/versions
表示バージョン一覧
指定ギフトの表示バージョン一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
status | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
ギフト名
ギフト画像URL
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/versions" \
-H "Authorization: Bearer <token>"{
"versions": [
{
"id": "string",
"gift_id": "string",
"name": "string",
"image_url": "https://example.com",
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/versions
表示バージョン作成
draft 状態の新しい表示バージョンを作成します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Request Body
ギフト名
ギフト画像URL
Responses
Response Schema (201)
作成されたバージョンID
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"image_url": "https://example.com"
}'const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"image_url": "https://example.com"
})
});
const data = await response.json();/api/v1/gifts/{gift_id}/versions/{version_id}
表示バージョン詳細
指定バージョンの詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
ギフト名
ギフト画像URL
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"gift_id": "string",
"name": "string",
"image_url": "https://example.com",
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/versions/{version_id}/activate
表示バージョン有効化
draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/activate" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/activate", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/versions/{version_id}/retire
表示バージョン廃止
active → retired に遷移します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/retire" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/retire", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();GiftPriceVersions
/api/v1/gifts/{gift_id}/price-versions
価格バージョン一覧
指定ギフトの価格バージョン一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
status | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
コイン消費量
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions" \
-H "Authorization: Bearer <token>"{
"versions": [
{
"id": "string",
"gift_id": "string",
"base_coin_cost": 0,
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/price-versions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/price-versions
価格バージョン作成
draft 状態の新しい価格バージョンを作成します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Request Body
コイン消費量(1以上)
Responses
Response Schema (201)
作成されたバージョンID
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"base_coin_cost": 0
}'const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/price-versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_coin_cost": 0
})
});
const data = await response.json();/api/v1/gifts/{gift_id}/price-versions/{version_id}
価格バージョン詳細
指定バージョンの詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
コイン消費量
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"gift_id": "string",
"base_coin_cost": 0,
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/price-versions/{version_id}/activate
価格バージョン有効化
draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/activate" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/activate", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/price-versions/{version_id}/retire
価格バージョン廃止
active → retired に遷移します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/retire" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/retire", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();GiftRewardRuleVersions
/api/v1/gifts/{gift_id}/reward-rule-versions
報酬ルールバージョン一覧
指定ギフトの報酬ルールバージョン一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
status | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
報酬タイプ
固定還元率(reward_type=fixed のとき必須。0.0〜1.0)
抽選テーブルバージョンID(reward_type=random のとき必須)
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions" \
-H "Authorization: Bearer <token>"{
"versions": [
{
"id": "string",
"gift_id": "string",
"reward_type": null,
"return_rate": 0,
"random_draw_table_version_id": "string",
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/reward-rule-versions
報酬ルールバージョン作成
draft 状態の新しい報酬ルールバージョンを作成します。reward_type=random のとき random_draw_table_version_id が必須(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
Request Body
unknownResponses
Response Schema (201)
作成されたバージョンID
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d 'null'const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify(null)
});
const data = await response.json();/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}
報酬ルールバージョン詳細
指定バージョンの詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
Response Schema (200)
バージョンID
ギフトID
報酬タイプ
固定還元率(reward_type=fixed のとき必須。0.0〜1.0)
抽選テーブルバージョンID(reward_type=random のとき必須)
ステータス(draft / active / retired)
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"gift_id": "string",
"reward_type": null,
"return_rate": 0,
"random_draw_table_version_id": "string",
"status": "string",
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/activate
報酬ルールバージョン有効化
draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/activate" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/activate", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/retire
報酬ルールバージョン廃止
active → retired に遷移します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
gift_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/retire" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/retire", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();RandomDrawTables
/api/v1/random-draw-tables
抽選テーブル一覧
ランダム抽選テーブル一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
offset | integer (int32) | — |
Responses
Response Schema (200)
テーブルID
テーブル名
説明
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/random-draw-tables" \
-H "Authorization: Bearer <token>"{
"tables": [
{
"id": "string",
"name": "string",
"description": "string",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"total_count": 0
}const response = await fetch("http://localhost:8081/api/v1/random-draw-tables", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/random-draw-tables
抽選テーブル作成
新しいランダム抽選テーブルを作成します(管理者認証必須)
Request Body
テーブル名
説明
Responses
Response Schema (201)
作成されたテーブルID
curl -X POST "http://localhost:8081/api/v1/random-draw-tables" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string"
}'const response = await fetch("http://localhost:8081/api/v1/random-draw-tables", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": "string"
})
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}
抽選テーブル詳細
抽選テーブルの詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
Responses
Response Schema (200)
テーブルID
テーブル名
説明
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"name": "string",
"description": "string",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}
抽選テーブル更新
抽選テーブルのメタ情報(name / description)を更新します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
Request Body
テーブル名
説明(null でクリア)
Responses
curl -X PATCH "http://localhost:8081/api/v1/random-draw-tables/{table_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string"
}'const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": "string"
})
});
const data = await response.json();RandomDrawTableVersions
/api/v1/random-draw-tables/{table_id}/versions
抽選テーブルバージョン一覧
指定テーブルのバージョン一覧を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
status | string | — |
Responses
Response Schema (200)
バージョンID
テーブルID
全アイテム weight の合計
ステータス(draft / active / retired)
アイテム一覧(詳細取得時のみ)
アイテムID
表示ラベル(例: 大当たり: 100コイン)
報酬コイン数
抽選重み(正の整数)
表示順
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions" \
-H "Authorization: Bearer <token>"{
"versions": [
{
"id": "string",
"table_id": "string",
"total_weight": 0,
"status": "string",
"items": [
{
"id": "string",
"label": "string",
"reward_coin_amount": 0,
"weight": 0,
"sort_order": 0
}
],
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}/versions
抽選テーブルバージョン作成
draft 状態の新しいバージョンをアイテム込みで作成します。total_weight は自動計算されます(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
Request Body
アイテム一覧(1件以上必須)
表示ラベル
報酬コイン数(0以上)
抽選重み(1以上)
表示順
Responses
Response Schema (201)
作成されたバージョンID
全 weight の合計(activate 時に検証に使用)
curl -X POST "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"label": "string",
"reward_coin_amount": 0,
"weight": 0,
"sort_order": 0
}
]
}'const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"items": [
{
"label": "string",
"reward_coin_amount": 0,
"weight": 0,
"sort_order": 0
}
]
})
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}/versions/{version_id}
抽選テーブルバージョン詳細
指定バージョンの詳細(アイテム一覧込み)を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
Response Schema (200)
バージョンID
テーブルID
全アイテム weight の合計
ステータス(draft / active / retired)
アイテム一覧(詳細取得時のみ)
アイテムID
表示ラベル(例: 大当たり: 100コイン)
報酬コイン数
抽選重み(正の整数)
表示順
有効化日時
廃止日時
作成した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}" \
-H "Authorization: Bearer <token>"{
"id": "string",
"table_id": "string",
"total_weight": 0,
"status": "string",
"items": [
{
"id": "string",
"label": "string",
"reward_coin_amount": 0,
"weight": 0,
"sort_order": 0
}
],
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}/versions/{version_id}/activate
抽選テーブルバージョン有効化
draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/activate" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/activate", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/random-draw-tables/{table_id}/versions/{version_id}/retire
抽選テーブルバージョン廃止
active → retired に遷移します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
table_id REQUIRED | string | — |
version_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/retire" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/retire", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Admin/GachaPools
/api/v1/gacha-pools
Admin: ガチャプール一覧取得
Responses
Response Schema (200)
curl -X GET "http://localhost:8081/api/v1/gacha-pools" \
-H "Authorization: Bearer <token>"{
"pools": [
{
"pool_id": "string",
"name": "string",
"description": "string",
"created_at": "2024-01-01T00:00:00Z",
"active_version": {}
}
]
}const response = await fetch("http://localhost:8081/api/v1/gacha-pools", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gacha-pools
Admin: ガチャプール作成
Request Body
Responses
Response Schema (201)
curl -X POST "http://localhost:8081/api/v1/gacha-pools" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string"
}'const response = await fetch("http://localhost:8081/api/v1/gacha-pools", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": "string"
})
});
const data = await response.json();/api/v1/gacha-pools/{pool_id}
Admin: ガチャプール詳細取得
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id REQUIRED | string | — |
Responses
Response Schema (200)
ガチャ報酬種別
curl -X GET "http://localhost:8081/api/v1/gacha-pools/{pool_id}" \
-H "Authorization: Bearer <token>"{
"pool_id": "string",
"name": "string",
"description": "string",
"created_at": "2024-01-01T00:00:00Z",
"versions": [
{
"version_id": "string",
"status": "string",
"coin_cost_per_pull": 0,
"batch_coin_cost": 0,
"batch_pull_count": 0,
"activated_at": "2024-01-01T00:00:00Z",
"retired_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z",
"items": [
{
"item_id": "string",
"reward_type": "GIFT_BAG_ITEM",
"label": "string",
"weight": 0,
"sort_order": 0,
"gift_id": "string",
"gift_quantity": 0,
"reward_expiry_days": 0,
"coin_amount": 0
}
]
}
]
}const response = await fetch("http://localhost:8081/api/v1/gacha-pools/{pool_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gacha-pools/{pool_id}/versions
Admin: ガチャプールバージョン作成
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id REQUIRED | string | — |
Request Body
ガチャ報酬種別
Responses
Response Schema (201)
curl -X POST "http://localhost:8081/api/v1/gacha-pools/{pool_id}/versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"coin_cost_per_pull": 0,
"batch_coin_cost": 0,
"batch_pull_count": 0,
"items": [
{
"reward_type": "GIFT_BAG_ITEM",
"label": "string",
"weight": 0,
"sort_order": 0,
"gift_id": "string",
"gift_quantity": 0,
"reward_expiry_days": 0,
"coin_amount": 0
}
]
}'const response = await fetch("http://localhost:8081/api/v1/gacha-pools/{pool_id}/versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"coin_cost_per_pull": 0,
"batch_coin_cost": 0,
"batch_pull_count": 0,
"items": [
{
"reward_type": "GIFT_BAG_ITEM",
"label": "string",
"weight": 0,
"sort_order": 0,
"gift_id": "string",
"gift_quantity": 0,
"reward_expiry_days": 0,
"coin_amount": 0
}
]
})
});
const data = await response.json();Admin/GachaPoolVersions
/api/v1/gacha-pool-versions/{version_id}/activate
Admin: ガチャプールバージョンをアクティブ化
Parameters
| Parameter | Type | Description |
|---|---|---|
version_id REQUIRED | string | — |
Responses
Response Schema (200)
curl -X POST "http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/activate" \
-H "Authorization: Bearer <token>"{
"version_id": "string",
"status": "string",
"activated_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/activate", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gacha-pool-versions/{version_id}/retire
Admin: ガチャプールバージョンをリタイア
Parameters
| Parameter | Type | Description |
|---|---|---|
version_id REQUIRED | string | — |
Responses
Response Schema (200)
curl -X POST "http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/retire" \
-H "Authorization: Bearer <token>"{
"version_id": "string",
"status": "string",
"retired_at": "2024-01-01T00:00:00Z"
}const response = await fetch("http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/retire", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Campaigns
/api/v1/campaigns
キャンペーン一覧
キャンペーンを一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
offset | integer (int32) | — |
status | string | — |
Responses
Response Schema (200)
キャンペーンID
キャンペーン名
説明
ステータス
開始日時
終了日時
予算コイン
付与済みコイン
ユーザーごとの上限コイン
1回あたり付与コイン
付与コインの有効期限(日)
作成管理者ID
最終更新管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/campaigns" \
-H "Authorization: Bearer <token>"{
"campaigns": [
{
"id": "string",
"name": "string",
"description": "string",
"status": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"granted_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0,
"admin_user_id": "string",
"updated_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"total_count": 0
}const response = await fetch("http://localhost:8081/api/v1/campaigns", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/campaigns
キャンペーン作成
キャンペーンを作成します(管理者認証必須)
Request Body
キャンペーン名
説明
開始日時
終了日時
予算コイン
ユーザーごとの上限コイン
1回あたり付与コイン
付与コインの有効期限(日)
Responses
Response Schema (201)
作成されたキャンペーンID
curl -X POST "http://localhost:8081/api/v1/campaigns" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0
}'const response = await fetch("http://localhost:8081/api/v1/campaigns", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0
})
});
const data = await response.json();/api/v1/campaigns/{campaign_id}
キャンペーン詳細
キャンペーン詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
campaign_id REQUIRED | string | — |
Responses
Response Schema (200)
キャンペーンID
キャンペーン名
説明
ステータス
開始日時
終了日時
予算コイン
付与済みコイン
ユーザーごとの上限コイン
1回あたり付与コイン
付与コインの有効期限(日)
作成管理者ID
最終更新管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/campaigns/{campaign_id}" \
-H "Authorization: Bearer <token>"{
"campaign": {
"id": "string",
"name": "string",
"description": "string",
"status": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"granted_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0,
"admin_user_id": "string",
"updated_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/campaigns/{campaign_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/campaigns/{campaign_id}
キャンペーン更新
キャンペーンを更新します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
campaign_id REQUIRED | string | — |
Request Body
キャンペーン名
説明。null 指定でクリア
ステータス
開始日時。null 指定でクリア
終了日時。null 指定でクリア
予算コイン。null 指定でクリア
ユーザーごとの上限コイン。null 指定でクリア
1回あたり付与コイン。null 指定でクリア
付与コインの有効期限(日)。null 指定でクリア
Responses
curl -X PATCH "http://localhost:8081/api/v1/campaigns/{campaign_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"status": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0
}'const response = await fetch("http://localhost:8081/api/v1/campaigns/{campaign_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": "string",
"status": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"budget_coin": 0,
"per_user_limit_coin": 0,
"coin_amount_per_grant": 0,
"expires_in_days": 0
})
});
const data = await response.json();CoinAdjustments
/api/v1/coin-adjustments
コイン調整一覧
コイン手動付与履歴を一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
operation_type | string | — |
campaign_id | string | — |
admin_user_id | string | — |
Responses
Response Schema (200)
コイン調整ID
対象ユーザーID
実行管理者ID
調整コイン数
操作種別
処理ステータス
キャンペーンID
調整理由の詳細
冪等性キー
付与コインの有効期限
作成されたコイントランザクションID
処理後の残高
処理完了日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-adjustments" \
-H "Authorization: Bearer <token>"{
"coin_adjustments": [
{
"id": "string",
"user_id": "string",
"admin_user_id": "string",
"amount_coin": 0,
"operation_type": "MANUAL_GRANT",
"status": "succeeded",
"campaign_id": "string",
"reason_detail": "string",
"idempotency_key": "string",
"expires_at": "2024-01-01T00:00:00Z",
"coin_transaction_id": "string",
"balance_after_coin": 0,
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-adjustments", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-adjustments
コイン調整作成
ユーザーのコイン残高を調整します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
対象ユーザーID
調整コイン数(1 〜 100,000 の正の整数)
操作種別。CAMPAIGN_GRANT の場合は campaign_id 必須、MANUAL_GRANT の場合は campaign_id 指定不可
キャンペーンID
調整理由の詳細
付与コインの有効期限
Responses
Response Schema (201)
作成されたコイン調整ID
対象ユーザーID
実行管理者ID
調整コイン数
操作種別
処理ステータス
キャンペーンID
調整理由の詳細
冪等性キー
付与コインの有効期限
作成されたコイントランザクションID
処理後の残高
処理完了日時
作成日時
curl -X POST "http://localhost:8081/api/v1/coin-adjustments" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "string",
"amount_coin": 0,
"operation_type": "MANUAL_GRANT",
"campaign_id": "string",
"reason_detail": "string",
"expires_at": "2024-01-01T00:00:00Z"
}'const response = await fetch("http://localhost:8081/api/v1/coin-adjustments", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"user_id": "string",
"amount_coin": 0,
"operation_type": "MANUAL_GRANT",
"campaign_id": "string",
"reason_detail": "string",
"expires_at": "2024-01-01T00:00:00Z"
})
});
const data = await response.json();/api/v1/coin-adjustments/{adjustment_id}
コイン調整詳細
コイン調整詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
adjustment_id REQUIRED | string | — |
Responses
Response Schema (200)
コイン調整ID
対象ユーザーID
実行管理者ID
調整コイン数
操作種別
処理ステータス
キャンペーンID
調整理由の詳細
冪等性キー
付与コインの有効期限
作成されたコイントランザクションID
処理後の残高
処理完了日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-adjustments/{adjustment_id}" \
-H "Authorization: Bearer <token>"{
"coin_adjustment": {
"id": "string",
"user_id": "string",
"admin_user_id": "string",
"amount_coin": 0,
"operation_type": "MANUAL_GRANT",
"status": "succeeded",
"campaign_id": "string",
"reason_detail": "string",
"idempotency_key": "string",
"expires_at": "2024-01-01T00:00:00Z",
"coin_transaction_id": "string",
"balance_after_coin": 0,
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-adjustments/{adjustment_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();GiftBagItems
/api/v1/gift-bag-items
ギフトバッグアイテム一覧
ギフトバッグアイテムを一覧取得します(管理者認証必須)。granted_by_admin_id で絞り込むことで管理者付与分の履歴を参照できます。
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
gift_id | string | — |
source_type | string | — |
granted_by_admin_id | string | — |
remaining_only | string | — |
Responses
Response Schema (200)
ギフトバッグアイテムID
対象ユーザーID
ギフトID
付与個数
残り個数
入手経路
有効期限
付与した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gift-bag-items" \
-H "Authorization: Bearer <token>"{
"gift_bag_items": [
{
"id": "string",
"user_id": "string",
"gift_id": "string",
"quantity": 0,
"remaining_qty": 0,
"source_type": "string",
"expires_at": "2024-01-01T00:00:00Z",
"granted_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/gift-bag-items", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gift-bag-items/{item_id}
ギフトバッグアイテム詳細
ギフトバッグアイテムの詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
item_id REQUIRED | string | — |
Responses
Response Schema (200)
ギフトバッグアイテムID
対象ユーザーID
ギフトID
付与個数
残り個数
入手経路
有効期限
付与した管理者ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/gift-bag-items/{item_id}" \
-H "Authorization: Bearer <token>"{
"gift_bag_item": {
"id": "string",
"user_id": "string",
"gift_id": "string",
"quantity": 0,
"remaining_qty": 0,
"source_type": "string",
"expires_at": "2024-01-01T00:00:00Z",
"granted_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/gift-bag-items/{item_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();GiftBagGrants
/api/v1/gift-bag-grants
ギフトバッグアイテム付与
指定ユーザーにギフトバッグアイテムを付与します(管理者認証必須)
Request Body
対象ユーザーID
ギフトID
付与個数
有効期限
入手経路(login_bonus, event_reward 等)
Responses
Response Schema (201)
作成されたギフトバッグアイテムID
curl -X POST "http://localhost:8081/api/v1/gift-bag-grants" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "string",
"gift_id": "string",
"quantity": 0,
"expires_at": "2024-01-01T00:00:00Z",
"source_type": "string"
}'const response = await fetch("http://localhost:8081/api/v1/gift-bag-grants", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"user_id": "string",
"gift_id": "string",
"quantity": 0,
"expires_at": "2024-01-01T00:00:00Z",
"source_type": "string"
})
});
const data = await response.json();Uploads
/api/v1/uploads/gift-image
ギフト画像アップロード
ギフト画像ファイルをアップロードします(管理者認証必須)
Responses
Response Schema (201)
アップロード後の画像URL
curl -X POST "http://localhost:8081/api/v1/uploads/gift-image" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/uploads/gift-image", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();AdminPaymentRefunds
/api/v1/payment-refunds
返金一覧取得
返金レコードを一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
status | string | — |
Responses
Response Schema (200)
返金ID
決済ID
返金起点
返金種別
返金範囲
返金理由
返金ステータス
返金金額(円)
回収対象コイン数
実際に残高から回収できたコイン数
回収できず債務化したコイン数
admin が指定した悪意ある受取人からも回収するか
最後の処理エラー
返金要求日時
処理開始日時
処理日時
最後に操作した admin user ID
作成日時
admin が明示指定した受取人回収対象
受取人回収対象ID
返金ID
対象ギフト取引ID
回収対象の受取人 coin account ID
回収上限コイン数
実際に残高から回収できたコイン数
回収できず債務化したコイン数
受取人回収対象の状態
悪意・共謀ありと判断した理由
問い合わせIDや外部証跡などの調査メモ
対象指定した admin user ID
処理日時
作成日時
curl -X GET "http://localhost:8081/api/v1/payment-refunds" \
-H "Authorization: Bearer <token>"{
"refunds": [
{
"id": "string",
"payment_id": "string",
"source": "admin",
"refund_type": "voluntary",
"refund_scope": "full",
"refund_reason": "string",
"status": "pending",
"refund_amount_money": 0,
"refund_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"recover_from_recipients": true,
"last_error": "string",
"requested_at": "2024-01-01T00:00:00Z",
"processing_started_at": "2024-01-01T00:00:00Z",
"processed_at": "2024-01-01T00:00:00Z",
"admin_user_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"recipient_recovery_targets": [
{
"id": "string",
"payment_refund_id": "string",
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"status": "pending",
"decision_reason": "string",
"evidence_note": "string",
"decided_by_admin_user_id": "string",
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
]
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/payment-refunds", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payment-refunds
返金起票
管理者が返金処理を起票します。同じ Idempotency-Key と同じ payload の再送は同じ返金IDを返し、同じ Idempotency-Key で異なる payload は 409 を返します。
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
決済ID
返金種別(自主返金 / チャージバック)
返金理由
返金金額(円)
回収対象コイン数
admin が指定した悪意ある受取人からも回収するか
悪意ありと判断した受取人回収対象。recover_from_recipients=true の場合は必須
対象ギフト取引ID。返金対象 payment 由来の coin lot で送られたギフトだけ指定可能
回収対象の受取人 coin account ID
回収上限コイン数。返金対象 payment 由来の受取相当額を超えない値
悪意・共謀ありと判断した理由
問い合わせIDや外部証跡などの調査メモ
Responses
Response Schema (201)
返金ID
ステータス
curl -X POST "http://localhost:8081/api/v1/payment-refunds" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"payment_id": "string",
"refund_type": "voluntary",
"refund_reason": "string",
"refund_amount_money": 0,
"refund_coin_amount": 0,
"recover_from_recipients": true,
"recipient_recovery_targets": [
{
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"decision_reason": "string",
"evidence_note": "string"
}
]
}'const response = await fetch("http://localhost:8081/api/v1/payment-refunds", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"payment_id": "string",
"refund_type": "voluntary",
"refund_reason": "string",
"refund_amount_money": 0,
"refund_coin_amount": 0,
"recover_from_recipients": true,
"recipient_recovery_targets": [
{
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"decision_reason": "string",
"evidence_note": "string"
}
]
})
});
const data = await response.json();/api/v1/payment-refunds/{refund_id}
返金詳細取得
返金レコード詳細を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
refund_id REQUIRED | string | — |
Responses
Response Schema (200)
返金ID
決済ID
返金起点
返金種別
返金範囲
返金理由
返金ステータス
返金金額(円)
回収対象コイン数
実際に残高から回収できたコイン数
回収できず債務化したコイン数
admin が指定した悪意ある受取人からも回収するか
最後の処理エラー
返金要求日時
処理開始日時
処理日時
最後に操作した admin user ID
作成日時
admin が明示指定した受取人回収対象
受取人回収対象ID
返金ID
対象ギフト取引ID
回収対象の受取人 coin account ID
回収上限コイン数
実際に残高から回収できたコイン数
回収できず債務化したコイン数
受取人回収対象の状態
悪意・共謀ありと判断した理由
問い合わせIDや外部証跡などの調査メモ
対象指定した admin user ID
処理日時
作成日時
curl -X GET "http://localhost:8081/api/v1/payment-refunds/{refund_id}" \
-H "Authorization: Bearer <token>"{
"refund": {
"id": "string",
"payment_id": "string",
"source": "admin",
"refund_type": "voluntary",
"refund_scope": "full",
"refund_reason": "string",
"status": "pending",
"refund_amount_money": 0,
"refund_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"recover_from_recipients": true,
"last_error": "string",
"requested_at": "2024-01-01T00:00:00Z",
"processing_started_at": "2024-01-01T00:00:00Z",
"processed_at": "2024-01-01T00:00:00Z",
"admin_user_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"recipient_recovery_targets": [
{
"id": "string",
"payment_refund_id": "string",
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"status": "pending",
"decision_reason": "string",
"evidence_note": "string",
"decided_by_admin_user_id": "string",
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
]
}
}const response = await fetch("http://localhost:8081/api/v1/payment-refunds/{refund_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payment-refunds/{refund_id}/execute
返金実行
tasks_backend で返金実処理を実行し、処理後の状態を返します。resource id と状態条件で重複実行を防ぐため、Idempotency-Key は要求しません。
Parameters
| Parameter | Type | Description |
|---|---|---|
refund_id REQUIRED | string | — |
Responses
Response Schema (200)
返金ID
現在のステータス
curl -X POST "http://localhost:8081/api/v1/payment-refunds/{refund_id}/execute" \
-H "Authorization: Bearer <token>"{
"refund_id": "string",
"status": "pending"
}const response = await fetch("http://localhost:8081/api/v1/payment-refunds/{refund_id}/execute", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payment-refunds/{refund_id}/fail
返金失敗確定
未完了または要確認の返金を failed に遷移します。resource id と状態条件で重複遷移を防ぐため、Idempotency-Key は要求しません。
Parameters
| Parameter | Type | Description |
|---|---|---|
refund_id REQUIRED | string | — |
Request Body
失敗理由
Responses
curl -X POST "http://localhost:8081/api/v1/payment-refunds/{refund_id}/fail" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'const response = await fetch("http://localhost:8081/api/v1/payment-refunds/{refund_id}/fail", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reason": "string"
})
});
const data = await response.json();/api/v1/payment-refunds/{refund_id}/recipient-recovery-targets
受取人回収対象設定
admin が悪意ありと判断したギフト受取人だけを返金回収対象として設定します
Parameters
| Parameter | Type | Description |
|---|---|---|
refund_id REQUIRED | string | — |
Request Body
悪意ありと判断した受取人回収対象
対象ギフト取引ID。返金対象 payment 由来の coin lot で送られたギフトだけ指定可能
回収対象の受取人 coin account ID
回収上限コイン数。返金対象 payment 由来の受取相当額を超えない値
悪意・共謀ありと判断した理由
問い合わせIDや外部証跡などの調査メモ
Responses
Response Schema (200)
返金ID
受取人回収を使うか
設定した対象数
curl -X PUT "http://localhost:8081/api/v1/payment-refunds/{refund_id}/recipient-recovery-targets" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"recipient_recovery_targets": [
{
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"decision_reason": "string",
"evidence_note": "string"
}
]
}'{
"refund_id": "string",
"recover_from_recipients": true,
"target_count": 0
}const response = await fetch("http://localhost:8081/api/v1/payment-refunds/{refund_id}/recipient-recovery-targets", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"recipient_recovery_targets": [
{
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"decision_reason": "string",
"evidence_note": "string"
}
]
})
});
const data = await response.json();AdminDebts
/api/v1/debts
債務ユーザー一覧
債務があるユーザーの一覧を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
ユーザーID
債務コイン数
最終更新日時
curl -X GET "http://localhost:8081/api/v1/debts" \
-H "Authorization: Bearer <token>"{
"users": [
{
"user_id": "string",
"amount_coin": 0,
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/debts", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/debts/cases/{debt_case_id}/settle
債務手動返済
債務案件に対して手動返済を実行します
Parameters
| Parameter | Type | Description |
|---|---|---|
debt_case_id REQUIRED | string | — |
Request Body
返済コイン数
理由
Responses
curl -X POST "http://localhost:8081/api/v1/debts/cases/{debt_case_id}/settle" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"amount_coin": 0,
"reason": "string"
}'const response = await fetch("http://localhost:8081/api/v1/debts/cases/{debt_case_id}/settle", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount_coin": 0,
"reason": "string"
})
});
const data = await response.json();/api/v1/debts/{user_id}
ユーザー債務詳細
指定ユーザーの債務案件一覧を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
債務案件ID
理由
参照種別
参照ID
元債務コイン数
残債コイン数
ステータス
作成日時
解消日時
curl -X GET "http://localhost:8081/api/v1/debts/{user_id}" \
-H "Authorization: Bearer <token>"{
"debt_cases": [
{
"id": "string",
"reason": "string",
"reference_type": "string",
"reference_id": "string",
"original_amount_coin": 0,
"outstanding_coin": 0,
"status": null,
"created_at": "2024-01-01T00:00:00Z",
"settled_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/debts/{user_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();AdminWithdrawals
/api/v1/withdrawals
出金一覧取得
出金申請を一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
status | string | 出金ステータス |
Responses
Response Schema (200)
出金ID
ユーザーID
対象年月(YYYY-MM)
出金コイン数
総額(円)
手数料(円)
支払額(円)
ステータス
作成日時
支払日時
curl -X GET "http://localhost:8081/api/v1/withdrawals" \
-H "Authorization: Bearer <token>"{
"withdrawals": [
{
"id": "string",
"user_id": "string",
"year_month": "string",
"amount_coin": 0,
"gross_amount_yen": 0,
"fee_amount_yen": 0,
"net_amount_yen": 0,
"status": null,
"created_at": "2024-01-01T00:00:00Z",
"paid_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/withdrawals", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}
出金詳細取得
出金申請詳細を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
Response Schema (200)
出金ID
ユーザーID
対象年月(YYYY-MM)
出金コイン数
総額(円)
手数料(円)
支払額(円)
ステータス
作成日時
支払日時
curl -X GET "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}" \
-H "Authorization: Bearer <token>"{
"withdrawal": {
"id": "string",
"user_id": "string",
"year_month": "string",
"amount_coin": 0,
"gross_amount_yen": 0,
"fee_amount_yen": 0,
"net_amount_yen": 0,
"status": null,
"created_at": "2024-01-01T00:00:00Z",
"paid_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}/approve
出金承認
pending の出金申請を承認し processing へ遷移します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/approve" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/approve", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}/cancel
出金キャンセル
pending の出金申請を cancelled へ遷移します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/cancel" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/cancel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}/fail
出金失敗
processing の出金申請を failed へ遷移します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Request Body
失敗理由
Responses
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/fail" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/fail", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reason": "string"
})
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}/pay
出金支払い完了
processing の出金申請を paid へ遷移します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/pay" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/pay", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();AdminIapProducts
/api/v1/iap-products
IAP商品一覧
IAP商品マスタを一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
offset | integer (int32) | — |
platform | string | — |
is_active | boolean | — |
Responses
Response Schema (200)
IAPプロダクトID
ストア商品ID
プラットフォーム
商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)
付与コイン数
有効フラグ
作成日時
curl -X GET "http://localhost:8081/api/v1/iap-products" \
-H "Authorization: Bearer <token>"{
"iap_products": [
{
"id": "string",
"store_product_id": "string",
"platform": "string",
"product_type": "string",
"coin_amount": 0,
"is_active": true,
"created_at": "2024-01-01T00:00:00Z"
}
],
"total_count": 0
}const response = await fetch("http://localhost:8081/api/v1/iap-products", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/iap-products
IAP商品作成
IAP商品マスタを作成します
Request Body
ストア商品ID
プラットフォーム
商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)
付与コイン数
有効フラグ
Responses
Response Schema (201)
作成ID
curl -X POST "http://localhost:8081/api/v1/iap-products" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"store_product_id": "string",
"platform": "string",
"product_type": "string",
"coin_amount": 0,
"is_active": true
}'const response = await fetch("http://localhost:8081/api/v1/iap-products", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"store_product_id": "string",
"platform": "string",
"product_type": "string",
"coin_amount": 0,
"is_active": true
})
});
const data = await response.json();/api/v1/iap-products/{iap_product_id}
IAP商品詳細
IAP商品マスタを詳細取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
iap_product_id REQUIRED | string | — |
Responses
Response Schema (200)
IAPプロダクト
curl -X GET "http://localhost:8081/api/v1/iap-products/{iap_product_id}" \
-H "Authorization: Bearer <token>"{
"iap_product": null
}const response = await fetch("http://localhost:8081/api/v1/iap-products/{iap_product_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/iap-products/{iap_product_id}
IAP商品更新
IAP商品マスタを更新します
Parameters
| Parameter | Type | Description |
|---|---|---|
iap_product_id REQUIRED | string | — |
Request Body
プラットフォーム
ストア商品ID
商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)
付与コイン数
有効フラグ
Responses
curl -X PATCH "http://localhost:8081/api/v1/iap-products/{iap_product_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"platform": "string",
"store_product_id": "string",
"product_type": "string",
"coin_amount": 0,
"is_active": true
}'const response = await fetch("http://localhost:8081/api/v1/iap-products/{iap_product_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"platform": "string",
"store_product_id": "string",
"product_type": "string",
"coin_amount": 0,
"is_active": true
})
});
const data = await response.json();/api/v1/iap-products/{iap_product_id}
IAP商品削除
IAP商品マスタを削除します
Parameters
| Parameter | Type | Description |
|---|---|---|
iap_product_id REQUIRED | string | — |
Responses
curl -X DELETE "http://localhost:8081/api/v1/iap-products/{iap_product_id}" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8081/api/v1/iap-products/{iap_product_id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/iap-products/{iap_product_id}/price-histories
IAP商品コイン数変更履歴一覧
指定 IAP 商品の coin_amount 変更履歴を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
iap_product_id REQUIRED | string | — |
limit | integer (int32) | — |
offset | integer (int32) | — |
Responses
Response Schema (200)
履歴ID
IAPプロダクトID
変更前コイン数
変更後コイン数
変更した管理者ID
変更日時
curl -X GET "http://localhost:8081/api/v1/iap-products/{iap_product_id}/price-histories" \
-H "Authorization: Bearer <token>"{
"price_histories": [
{
"id": "string",
"iap_product_id": "string",
"previous_coin_amount": 0,
"new_coin_amount": 0,
"changed_by_admin_id": "string",
"changed_at": "2024-01-01T00:00:00Z"
}
],
"total_count": 0
}const response = await fetch("http://localhost:8081/api/v1/iap-products/{iap_product_id}/price-histories", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();AdminCoinExchangeRates
/api/v1/coin-exchange-rates
換金レート一覧
換金レート履歴を一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
レートID
1コインあたり円レート
適用開始日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-exchange-rates" \
-H "Authorization: Bearer <token>"{
"coin_exchange_rates": [
{
"id": "string",
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-exchange-rates", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-exchange-rates
換金レート作成
新しい換金レートを作成します
Request Body
1コインあたり円レート
適用開始日時
Responses
Response Schema (201)
作成ID
curl -X POST "http://localhost:8081/api/v1/coin-exchange-rates" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z"
}'const response = await fetch("http://localhost:8081/api/v1/coin-exchange-rates", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z"
})
});
const data = await response.json();/api/v1/coin-exchange-rates/{rate_id}
換金レート詳細
換金レート詳細を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
rate_id REQUIRED | string | — |
Responses
Response Schema (200)
レートID
1コインあたり円レート
適用開始日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-exchange-rates/{rate_id}" \
-H "Authorization: Bearer <token>"{
"rate": {
"id": "string",
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-exchange-rates/{rate_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-exchange-rates/{rate_id}
換金レート更新
換金レートを更新します
Parameters
| Parameter | Type | Description |
|---|---|---|
rate_id REQUIRED | string | — |
Request Body
1コインあたり円レート
適用開始日時
Responses
curl -X PATCH "http://localhost:8081/api/v1/coin-exchange-rates/{rate_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z"
}'const response = await fetch("http://localhost:8081/api/v1/coin-exchange-rates/{rate_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"rate_yen_per_coin": 0,
"effective_from": "2024-01-01T00:00:00Z"
})
});
const data = await response.json();AdminCoinReward
/api/v1/coin-reward-rule-versions
コイン報酬ルールバージョン一覧
コイン報酬ルールバージョンを一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
reward_type_id | string | — |
is_enabled | string | — |
Responses
Response Schema (200)
ルールバージョンID
報酬種別ID
報酬種別コード
報酬種別名
付与コイン量
参照元種別
有償コインか
出金可能か
有効期限(日)
有効フラグ
適用開始
適用終了(未設定で無期限)
優先度
作成管理者ID
作成日時
更新日時
supersede された日時(current head の場合は null)
supersede 先ルールバージョンID(current head の場合は null)
curl -X GET "http://localhost:8081/api/v1/coin-reward-rule-versions" \
-H "Authorization: Bearer <token>"{
"coin_reward_rule_versions": [
{
"id": "string",
"reward_type_id": "string",
"reward_type_code": "string",
"reward_type_name": "string",
"amount_coin": 0,
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"expires_in_days": 0,
"is_enabled": true,
"valid_from": "2024-01-01T00:00:00Z",
"valid_to": "2024-01-01T00:00:00Z",
"priority": 0,
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"superseded_at": "2024-01-01T00:00:00Z",
"superseded_by_rule_version_id": "string"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-rule-versions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-reward-rule-versions
コイン報酬ルールバージョン作成
コイン報酬ルールバージョンを新規作成します(有効かつ期間重複は不可)
Request Body
報酬種別ID
付与コイン量
参照元種別
有償コインか
出金可能か
有効期限(日)
有効フラグ
適用開始
適用終了
優先度
変更理由
Responses
Response Schema (201)
作成ID
curl -X POST "http://localhost:8081/api/v1/coin-reward-rule-versions" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reward_type_id": "string",
"amount_coin": 0,
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"expires_in_days": 0,
"is_enabled": true,
"valid_from": "2024-01-01T00:00:00Z",
"valid_to": "2024-01-01T00:00:00Z",
"priority": 0,
"reason": "string"
}'const response = await fetch("http://localhost:8081/api/v1/coin-reward-rule-versions", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reward_type_id": "string",
"amount_coin": 0,
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"expires_in_days": 0,
"is_enabled": true,
"valid_from": "2024-01-01T00:00:00Z",
"valid_to": "2024-01-01T00:00:00Z",
"priority": 0,
"reason": "string"
})
});
const data = await response.json();/api/v1/coin-reward-rule-versions/{rule_version_id}
コイン報酬ルールバージョン詳細
コイン報酬ルールバージョンを取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
rule_version_id REQUIRED | string | — |
Responses
Response Schema (200)
ルールバージョンID
報酬種別ID
報酬種別コード
報酬種別名
付与コイン量
参照元種別
有償コインか
出金可能か
有効期限(日)
有効フラグ
適用開始
適用終了(未設定で無期限)
優先度
作成管理者ID
作成日時
更新日時
supersede された日時(current head の場合は null)
supersede 先ルールバージョンID(current head の場合は null)
curl -X GET "http://localhost:8081/api/v1/coin-reward-rule-versions/{rule_version_id}" \
-H "Authorization: Bearer <token>"{
"coin_reward_rule_version": {
"id": "string",
"reward_type_id": "string",
"reward_type_code": "string",
"reward_type_name": "string",
"amount_coin": 0,
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"expires_in_days": 0,
"is_enabled": true,
"valid_from": "2024-01-01T00:00:00Z",
"valid_to": "2024-01-01T00:00:00Z",
"priority": 0,
"created_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"superseded_at": "2024-01-01T00:00:00Z",
"superseded_by_rule_version_id": "string"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-rule-versions/{rule_version_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-reward-rule-versions/{rule_version_id}
コイン報酬ルールバージョン更新
有効/無効の切り替えまたは適用終了日時の更新のみ可能です
Parameters
| Parameter | Type | Description |
|---|---|---|
rule_version_id REQUIRED | string | — |
Request Body
有効フラグ
適用終了(ウィンドウを閉じる等)
変更理由
Responses
curl -X PATCH "http://localhost:8081/api/v1/coin-reward-rule-versions/{rule_version_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"is_enabled": true,
"valid_to": "2024-01-01T00:00:00Z",
"reason": "string"
}'const response = await fetch("http://localhost:8081/api/v1/coin-reward-rule-versions/{rule_version_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"is_enabled": true,
"valid_to": "2024-01-01T00:00:00Z",
"reason": "string"
})
});
const data = await response.json();/api/v1/coin-reward-types
コイン報酬種別一覧
コイン報酬種別を一覧取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
種別ID
コード
名称
説明
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/coin-reward-types" \
-H "Authorization: Bearer <token>"{
"coin_reward_types": [
{
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-types", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-reward-types/{reward_type_id}
コイン報酬種別詳細
コイン報酬種別を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
reward_type_id REQUIRED | string | — |
Responses
Response Schema (200)
種別ID
コード
名称
説明
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/coin-reward-types/{reward_type_id}" \
-H "Authorization: Bearer <token>"{
"coin_reward_type": {
"id": "string",
"code": "string",
"name": "string",
"description": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-types/{reward_type_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();CoinRewardAdminAuditLogs
/api/v1/coin-reward-admin-audit-logs
コイン報酬管理者監査ログ一覧
コイン報酬まわりの管理者操作ログを一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
performed_by_admin_id | string | — |
action | string | — |
entity_type | string | — |
entity_id | string | — |
reward_type_id | string | — |
rule_version_id | string | — |
Responses
Response Schema (200)
ログID
エンティティ種別
エンティティID
報酬種別ID
ルールバージョンID
アクション
理由
実行管理者ID
変更前スナップショット
変更後スナップショット
メタデータ
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-reward-admin-audit-logs" \
-H "Authorization: Bearer <token>"{
"coin_reward_admin_audit_logs": [
{
"id": "string",
"entity_type": "string",
"entity_id": "string",
"reward_type_id": "string",
"rule_version_id": "string",
"action": "string",
"reason": "string",
"performed_by_admin_id": "string",
"before_snapshot": null,
"after_snapshot": null,
"metadata": null,
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-admin-audit-logs", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-reward-admin-audit-logs/{audit_log_id}
コイン報酬管理者監査ログ詳細
監査ログ詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
audit_log_id REQUIRED | string | — |
Responses
Response Schema (200)
ログID
エンティティ種別
エンティティID
報酬種別ID
ルールバージョンID
アクション
理由
実行管理者ID
変更前スナップショット
変更後スナップショット
メタデータ
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-reward-admin-audit-logs/{audit_log_id}" \
-H "Authorization: Bearer <token>"{
"coin_reward_admin_audit_log": {
"id": "string",
"entity_type": "string",
"entity_id": "string",
"reward_type_id": "string",
"rule_version_id": "string",
"action": "string",
"reason": "string",
"performed_by_admin_id": "string",
"before_snapshot": null,
"after_snapshot": null,
"metadata": null,
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-reward-admin-audit-logs/{audit_log_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();DebtSettlements
/api/v1/debt-settlements
債務精算一覧
債務精算履歴を一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
debt_case_id | string | — |
Responses
Response Schema (200)
精算ID
債務ケースID
対象ユーザーID
精算コイン数
対応するコイン取引ID
作成日時
curl -X GET "http://localhost:8081/api/v1/debt-settlements" \
-H "Authorization: Bearer <token>"{
"debt_settlements": [
{
"id": "string",
"debt_case_id": "string",
"user_id": "string",
"amount_coin": 0,
"coin_transaction_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/debt-settlements", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/debt-settlements/{debt_settlement_id}
債務精算詳細
債務精算詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
debt_settlement_id REQUIRED | string | — |
Responses
Response Schema (200)
精算ID
債務ケースID
対象ユーザーID
精算コイン数
対応するコイン取引ID
作成日時
curl -X GET "http://localhost:8081/api/v1/debt-settlements/{debt_settlement_id}" \
-H "Authorization: Bearer <token>"{
"debt_settlement": {
"id": "string",
"debt_case_id": "string",
"user_id": "string",
"amount_coin": 0,
"coin_transaction_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/debt-settlements/{debt_settlement_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();CoinLots
/api/v1/coin-lots
コインロット一覧
コインロットを横断的に一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
source_type | string | — |
is_paid | string | — |
is_withdrawable | string | — |
remaining_only | string | — |
Responses
Response Schema (200)
コインロットID
対象ユーザーID
発行元種別
有償コインフラグ
出金可能フラグ
発行時コイン数
残存コイン数
失効日時
出金可能になる日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-lots" \
-H "Authorization: Bearer <token>"{
"coin_lots": [
{
"id": "string",
"user_id": "string",
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"total_amount_coin": 0,
"remaining_amount_coin": 0,
"expires_at": "2024-01-01T00:00:00Z",
"withdrawable_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-lots", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-lots/{lot_id}
コインロット詳細
コインロット詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
lot_id REQUIRED | string | — |
Responses
Response Schema (200)
コインロットID
対象ユーザーID
発行元種別
有償コインフラグ
出金可能フラグ
発行時コイン数
残存コイン数
失効日時
出金可能になる日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-lots/{lot_id}" \
-H "Authorization: Bearer <token>"{
"coin_lot": {
"id": "string",
"user_id": "string",
"source_type": "string",
"is_paid": true,
"is_withdrawable": true,
"total_amount_coin": 0,
"remaining_amount_coin": 0,
"expires_at": "2024-01-01T00:00:00Z",
"withdrawable_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-lots/{lot_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Payments
/api/v1/payments
決済一覧
IAP購入決済を一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
platform | string | — |
status | string | — |
from | string (date-time) | — |
to | string (date-time) | — |
Responses
Response Schema (200)
決済ID
対象ユーザーID
決済プラットフォーム
プロバイダー側決済IDのマスク済み表示値。raw purchaseToken / JWS は返さない
Store / provider 環境(Apple: Sandbox/Production, Google: Test/Production)
Apple / Google ストア側の商品 ID
Google Play orderId。Apple は null
決済金額(文字列)
通貨コード
決済ステータス
付与されたコイン数
決済日時
作成日時
Store完了処理の状態。詳細取得時のみ返る
Store完了処理ID
プロバイダー
Store / provider 環境
完了処理種別
完了処理ステータス
Apple / Google ストア側の商品 ID
再試行回数
最終試行日時
次回再試行日時
成功日時
最後のエラーコード
最後のエラーメッセージ。token/JWS はマスク済み
Google Play orderId。Apple は null
Apple transactionId のマスク済み表示値
GooglePurchase 参照ID。raw purchaseToken ではない
curl -X GET "http://localhost:8081/api/v1/payments" \
-H "Authorization: Bearer <token>"{
"payments": [
{
"id": "string",
"user_id": "string",
"platform": "string",
"provider_payment_id": "string",
"environment": "string",
"store_product_id": "string",
"provider_order_id": "string",
"amount_money": "string",
"currency": "string",
"status": "string",
"coin_amount": 0,
"paid_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z",
"store_completions": [
{
"id": "string",
"provider": "string",
"environment": "string",
"action": "string",
"status": "string",
"store_product_id": "string",
"retry_count": 0,
"attempted_at": "2024-01-01T00:00:00Z",
"next_attempt_at": "2024-01-01T00:00:00Z",
"succeeded_at": "2024-01-01T00:00:00Z",
"last_error_code": "string",
"last_error_message": "string",
"provider_order_id": "string",
"provider_transaction_id_masked": "string",
"purchase_token_ref_id": "string"
}
]
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/payments", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payments/{payment_id}
決済詳細
決済詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
payment_id REQUIRED | string | — |
Responses
Response Schema (200)
決済ID
対象ユーザーID
決済プラットフォーム
プロバイダー側決済IDのマスク済み表示値。raw purchaseToken / JWS は返さない
Store / provider 環境(Apple: Sandbox/Production, Google: Test/Production)
Apple / Google ストア側の商品 ID
Google Play orderId。Apple は null
決済金額(文字列)
通貨コード
決済ステータス
付与されたコイン数
決済日時
作成日時
Store完了処理の状態。詳細取得時のみ返る
Store完了処理ID
プロバイダー
Store / provider 環境
完了処理種別
完了処理ステータス
Apple / Google ストア側の商品 ID
再試行回数
最終試行日時
次回再試行日時
成功日時
最後のエラーコード
最後のエラーメッセージ。token/JWS はマスク済み
Google Play orderId。Apple は null
Apple transactionId のマスク済み表示値
GooglePurchase 参照ID。raw purchaseToken ではない
curl -X GET "http://localhost:8081/api/v1/payments/{payment_id}" \
-H "Authorization: Bearer <token>"{
"payment": {
"id": "string",
"user_id": "string",
"platform": "string",
"provider_payment_id": "string",
"environment": "string",
"store_product_id": "string",
"provider_order_id": "string",
"amount_money": "string",
"currency": "string",
"status": "string",
"coin_amount": 0,
"paid_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z",
"store_completions": [
{
"id": "string",
"provider": "string",
"environment": "string",
"action": "string",
"status": "string",
"store_product_id": "string",
"retry_count": 0,
"attempted_at": "2024-01-01T00:00:00Z",
"next_attempt_at": "2024-01-01T00:00:00Z",
"succeeded_at": "2024-01-01T00:00:00Z",
"last_error_code": "string",
"last_error_message": "string",
"provider_order_id": "string",
"provider_transaction_id_masked": "string",
"purchase_token_ref_id": "string"
}
]
}
}const response = await fetch("http://localhost:8081/api/v1/payments/{payment_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();PaymentAuditTrail
/api/v1/payments/audit-trail
決済監査証跡取得
決済IDや購入意図IDなどから、決済から返金・回収・債務まで一括で監査証跡を取得します(管理者認証必須)。payment_id / purchase_intent_id / provider_payment_id+provider / payment_refund_id / user_id のいずれか1つが必須。
Parameters
| Parameter | Type | Description |
|---|---|---|
payment_id | string | — |
purchase_intent_id | string | — |
provider_payment_id | string | — |
provider | string | — |
payment_refund_id | string | — |
user_id | string | — |
Responses
Response Schema (200)
curl -X GET "http://localhost:8081/api/v1/payments/audit-trail" \
-H "Authorization: Bearer <token>"{
"items": [
{
"purchase_intent": {},
"iap_ingress_events": [
{
"id": "string",
"entrypoint": "string",
"provider_payment_id": "string",
"receipt_sha256": "string",
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"iap_lifecycle_events": [
{
"id": "string",
"event_type": "string",
"ingress_event_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"verification_requests": [
{
"id": "string",
"purchase_intent_id": "string",
"status": "string",
"retry_count": 0,
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"verification_success": {},
"verification_failures": [
{
"id": "string",
"purchase_intent_id": "string",
"provider": "string",
"failure_reason": "string",
"failed_at": "2024-01-01T00:00:00Z"
}
],
"payment": {},
"apple_transaction": {},
"google_purchase": {},
"provider_notification_events": [
{
"id": "string",
"provider": "string",
"notification_type": "string",
"processing_status": "string",
"payment_refund_id": "string",
"received_at": "2024-01-01T00:00:00Z",
"processed_at": "2024-01-01T00:00:00Z"
}
],
"coin_grant_outbox": {},
"paid_coin_grant": {},
"coin_transactions": [
{
"id": "string",
"payment_id": "string",
"user_coin_account_id": "string",
"type": "string",
"source_type": "string",
"amount_coin": 0,
"balance_after_coin": 0,
"reference_type": "string",
"reference_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"coin_lot_changes": [
{
"id": "string",
"coin_transaction_id": "string",
"coin_lot_id": "string",
"amount": 0,
"created_at": "2024-01-01T00:00:00Z"
}
],
"coin_lots": [
{
"id": "string",
"status": "string",
"remaining_coin": 0,
"expires_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"payment_refunds": [
{
"id": "string",
"payment_id": "string",
"status": "string",
"refund_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"provider_refund_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"payment_refund_events": [
{
"id": "string",
"payment_refund_id": "string",
"event_type": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"recovery_allocations": [
{
"id": "string",
"payment_refund_id": "string",
"coin_transaction_id": "string",
"coin_lot_id": "string",
"amount": 0,
"created_at": "2024-01-01T00:00:00Z"
}
],
"recipient_recovery_targets": [
{
"id": "string",
"payment_refund_id": "string",
"gift_transaction_id": "string",
"receiver_user_coin_account_id": "string",
"target_coin_amount": 0,
"recovered_coin_amount": 0,
"shortfall_coin_amount": 0,
"status": "string",
"decision_reason": "string",
"evidence_note": "string",
"decided_by_admin_user_id": "string",
"processed_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"debt_cases": [
{
"id": "string",
"user_coin_account_id": "string",
"reason": "string",
"reference_type": "string",
"reference_id": "string",
"original_amount_coin": 0,
"outstanding_coin": 0,
"status": "string",
"created_at": "2024-01-01T00:00:00Z",
"settled_at": "2024-01-01T00:00:00Z"
}
],
"user_debts": [
{
"user_coin_account_id": "string",
"amount_coin": 0,
"reason": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"debt_settlements": [
{
"id": "string",
"debt_case_id": "string",
"user_coin_account_id": "string",
"amount_coin": 0,
"coin_transaction_id": "string",
"reason": "string",
"performed_by_admin_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"financial_report_rows": [
{
"id": "string",
"report_id": "string",
"payment_id": "string",
"payment_refund_id": "string",
"gross_amount": "string",
"reconciliation_status": "string"
}
],
"reconciliation_findings": [
{
"id": "string",
"report_id": "string",
"row_id": "string",
"finding_type": "string",
"severity": "string",
"message": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"warnings": [
{
"code": "string",
"message": "string",
"related_ids": [
"string"
]
}
]
}
]
}const response = await fetch("http://localhost:8081/api/v1/payments/audit-trail", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();ProviderFinancialReports
/api/v1/provider-financial-reports
Store売上レポート一覧
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
provider | string | — |
report_type | string | — |
report_period | string | — |
Responses
Response Schema (200)
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports" \
-H "Authorization: Bearer <token>"{
"reports": [
{
"id": "string",
"provider": "apple",
"report_type": "string",
"report_period": "string",
"region_code": "string",
"vendor_number": "string",
"source_file_sha256": "string",
"row_count": 0,
"matched_count": 0,
"finding_count": 0,
"status": "string",
"imported_by_admin_user_id": "string",
"imported_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/provider-financial-reports/import
Store売上レポート取り込み
Apple/GoogleのStore売上レポートを管理者が手動アップロードし、Paymentと突合します。
Responses
Response Schema (200)
ステータス: open / in_progress / resolved / dismissed
Response Schema (201)
ステータス: open / in_progress / resolved / dismissed
curl -X POST "http://localhost:8081/api/v1/provider-financial-reports/import" \
-H "Authorization: Bearer <token>"{
"dry_run": true,
"report": {},
"rows": [
{
"id": "string",
"report_id": "string",
"line_number": 0,
"row_type": "string",
"provider_order_id": "string",
"provider_transaction_id": "string",
"store_product_id": "string",
"country_or_region": "string",
"currency": "string",
"gross_amount": "string",
"tax_amount": "string",
"store_fee_amount": "string",
"net_proceeds_amount": "string",
"exchange_rate": "string",
"transaction_date": "2024-01-01T00:00:00Z",
"settlement_date": "2024-01-01T00:00:00Z",
"payment_id": "string",
"payment_refund_id": "string",
"reconciliation_status": "string",
"match_strategy": "string",
"raw_row": {},
"created_at": "2024-01-01T00:00:00Z"
}
],
"findings": [
{
"id": "string",
"report_id": "string",
"row_id": "string",
"row_line_number": 0,
"payment_id": "string",
"payment_refund_id": "string",
"finding_type": "string",
"severity": "string",
"status": "string",
"message": "string",
"resolution_note": "string",
"resolved_by_admin_user_id": "string",
"resolved_at": "2024-01-01T00:00:00Z",
"metadata": {},
"created_at": "2024-01-01T00:00:00Z"
}
],
"summary": {
"row_count": 0,
"matched_count": 0,
"finding_count": 0
}
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/import", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/provider-financial-reports/{report_id}
Store売上レポート詳細
Parameters
| Parameter | Type | Description |
|---|---|---|
report_id REQUIRED | string | — |
Responses
Response Schema (200)
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}" \
-H "Authorization: Bearer <token>"{
"report": {
"id": "string",
"provider": "apple",
"report_type": "string",
"report_period": "string",
"region_code": "string",
"vendor_number": "string",
"source_file_sha256": "string",
"row_count": 0,
"matched_count": 0,
"finding_count": 0,
"status": "string",
"imported_by_admin_user_id": "string",
"imported_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/{report_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/provider-financial-reports/{report_id}/findings
Store売上レポート突合差分一覧
Parameters
| Parameter | Type | Description |
|---|---|---|
report_id REQUIRED | string | — |
limit | integer (int32) | — |
cursor | string | — |
finding_type | string | — |
Responses
Response Schema (200)
ステータス: open / in_progress / resolved / dismissed
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}/findings" \
-H "Authorization: Bearer <token>"{
"findings": [
{
"id": "string",
"report_id": "string",
"row_id": "string",
"row_line_number": 0,
"payment_id": "string",
"payment_refund_id": "string",
"finding_type": "string",
"severity": "string",
"status": "string",
"message": "string",
"resolution_note": "string",
"resolved_by_admin_user_id": "string",
"resolved_at": "2024-01-01T00:00:00Z",
"metadata": {},
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/{report_id}/findings", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/provider-financial-reports/{report_id}/findings/{finding_id}
突合差分ステータス更新
突合差分のステータスを更新します(open / in_progress / resolved / dismissed)
Parameters
| Parameter | Type | Description |
|---|---|---|
report_id REQUIRED | string | — |
finding_id REQUIRED | string | — |
Request Body
新しいステータス: open / in_progress / resolved / dismissed
Responses
Response Schema (200)
ステータス: open / in_progress / resolved / dismissed
curl -X PATCH "http://localhost:8081/api/v1/provider-financial-reports/{report_id}/findings/{finding_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"status": "string",
"resolution_note": "string"
}'{
"finding": {
"id": "string",
"report_id": "string",
"row_id": "string",
"row_line_number": 0,
"payment_id": "string",
"payment_refund_id": "string",
"finding_type": "string",
"severity": "string",
"status": "string",
"message": "string",
"resolution_note": "string",
"resolved_by_admin_user_id": "string",
"resolved_at": "2024-01-01T00:00:00Z",
"metadata": {},
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/{report_id}/findings/{finding_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"status": "string",
"resolution_note": "string"
})
});
const data = await response.json();/api/v1/provider-financial-reports/{report_id}/rows
Store売上レポート明細一覧
Parameters
| Parameter | Type | Description |
|---|---|---|
report_id REQUIRED | string | — |
limit | integer (int32) | — |
cursor | string | — |
reconciliation_status | string | — |
Responses
Response Schema (200)
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}/rows" \
-H "Authorization: Bearer <token>"{
"rows": [
{
"id": "string",
"report_id": "string",
"line_number": 0,
"row_type": "string",
"provider_order_id": "string",
"provider_transaction_id": "string",
"store_product_id": "string",
"country_or_region": "string",
"currency": "string",
"gross_amount": "string",
"tax_amount": "string",
"store_fee_amount": "string",
"net_proceeds_amount": "string",
"exchange_rate": "string",
"transaction_date": "2024-01-01T00:00:00Z",
"settlement_date": "2024-01-01T00:00:00Z",
"payment_id": "string",
"payment_refund_id": "string",
"reconciliation_status": "string",
"match_strategy": "string",
"raw_row": {},
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/{report_id}/rows", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();IapRestoreRequests
/api/v1/iap-restore-requests
購入復元履歴一覧
購入復元受付履歴を一覧取得します。receipt 原文や秘密情報は返しません。
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string (uuid) | — |
user_id | string (uuid) | — |
platform | string | — |
entrypoint | string | — |
request_status | string | — |
receipt_status | string | — |
requested_from | string (date-time) | — |
requested_to | string (date-time) | — |
Responses
Response Schema (200)
購入復元受付ID
対象ユーザーID
プラットフォーム
復元入口
復元受付ステータス
復元受付日時
復元完了日時
復元 API レスポンス時点の残高 snapshot
作成日時
更新日時
receipt ごとの処理結果サマリー
curl -X GET "http://localhost:8081/api/v1/iap-restore-requests" \
-H "Authorization: Bearer <token>"{
"iap_restore_requests": [
{
"id": "string",
"user_id": "string",
"platform": "string",
"entrypoint": null,
"status": null,
"requested_at": "2024-01-01T00:00:00Z",
"completed_at": "2024-01-01T00:00:00Z",
"response_balance_coin": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"receipt_summary": null
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/iap-restore-requests", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/iap-restore-requests/{restore_request_id}
購入復元履歴詳細
購入復元受付 1 件と receipt ごとの処理結果を取得します。receipt 原文や秘密情報は返しません。
Parameters
| Parameter | Type | Description |
|---|---|---|
restore_request_id REQUIRED | string (uuid) | — |
Responses
Response Schema (200)
購入復元受付ID
対象ユーザーID
プラットフォーム
復元入口
復元受付ステータス
復元受付日時
復元完了日時
復元 API レスポンス時点の残高 snapshot
作成日時
更新日時
receipt ごとの処理結果サマリー
購入復元 receipt 結果ID
購入復元受付ID
App 側の復元 item ID
receipt SHA-256
receipt 処理ステータス
決済ID
購入意図ID
プロバイダー側決済ID
Store 商品ID
付与コイン数
失敗理由
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/iap-restore-requests/{restore_request_id}" \
-H "Authorization: Bearer <token>"{
"iap_restore_request": {
"id": "string",
"user_id": "string",
"platform": "string",
"entrypoint": null,
"status": null,
"requested_at": "2024-01-01T00:00:00Z",
"completed_at": "2024-01-01T00:00:00Z",
"response_balance_coin": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"receipt_summary": null
},
"receipt_results": [
{
"id": "string",
"restore_request_id": "string",
"client_restore_item_id": "string",
"receipt_sha256": "string",
"status": null,
"payment_id": "string",
"purchase_intent_id": "string",
"provider_payment_id": "string",
"store_product_id": "string",
"coin_amount": 0,
"failure_reason": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("http://localhost:8081/api/v1/iap-restore-requests/{restore_request_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();CoinTransactions
/api/v1/coin-transactions
コイン取引一覧
全ユーザー横断でコイン取引台帳を一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
type | string | — |
source_type | string | — |
reference_type | string | — |
Responses
Response Schema (200)
コイン取引ID
対象ユーザーID
増減コイン数(正: 増加 / 負: 減少)
取引種別(例: earn / spend / expire)
ソース種別(例: iap / gift / admin / refund / expire / withdrawal)
参照種別
参照ID
取引後残高
取引発生日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-transactions" \
-H "Authorization: Bearer <token>"{
"coin_transactions": [
{
"id": "string",
"user_id": "string",
"amount_coin": 0,
"type": "string",
"source_type": "string",
"reference_type": "string",
"reference_id": "string",
"balance_after_coin": 0,
"occurred_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/coin-transactions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin-transactions/{transaction_id}
コイン取引詳細
コイン取引詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction_id REQUIRED | string | — |
Responses
Response Schema (200)
コイン取引ID
対象ユーザーID
増減コイン数(正: 増加 / 負: 減少)
取引種別(例: earn / spend / expire)
ソース種別(例: iap / gift / admin / refund / expire / withdrawal)
参照種別
参照ID
取引後残高
取引発生日時
作成日時
curl -X GET "http://localhost:8081/api/v1/coin-transactions/{transaction_id}" \
-H "Authorization: Bearer <token>"{
"coin_transaction": {
"id": "string",
"user_id": "string",
"amount_coin": 0,
"type": "string",
"source_type": "string",
"reference_type": "string",
"reference_id": "string",
"balance_after_coin": 0,
"occurred_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("http://localhost:8081/api/v1/coin-transactions/{transaction_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();UserCoinBalances
/api/v1/user-coin-balances
ユーザーコイン残高一覧
ユーザーコイン残高スナップショットを横断で一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
user_id | string | — |
min_balance | integer (int32) | — |
Responses
Response Schema (200)
対象ユーザーID
残高コイン数
最終更新日時
curl -X GET "http://localhost:8081/api/v1/user-coin-balances" \
-H "Authorization: Bearer <token>"{
"user_coin_balances": [
{
"user_id": "string",
"balance_coin": 0,
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/user-coin-balances", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Users
/api/v1/users
ユーザー一覧
一般ユーザーを一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
account_status | string | — |
username_like | string | — |
display_name_like | string | — |
include_deleted | string | — |
Responses
Response Schema (200)
ユーザーID
ユーザー名
表示名
自己紹介
短文メッセージ
アカウント状態
状態変更日時
退会日時
削除日時
凍結日時
プロフィール画像ID
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/users" \
-H "Authorization: Bearer <token>"{
"users": [
{
"id": "string",
"username": "string",
"display_name": "string",
"bio": "string",
"short_message": "string",
"account_status": "ACTIVE",
"status_changed_at": "2024-01-01T00:00:00Z",
"withdrawn_at": "2024-01-01T00:00:00Z",
"deleted_at": "2024-01-01T00:00:00Z",
"suspended_at": "2024-01-01T00:00:00Z",
"profile_image_id": "string",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/users", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/users/{user_id}
ユーザー詳細
ユーザー詳細を取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
Responses
Response Schema (200)
フォロワー数
フォロー数
curl -X GET "http://localhost:8081/api/v1/users/{user_id}" \
-H "Authorization: Bearer <token>"{
"user": {
"followers_count": 0,
"following_count": 0
}
}const response = await fetch("http://localhost:8081/api/v1/users/{user_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Stats
/api/v1/stats/overview
ダッシュボード集計サマリー
コイン流通量・売上・利益(返金考慮あり/なし)を一括取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
from | string (date-time) | — |
to | string (date-time) | — |
Responses
Response Schema (200)
集計開始日時 (ISO8601, UTC)
集計終了日時 (ISO8601, UTC)
流通コイン数 (時点値, 全ユーザーの残高合計, from/to の影響を受けない)
売上 (期間中の status='succeeded' かつ currency='JPY' な Payment の amount_money 合計, 円。非 JPY 決済は集計対象外)
利益 (返金除外: revenue − 期間中の status='paid' な Withdrawal.net_amount_yen 合計)
利益 (返金控除: profit_excl_refunds − 期間中の status='succeeded' な PaymentRefund.refund_amount_money 合計)
curl -X GET "http://localhost:8081/api/v1/stats/overview" \
-H "Authorization: Bearer <token>"{
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T00:00:00Z",
"coins_in_circulation": 0,
"revenue": 0,
"profit_excl_refunds": 0,
"profit_incl_refunds": 0
}const response = await fetch("http://localhost:8081/api/v1/stats/overview", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();ReconciliationJobRuns
/api/v1/reconciliation-job-runs
照合ジョブ実行一覧
照合ジョブの実行履歴を一覧取得します(管理者認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
provider | string | — |
job_type | string | — |
status | string | — |
Responses
Response Schema (200)
ジョブ実行ID
決済プロバイダー(google / apple)
ジョブ種別
実行ステータス(running / completed / failed)
開始日時
完了日時
処理対象件数
処理済み件数
エラー件数
ドライラン実行かどうか
作成日時
更新日時
curl -X GET "http://localhost:8081/api/v1/reconciliation-job-runs" \
-H "Authorization: Bearer <token>"{
"items": [
{
"id": "string",
"provider": "string",
"job_type": "string",
"status": "string",
"started_at": "2024-01-01T00:00:00Z",
"completed_at": "2024-01-01T00:00:00Z",
"total_items": 0,
"processed_items": 0,
"error_count": 0,
"dry_run": true,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("http://localhost:8081/api/v1/reconciliation-job-runs", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();