Revost Admin API

104 endpoints across 33 resource groups

System

get

/api/v1/health

ヘルスチェック

サーバーの動作状態を確認するエンドポイント(認証不要)

Responses

204There is no content to send for this request, but the headers may be useful.
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/health"
Node.js
const response = await fetch("http://localhost:8081/api/v1/health", {
  method: "GET",
});

const data = await response.json();

AdminUsers

get

/api/v1/admin-users/me

管理者ユーザー情報取得

認証された Firebase UID に紐づく管理者ユーザー情報を取得します(管理者認証必須)

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

admin_userobjectrequired

管理者ユーザー(レスポンス用)

idstringrequired

管理者ユーザーID

firebase_uidstringrequired

Firebase UID

namestringrequired

表示名

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/admin-users/me" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "admin_user": {
    "id": "string",
    "firebase_uid": "string",
    "name": "string"
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/admin-users/me", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/admin-users/me

管理者ユーザー登録

Firebase ユーザーに紐づく管理者レコードを新規作成します(初回のみ、管理者認証必須)

Request Body

namestringrequired

管理者名

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成された管理者ユーザーID

Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/admin-users/me" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}'
Node.js
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

get

/api/v1/gifts

ギフト一覧

ギフト一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
offset
integer (int32)
is_active
boolean

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

giftsArray<object>required
idstringrequired

ギフトID

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

typestringrequired

ギフト種別(一意)

base_coin_costinteger (int64)required

基本コインコスト(active GiftPriceVersion から取得、未設定時は null)

is_activebooleanrequired

有効/無効フラグ

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

total_countinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gifts", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/gifts

ギフト作成

新しいギフトを作成します(管理者認証必須)

Request Body

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

typestringrequired

ギフト種別

base_coin_costinteger (int64)required

基本コインコスト

return_ratenumber (float)required

還元率(0〜1)

is_activeboolean

有効/無効フラグ(デフォルト: true)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたギフトID

image_urlstring (uri)required

ギフト画像URL

base_coin_costinteger (int64)required

基本コインコスト

Example Request
cURL
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
}'
Node.js
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();
get

/api/v1/gifts/{gift_id}

ギフト詳細

ギフト詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

ギフトID

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

typestringrequired

ギフト種別(一意)

base_coin_costinteger (int64)required

基本コインコスト(active GiftPriceVersion から取得、未設定時は null)

is_activebooleanrequired

有効/無効フラグ

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
patch

/api/v1/gifts/{gift_id}

ギフト更新

ギフトを更新します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Request Body

namestring

ギフト名

image_urlstring (uri)

ギフト画像URL

typestring

ギフト種別

base_coin_costinteger (int64)

基本コインコスト

return_ratenumber (float)

還元率(0〜1)

is_activeboolean

有効/無効フラグ

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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
}'
Node.js
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();
delete

/api/v1/gifts/{gift_id}

ギフト削除

ギフトを削除します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "http://localhost:8081/api/v1/gifts/{gift_id}" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

GiftVersions

get

/api/v1/gifts/{gift_id}/versions

表示バージョン一覧

指定ギフトの表示バージョン一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
status
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

versionsArray<object>required
idstringrequired

バージョンID

gift_idstringrequired

ギフトID

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/versions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gifts/{gift_id}/versions", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/gifts/{gift_id}/versions

表示バージョン作成

draft 状態の新しい表示バージョンを作成します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Request Body

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたバージョンID

Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/gifts/{gift_id}/versions/{version_id}

表示バージョン詳細

指定バージョンの詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

バージョンID

gift_idstringrequired

ギフトID

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
post

/api/v1/gifts/{gift_id}/versions/{version_id}/activate

表示バージョン有効化

draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/activate" \
  -H "Authorization: Bearer <token>"
Node.js
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();
post

/api/v1/gifts/{gift_id}/versions/{version_id}/retire

表示バージョン廃止

active → retired に遷移します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/versions/{version_id}/retire" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/gifts/{gift_id}/price-versions

価格バージョン一覧

指定ギフトの価格バージョン一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
status
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

versionsArray<object>required
idstringrequired

バージョンID

gift_idstringrequired

ギフトID

base_coin_costinteger (int32)required

コイン消費量

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
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();
post

/api/v1/gifts/{gift_id}/price-versions

価格バージョン作成

draft 状態の新しい価格バージョンを作成します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Request Body

base_coin_costinteger (int32)required

コイン消費量(1以上)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたバージョンID

Example Request
cURL
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
}'
Node.js
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();
get

/api/v1/gifts/{gift_id}/price-versions/{version_id}

価格バージョン詳細

指定バージョンの詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

バージョンID

gift_idstringrequired

ギフトID

base_coin_costinteger (int32)required

コイン消費量

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
post

/api/v1/gifts/{gift_id}/price-versions/{version_id}/activate

価格バージョン有効化

draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/activate" \
  -H "Authorization: Bearer <token>"
Node.js
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();
post

/api/v1/gifts/{gift_id}/price-versions/{version_id}/retire

価格バージョン廃止

active → retired に遷移します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/price-versions/{version_id}/retire" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/gifts/{gift_id}/reward-rule-versions

報酬ルールバージョン一覧

指定ギフトの報酬ルールバージョン一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
status
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

versionsArray<object>required
idstringrequired

バージョンID

gift_idstringrequired

ギフトID

reward_typeunknownrequired

報酬タイプ

return_ratenumber (float)required

固定還元率(reward_type=fixed のとき必須。0.0〜1.0)

random_draw_table_version_idstringrequired

抽選テーブルバージョンID(reward_type=random のとき必須)

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
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();
post

/api/v1/gifts/{gift_id}/reward-rule-versions

報酬ルールバージョン作成

draft 状態の新しい報酬ルールバージョンを作成します。reward_type=random のとき random_draw_table_version_id が必須(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string

Request Body

unknown

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたバージョンID

Example Request
cURL
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'
Node.js
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();
get

/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}

報酬ルールバージョン詳細

指定バージョンの詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

バージョンID

gift_idstringrequired

ギフトID

reward_typeunknownrequired

報酬タイプ

return_ratenumber (float)required

固定還元率(reward_type=fixed のとき必須。0.0〜1.0)

random_draw_table_version_idstringrequired

抽選テーブルバージョンID(reward_type=random のとき必須)

statusstringrequired

ステータス(draft / active / retired)

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
post

/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/activate

報酬ルールバージョン有効化

draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/activate" \
  -H "Authorization: Bearer <token>"
Node.js
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();
post

/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/retire

報酬ルールバージョン廃止

active → retired に遷移します(管理者認証必須)

Parameters

ParameterTypeDescription
gift_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gifts/{gift_id}/reward-rule-versions/{version_id}/retire" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/random-draw-tables

抽選テーブル一覧

ランダム抽選テーブル一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
offset
integer (int32)

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

tablesArray<object>required
idstringrequired

テーブルID

namestringrequired

テーブル名

descriptionstringrequired

説明

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

total_countinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/random-draw-tables" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/random-draw-tables", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/random-draw-tables

抽選テーブル作成

新しいランダム抽選テーブルを作成します(管理者認証必須)

Request Body

namestringrequired

テーブル名

descriptionstring

説明

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたテーブルID

Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/random-draw-tables/{table_id}

抽選テーブル詳細

抽選テーブルの詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

テーブルID

namestringrequired

テーブル名

descriptionstringrequired

説明

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
patch

/api/v1/random-draw-tables/{table_id}

抽選テーブル更新

抽選テーブルのメタ情報(name / description)を更新します(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string

Request Body

namestring

テーブル名

descriptionstring

説明(null でクリア)

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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

get

/api/v1/random-draw-tables/{table_id}/versions

抽選テーブルバージョン一覧

指定テーブルのバージョン一覧を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string
status
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

versionsArray<object>required
idstringrequired

バージョンID

table_idstringrequired

テーブルID

total_weightinteger (int32)required

全アイテム weight の合計

statusstringrequired

ステータス(draft / active / retired)

itemsArray<object>

アイテム一覧(詳細取得時のみ)

idstringrequired

アイテムID

labelstringrequired

表示ラベル(例: 大当たり: 100コイン)

reward_coin_amountinteger (int32)required

報酬コイン数

weightinteger (int32)required

抽選重み(正の整数)

sort_orderinteger (int32)required

表示順

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
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();
post

/api/v1/random-draw-tables/{table_id}/versions

抽選テーブルバージョン作成

draft 状態の新しいバージョンをアイテム込みで作成します。total_weight は自動計算されます(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string

Request Body

itemsArray<object>required

アイテム一覧(1件以上必須)

labelstringrequired

表示ラベル

reward_coin_amountinteger (int32)required

報酬コイン数(0以上)

weightinteger (int32)required

抽選重み(1以上)

sort_orderinteger (int32)

表示順

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたバージョンID

total_weightinteger (int32)required

全 weight の合計(activate 時に検証に使用)

Example Request
cURL
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
    }
  ]
}'
Node.js
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();
get

/api/v1/random-draw-tables/{table_id}/versions/{version_id}

抽選テーブルバージョン詳細

指定バージョンの詳細(アイテム一覧込み)を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string
version_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

idstringrequired

バージョンID

table_idstringrequired

テーブルID

total_weightinteger (int32)required

全アイテム weight の合計

statusstringrequired

ステータス(draft / active / retired)

itemsArray<object>

アイテム一覧(詳細取得時のみ)

idstringrequired

アイテムID

labelstringrequired

表示ラベル(例: 大当たり: 100コイン)

reward_coin_amountinteger (int32)required

報酬コイン数

weightinteger (int32)required

抽選重み(正の整数)

sort_orderinteger (int32)required

表示順

activated_atstring (date-time)required

有効化日時

retired_atstring (date-time)required

廃止日時

created_by_admin_idstringrequired

作成した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
post

/api/v1/random-draw-tables/{table_id}/versions/{version_id}/activate

抽選テーブルバージョン有効化

draft → active に遷移します。既存の active バージョンは retired になります(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/activate" \
  -H "Authorization: Bearer <token>"
Node.js
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();
post

/api/v1/random-draw-tables/{table_id}/versions/{version_id}/retire

抽選テーブルバージョン廃止

active → retired に遷移します(管理者認証必須)

Parameters

ParameterTypeDescription
table_id
REQUIRED
string
version_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/random-draw-tables/{table_id}/versions/{version_id}/retire" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/gacha-pools

Admin: ガチャプール一覧取得

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

poolsArray<object>required
pool_idstringrequired
namestringrequired
descriptionstringrequired
created_atstring (date-time)required
active_versionobjectrequired
object
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gacha-pools" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "pools": [
    {
      "pool_id": "string",
      "name": "string",
      "description": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "active_version": {}
    }
  ]
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gacha-pools", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/gacha-pools

Admin: ガチャプール作成

Request Body

namestringrequired
descriptionstring

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

pool_idstringrequired
namestringrequired
descriptionstringrequired
created_atstring (date-time)required
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gacha-pools" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string"
}'
Node.js
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();
get

/api/v1/gacha-pools/{pool_id}

Admin: ガチャプール詳細取得

Parameters

ParameterTypeDescription
pool_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

pool_idstringrequired
namestringrequired
descriptionstringrequired
created_atstring (date-time)required
versionsArray<object>required
version_idstringrequired
statusstringrequired
coin_cost_per_pullinteger (int32)required
batch_coin_costinteger (int32)required
batch_pull_countinteger (int32)required
activated_atstring (date-time)required
retired_atstring (date-time)required
created_atstring (date-time)required
itemsArray<object>required
item_idstringrequired
reward_typestringrequired

ガチャ報酬種別

labelstringrequired
weightinteger (int32)required
sort_orderinteger (int32)required
gift_idstringrequired
gift_quantityinteger (int32)required
reward_expiry_daysinteger (int32)required
coin_amountinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gacha-pools/{pool_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
        }
      ]
    }
  ]
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gacha-pools/{pool_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/gacha-pools/{pool_id}/versions

Admin: ガチャプールバージョン作成

Parameters

ParameterTypeDescription
pool_id
REQUIRED
string

Request Body

coin_cost_per_pullinteger (int32)required
batch_coin_costinteger (int32)required
batch_pull_countinteger (int32)
itemsArray<object>required
reward_typestringrequired

ガチャ報酬種別

labelstringrequired
weightinteger (int32)required
sort_orderinteger (int32)
gift_idstring
gift_quantityinteger (int32)
reward_expiry_daysinteger (int32)
coin_amountinteger (int32)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

version_idstringrequired
pool_idstringrequired
statusstringrequired
item_countinteger (int32)required
Example Request
cURL
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
    }
  ]
}'
Node.js
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

post

/api/v1/gacha-pool-versions/{version_id}/activate

Admin: ガチャプールバージョンをアクティブ化

Parameters

ParameterTypeDescription
version_id
REQUIRED
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

version_idstringrequired
statusstringrequired
activated_atstring (date-time)required
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/activate" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "version_id": "string",
  "status": "string",
  "activated_at": "2024-01-01T00:00:00Z"
}
Node.js
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();
post

/api/v1/gacha-pool-versions/{version_id}/retire

Admin: ガチャプールバージョンをリタイア

Parameters

ParameterTypeDescription
version_id
REQUIRED
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

version_idstringrequired
statusstringrequired
retired_atstring (date-time)required
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/gacha-pool-versions/{version_id}/retire" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "version_id": "string",
  "status": "string",
  "retired_at": "2024-01-01T00:00:00Z"
}
Node.js
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

get

/api/v1/campaigns

キャンペーン一覧

キャンペーンを一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
offset
integer (int32)
status
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

campaignsArray<object>required
idstringrequired

キャンペーンID

namestringrequired

キャンペーン名

descriptionstringrequired

説明

statusunknownrequired

ステータス

start_atstring (date-time)required

開始日時

end_atstring (date-time)required

終了日時

budget_coininteger (int64)required

予算コイン

granted_coininteger (int64)required

付与済みコイン

per_user_limit_coininteger (int64)required

ユーザーごとの上限コイン

coin_amount_per_grantinteger (int64)required

1回あたり付与コイン

expires_in_daysinteger (int32)required

付与コインの有効期限(日)

admin_user_idstringrequired

作成管理者ID

updated_by_admin_idstringrequired

最終更新管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

total_countinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/campaigns" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/campaigns", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/campaigns

キャンペーン作成

キャンペーンを作成します(管理者認証必須)

Request Body

namestringrequired

キャンペーン名

descriptionstring

説明

start_atstring (date-time)

開始日時

end_atstring (date-time)

終了日時

budget_coininteger (int64)

予算コイン

per_user_limit_coininteger (int64)

ユーザーごとの上限コイン

coin_amount_per_grantinteger (int64)

1回あたり付与コイン

expires_in_daysinteger (int32)

付与コインの有効期限(日)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたキャンペーンID

Example Request
cURL
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
}'
Node.js
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();
get

/api/v1/campaigns/{campaign_id}

キャンペーン詳細

キャンペーン詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
campaign_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

campaignobjectrequired
idstringrequired

キャンペーンID

namestringrequired

キャンペーン名

descriptionstringrequired

説明

statusunknownrequired

ステータス

start_atstring (date-time)required

開始日時

end_atstring (date-time)required

終了日時

budget_coininteger (int64)required

予算コイン

granted_coininteger (int64)required

付与済みコイン

per_user_limit_coininteger (int64)required

ユーザーごとの上限コイン

coin_amount_per_grantinteger (int64)required

1回あたり付与コイン

expires_in_daysinteger (int32)required

付与コインの有効期限(日)

admin_user_idstringrequired

作成管理者ID

updated_by_admin_idstringrequired

最終更新管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/campaigns/{campaign_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/campaigns/{campaign_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
patch

/api/v1/campaigns/{campaign_id}

キャンペーン更新

キャンペーンを更新します(管理者認証必須)

Parameters

ParameterTypeDescription
campaign_id
REQUIRED
string

Request Body

namestring

キャンペーン名

descriptionstring

説明。null 指定でクリア

statusunknown

ステータス

start_atstring (date-time)

開始日時。null 指定でクリア

end_atstring (date-time)

終了日時。null 指定でクリア

budget_coininteger (int64)

予算コイン。null 指定でクリア

per_user_limit_coininteger (int64)

ユーザーごとの上限コイン。null 指定でクリア

coin_amount_per_grantinteger (int64)

1回あたり付与コイン。null 指定でクリア

expires_in_daysinteger (int32)

付与コインの有効期限(日)。null 指定でクリア

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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
}'
Node.js
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

get

/api/v1/coin-adjustments

コイン調整一覧

コイン手動付与履歴を一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
operation_type
string
campaign_id
string
admin_user_id
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_adjustmentsArray<object>required
idstringrequired

コイン調整ID

user_idstringrequired

対象ユーザーID

admin_user_idstringrequired

実行管理者ID

amount_coininteger (int32)required

調整コイン数

operation_typestringrequired

操作種別

statusstringrequired

処理ステータス

campaign_idstringrequired

キャンペーンID

reason_detailstringrequired

調整理由の詳細

idempotency_keystringrequired

冪等性キー

expires_atstring (date-time)required

付与コインの有効期限

coin_transaction_idstringrequired

作成されたコイントランザクションID

balance_after_coininteger (int32)required

処理後の残高

processed_atstring (date-time)required

処理完了日時

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-adjustments" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-adjustments", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/coin-adjustments

コイン調整作成

ユーザーのコイン残高を調整します(管理者認証必須)

Parameters

ParameterTypeDescription
Idempotency-Key
REQUIRED
string同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字)

Request Body

user_idstringrequired

対象ユーザーID

amount_coininteger (int32)required

調整コイン数(1 〜 100,000 の正の整数)

operation_typestringrequired

操作種別。CAMPAIGN_GRANT の場合は campaign_id 必須、MANUAL_GRANT の場合は campaign_id 指定不可

campaign_idstring

キャンペーンID

reason_detailstringrequired

調整理由の詳細

expires_atstring (date-time)

付与コインの有効期限

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたコイン調整ID

user_idstringrequired

対象ユーザーID

admin_user_idstringrequired

実行管理者ID

amount_coininteger (int32)required

調整コイン数

operation_typestringrequired

操作種別

statusstringrequired

処理ステータス

campaign_idstringrequired

キャンペーンID

reason_detailstringrequired

調整理由の詳細

idempotency_keystringrequired

冪等性キー

expires_atstring (date-time)required

付与コインの有効期限

coin_transaction_idstringrequired

作成されたコイントランザクションID

balance_after_coininteger (int32)required

処理後の残高

processed_atstring (date-time)required

処理完了日時

created_atstring (date-time)required

作成日時

Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/coin-adjustments/{adjustment_id}

コイン調整詳細

コイン調整詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
adjustment_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_adjustmentobjectrequired
idstringrequired

コイン調整ID

user_idstringrequired

対象ユーザーID

admin_user_idstringrequired

実行管理者ID

amount_coininteger (int32)required

調整コイン数

operation_typestringrequired

操作種別

statusstringrequired

処理ステータス

campaign_idstringrequired

キャンペーンID

reason_detailstringrequired

調整理由の詳細

idempotency_keystringrequired

冪等性キー

expires_atstring (date-time)required

付与コインの有効期限

coin_transaction_idstringrequired

作成されたコイントランザクションID

balance_after_coininteger (int32)required

処理後の残高

processed_atstring (date-time)required

処理完了日時

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-adjustments/{adjustment_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/gift-bag-items

ギフトバッグアイテム一覧

ギフトバッグアイテムを一覧取得します(管理者認証必須)。granted_by_admin_id で絞り込むことで管理者付与分の履歴を参照できます。

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
gift_id
string
source_type
string
granted_by_admin_id
string
remaining_only
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

gift_bag_itemsArray<object>required
idstringrequired

ギフトバッグアイテムID

user_idstringrequired

対象ユーザーID

gift_idstringrequired

ギフトID

quantityinteger (int32)required

付与個数

remaining_qtyinteger (int32)required

残り個数

source_typestringrequired

入手経路

expires_atstring (date-time)required

有効期限

granted_by_admin_idstringrequired

付与した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gift-bag-items" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/gift-bag-items", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/gift-bag-items/{item_id}

ギフトバッグアイテム詳細

ギフトバッグアイテムの詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
item_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

gift_bag_itemobjectrequired
idstringrequired

ギフトバッグアイテムID

user_idstringrequired

対象ユーザーID

gift_idstringrequired

ギフトID

quantityinteger (int32)required

付与個数

remaining_qtyinteger (int32)required

残り個数

source_typestringrequired

入手経路

expires_atstring (date-time)required

有効期限

granted_by_admin_idstringrequired

付与した管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/gift-bag-items/{item_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

post

/api/v1/gift-bag-grants

ギフトバッグアイテム付与

指定ユーザーにギフトバッグアイテムを付与します(管理者認証必須)

Request Body

user_idstringrequired

対象ユーザーID

gift_idstringrequired

ギフトID

quantityinteger (int32)required

付与個数

expires_atstring (date-time)required

有効期限

source_typestringrequired

入手経路(login_bonus, event_reward 等)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたギフトバッグアイテムID

Example Request
cURL
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"
}'
Node.js
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

post

/api/v1/uploads/gift-image

ギフト画像アップロード

ギフト画像ファイルをアップロードします(管理者認証必須)

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

image_urlstring (uri)required

アップロード後の画像URL

Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/uploads/gift-image" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("http://localhost:8081/api/v1/uploads/gift-image", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

AdminPaymentRefunds

get

/api/v1/payment-refunds

返金一覧取得

返金レコードを一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
status
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

refundsArray<object>required
idstringrequired

返金ID

payment_idstringrequired

決済ID

sourcestringrequired

返金起点

refund_typestringrequired

返金種別

refund_scopestringrequired

返金範囲

refund_reasonstring

返金理由

statusstringrequired

返金ステータス

refund_amount_moneyinteger (int32)required

返金金額(円)

refund_coin_amountinteger (int64)required

回収対象コイン数

recovered_coin_amountinteger (int64)required

実際に残高から回収できたコイン数

shortfall_coin_amountinteger (int64)required

回収できず債務化したコイン数

recover_from_recipientsbooleanrequired

admin が指定した悪意ある受取人からも回収するか

last_errorstring

最後の処理エラー

requested_atstring (date-time)required

返金要求日時

processing_started_atstring (date-time)

処理開始日時

processed_atstring (date-time)

処理日時

admin_user_idstring

最後に操作した admin user ID

created_atstring (date-time)required

作成日時

recipient_recovery_targetsArray<object>required

admin が明示指定した受取人回収対象

idstringrequired

受取人回収対象ID

payment_refund_idstringrequired

返金ID

gift_transaction_idstringrequired

対象ギフト取引ID

receiver_user_coin_account_idstringrequired

回収対象の受取人 coin account ID

target_coin_amountinteger (int64)required

回収上限コイン数

recovered_coin_amountinteger (int64)required

実際に残高から回収できたコイン数

shortfall_coin_amountinteger (int64)required

回収できず債務化したコイン数

statusstringrequired

受取人回収対象の状態

decision_reasonstringrequired

悪意・共謀ありと判断した理由

evidence_notestring

問い合わせIDや外部証跡などの調査メモ

decided_by_admin_user_idstringrequired

対象指定した admin user ID

processed_atstring (date-time)

処理日時

created_atstring (date-time)required

作成日時

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/payment-refunds" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/payment-refunds", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/payment-refunds

返金起票

管理者が返金処理を起票します。同じ Idempotency-Key と同じ payload の再送は同じ返金IDを返し、同じ Idempotency-Key で異なる payload は 409 を返します。

Parameters

ParameterTypeDescription
Idempotency-Key
REQUIRED
string同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字)

Request Body

payment_idstringrequired

決済ID

refund_typestringrequired

返金種別(自主返金 / チャージバック)

refund_reasonstring

返金理由

refund_amount_moneyinteger (int32)required

返金金額(円)

refund_coin_amountinteger (int64)required

回収対象コイン数

recover_from_recipientsboolean

admin が指定した悪意ある受取人からも回収するか

recipient_recovery_targetsArray<object>

悪意ありと判断した受取人回収対象。recover_from_recipients=true の場合は必須

gift_transaction_idstringrequired

対象ギフト取引ID。返金対象 payment 由来の coin lot で送られたギフトだけ指定可能

receiver_user_coin_account_idstringrequired

回収対象の受取人 coin account ID

target_coin_amountinteger (int64)required

回収上限コイン数。返金対象 payment 由来の受取相当額を超えない値

decision_reasonstringrequired

悪意・共謀ありと判断した理由

evidence_notestring

問い合わせIDや外部証跡などの調査メモ

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

refund_idstringrequired

返金ID

statusstringrequired

ステータス

Example Request
cURL
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"
    }
  ]
}'
Node.js
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();
get

/api/v1/payment-refunds/{refund_id}

返金詳細取得

返金レコード詳細を取得します

Parameters

ParameterTypeDescription
refund_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

refundobjectrequired
idstringrequired

返金ID

payment_idstringrequired

決済ID

sourcestringrequired

返金起点

refund_typestringrequired

返金種別

refund_scopestringrequired

返金範囲

refund_reasonstring

返金理由

statusstringrequired

返金ステータス

refund_amount_moneyinteger (int32)required

返金金額(円)

refund_coin_amountinteger (int64)required

回収対象コイン数

recovered_coin_amountinteger (int64)required

実際に残高から回収できたコイン数

shortfall_coin_amountinteger (int64)required

回収できず債務化したコイン数

recover_from_recipientsbooleanrequired

admin が指定した悪意ある受取人からも回収するか

last_errorstring

最後の処理エラー

requested_atstring (date-time)required

返金要求日時

processing_started_atstring (date-time)

処理開始日時

processed_atstring (date-time)

処理日時

admin_user_idstring

最後に操作した admin user ID

created_atstring (date-time)required

作成日時

recipient_recovery_targetsArray<object>required

admin が明示指定した受取人回収対象

idstringrequired

受取人回収対象ID

payment_refund_idstringrequired

返金ID

gift_transaction_idstringrequired

対象ギフト取引ID

receiver_user_coin_account_idstringrequired

回収対象の受取人 coin account ID

target_coin_amountinteger (int64)required

回収上限コイン数

recovered_coin_amountinteger (int64)required

実際に残高から回収できたコイン数

shortfall_coin_amountinteger (int64)required

回収できず債務化したコイン数

statusstringrequired

受取人回収対象の状態

decision_reasonstringrequired

悪意・共謀ありと判断した理由

evidence_notestring

問い合わせIDや外部証跡などの調査メモ

decided_by_admin_user_idstringrequired

対象指定した admin user ID

processed_atstring (date-time)

処理日時

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/payment-refunds/{refund_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
      }
    ]
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/payment-refunds/{refund_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/payment-refunds/{refund_id}/execute

返金実行

tasks_backend で返金実処理を実行し、処理後の状態を返します。resource id と状態条件で重複実行を防ぐため、Idempotency-Key は要求しません。

Parameters

ParameterTypeDescription
refund_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

refund_idstringrequired

返金ID

statusstringrequired

現在のステータス

Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/payment-refunds/{refund_id}/execute" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "refund_id": "string",
  "status": "pending"
}
Node.js
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();
post

/api/v1/payment-refunds/{refund_id}/fail

返金失敗確定

未完了または要確認の返金を failed に遷移します。resource id と状態条件で重複遷移を防ぐため、Idempotency-Key は要求しません。

Parameters

ParameterTypeDescription
refund_id
REQUIRED
string

Request Body

reasonstringrequired

失敗理由

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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();
put

/api/v1/payment-refunds/{refund_id}/recipient-recovery-targets

受取人回収対象設定

admin が悪意ありと判断したギフト受取人だけを返金回収対象として設定します

Parameters

ParameterTypeDescription
refund_id
REQUIRED
string

Request Body

recipient_recovery_targetsArray<object>required

悪意ありと判断した受取人回収対象

gift_transaction_idstringrequired

対象ギフト取引ID。返金対象 payment 由来の coin lot で送られたギフトだけ指定可能

receiver_user_coin_account_idstringrequired

回収対象の受取人 coin account ID

target_coin_amountinteger (int64)required

回収上限コイン数。返金対象 payment 由来の受取相当額を超えない値

decision_reasonstringrequired

悪意・共謀ありと判断した理由

evidence_notestring

問い合わせIDや外部証跡などの調査メモ

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

refund_idstringrequired

返金ID

recover_from_recipientsbooleanrequired

受取人回収を使うか

target_countinteger (int32)required

設定した対象数

Example Request
cURL
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"
    }
  ]
}'
Response200 OK
{
  "refund_id": "string",
  "recover_from_recipients": true,
  "target_count": 0
}
Node.js
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

get

/api/v1/debts

債務ユーザー一覧

債務があるユーザーの一覧を取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

usersArray<object>required
user_idstringrequired

ユーザーID

amount_coininteger (int64)required

債務コイン数

updated_atstring (date-time)required

最終更新日時

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/debts" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "users": [
    {
      "user_id": "string",
      "amount_coin": 0,
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/debts", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/debts/cases/{debt_case_id}/settle

債務手動返済

債務案件に対して手動返済を実行します

Parameters

ParameterTypeDescription
debt_case_id
REQUIRED
string

Request Body

amount_coininteger (int64)required

返済コイン数

reasonstring

理由

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/debts/{user_id}

ユーザー債務詳細

指定ユーザーの債務案件一覧を取得します

Parameters

ParameterTypeDescription
user_id
REQUIRED
string
limit
integer (int32)
cursor
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

debt_casesArray<object>required
idstringrequired

債務案件ID

reasonstringrequired

理由

reference_typestring

参照種別

reference_idstring

参照ID

original_amount_coininteger (int64)required

元債務コイン数

outstanding_coininteger (int64)required

残債コイン数

statusunknownrequired

ステータス

created_atstring (date-time)required

作成日時

settled_atstring (date-time)

解消日時

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/debts/{user_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/debts/{user_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

AdminWithdrawals

get

/api/v1/withdrawals

出金一覧取得

出金申請を一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
status
string出金ステータス

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

withdrawalsArray<object>required
idstringrequired

出金ID

user_idstringrequired

ユーザーID

year_monthstringrequired

対象年月(YYYY-MM)

amount_coininteger (int32)required

出金コイン数

gross_amount_yeninteger (int32)required

総額(円)

fee_amount_yeninteger (int32)required

手数料(円)

net_amount_yeninteger (int32)required

支払額(円)

statusunknownrequired

ステータス

created_atstring (date-time)required

作成日時

paid_atstring (date-time)

支払日時

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/withdrawals" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/withdrawals", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/withdrawals/{withdrawal_id}

出金詳細取得

出金申請詳細を取得します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

withdrawalobjectrequired
idstringrequired

出金ID

user_idstringrequired

ユーザーID

year_monthstringrequired

対象年月(YYYY-MM)

amount_coininteger (int32)required

出金コイン数

gross_amount_yeninteger (int32)required

総額(円)

fee_amount_yeninteger (int32)required

手数料(円)

net_amount_yeninteger (int32)required

支払額(円)

statusunknownrequired

ステータス

created_atstring (date-time)required

作成日時

paid_atstring (date-time)

支払日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/withdrawals/{withdrawal_id}/approve

出金承認

pending の出金申請を承認し processing へ遷移します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/approve" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/approve", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/withdrawals/{withdrawal_id}/cancel

出金キャンセル

pending の出金申請を cancelled へ遷移します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/cancel" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/withdrawals/{withdrawal_id}/fail

出金失敗

processing の出金申請を failed へ遷移します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Request Body

reasonstringrequired

失敗理由

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/fail" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "string"
}'
Node.js
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();
post

/api/v1/withdrawals/{withdrawal_id}/pay

出金支払い完了

processing の出金申請を paid へ遷移します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/withdrawals/{withdrawal_id}/pay" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/iap-products

IAP商品一覧

IAP商品マスタを一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
offset
integer (int32)
platform
string
is_active
boolean

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

iap_productsArray<object>required
idstringrequired

IAPプロダクトID

store_product_idstringrequired

ストア商品ID

platformstringrequired

プラットフォーム

product_typestringrequired

商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)

coin_amountinteger (int64)required

付与コイン数

is_activebooleanrequired

有効フラグ

created_atstring (date-time)required

作成日時

total_countinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/iap-products" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/iap-products", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/iap-products

IAP商品作成

IAP商品マスタを作成します

Request Body

store_product_idstringrequired

ストア商品ID

platformstringrequired

プラットフォーム

product_typestringrequired

商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)

coin_amountinteger (int64)required

付与コイン数

is_activeboolean

有効フラグ

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成ID

Example Request
cURL
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
}'
Node.js
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();
get

/api/v1/iap-products/{iap_product_id}

IAP商品詳細

IAP商品マスタを詳細取得します

Parameters

ParameterTypeDescription
iap_product_id
REQUIRED
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

iap_productunknownrequired

IAPプロダクト

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/iap-products/{iap_product_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "iap_product": null
}
Node.js
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();
patch

/api/v1/iap-products/{iap_product_id}

IAP商品更新

IAP商品マスタを更新します

Parameters

ParameterTypeDescription
iap_product_id
REQUIRED
string

Request Body

platformstring

プラットフォーム

store_product_idstring

ストア商品ID

product_typestring

商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)

coin_amountinteger (int64)

付与コイン数

is_activeboolean

有効フラグ

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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
}'
Node.js
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();
delete

/api/v1/iap-products/{iap_product_id}

IAP商品削除

IAP商品マスタを削除します

Parameters

ParameterTypeDescription
iap_product_id
REQUIRED
string

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "http://localhost:8081/api/v1/iap-products/{iap_product_id}" \
  -H "Authorization: Bearer <token>"
Node.js
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();
get

/api/v1/iap-products/{iap_product_id}/price-histories

IAP商品コイン数変更履歴一覧

指定 IAP 商品の coin_amount 変更履歴を取得します

Parameters

ParameterTypeDescription
iap_product_id
REQUIRED
string
limit
integer (int32)
offset
integer (int32)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

price_historiesArray<object>required
idstringrequired

履歴ID

iap_product_idstringrequired

IAPプロダクトID

previous_coin_amountinteger (int64)required

変更前コイン数

new_coin_amountinteger (int64)required

変更後コイン数

changed_by_admin_idstringrequired

変更した管理者ID

changed_atstring (date-time)required

変更日時

total_countinteger (int32)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/iap-products/{iap_product_id}/price-histories" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
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

get

/api/v1/coin-exchange-rates

換金レート一覧

換金レート履歴を一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_exchange_ratesArray<object>required
idstringrequired

レートID

rate_yen_per_coinnumber (float)required

1コインあたり円レート

effective_fromstring (date-time)required

適用開始日時

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-exchange-rates" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-exchange-rates", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/coin-exchange-rates

換金レート作成

新しい換金レートを作成します

Request Body

rate_yen_per_coinnumber (float)required

1コインあたり円レート

effective_fromstring (date-time)required

適用開始日時

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成ID

Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/coin-exchange-rates/{rate_id}

換金レート詳細

換金レート詳細を取得します

Parameters

ParameterTypeDescription
rate_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

rateobjectrequired
idstringrequired

レートID

rate_yen_per_coinnumber (float)required

1コインあたり円レート

effective_fromstring (date-time)required

適用開始日時

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-exchange-rates/{rate_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "rate": {
    "id": "string",
    "rate_yen_per_coin": 0,
    "effective_from": "2024-01-01T00:00:00Z",
    "created_at": "2024-01-01T00:00:00Z"
  }
}
Node.js
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();
patch

/api/v1/coin-exchange-rates/{rate_id}

換金レート更新

換金レートを更新します

Parameters

ParameterTypeDescription
rate_id
REQUIRED
string

Request Body

rate_yen_per_coinnumber (float)

1コインあたり円レート

effective_fromstring (date-time)

適用開始日時

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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

get

/api/v1/coin-reward-rule-versions

コイン報酬ルールバージョン一覧

コイン報酬ルールバージョンを一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
reward_type_id
string
is_enabled
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_rule_versionsArray<object>required
idstringrequired

ルールバージョンID

reward_type_idstringrequired

報酬種別ID

reward_type_codestringrequired

報酬種別コード

reward_type_namestringrequired

報酬種別名

amount_coininteger (int64)required

付与コイン量

source_typestringrequired

参照元種別

is_paidbooleanrequired

有償コインか

is_withdrawablebooleanrequired

出金可能か

expires_in_daysinteger (int32)

有効期限(日)

is_enabledbooleanrequired

有効フラグ

valid_fromstring (date-time)required

適用開始

valid_tostring (date-time)

適用終了(未設定で無期限)

priorityinteger (int32)required

優先度

created_by_admin_idstring

作成管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

superseded_atstring (date-time)required

supersede された日時(current head の場合は null)

superseded_by_rule_version_idstringrequired

supersede 先ルールバージョンID(current head の場合は null)

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-rule-versions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-reward-rule-versions", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/coin-reward-rule-versions

コイン報酬ルールバージョン作成

コイン報酬ルールバージョンを新規作成します(有効かつ期間重複は不可)

Request Body

reward_type_idstringrequired

報酬種別ID

amount_coininteger (int64)required

付与コイン量

source_typestringrequired

参照元種別

is_paidbooleanrequired

有償コインか

is_withdrawablebooleanrequired

出金可能か

expires_in_daysinteger (int32)

有効期限(日)

is_enabledboolean

有効フラグ

valid_fromstring (date-time)required

適用開始

valid_tostring (date-time)

適用終了

priorityinteger (int32)

優先度

reasonstringrequired

変更理由

Responses

201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成ID

Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/coin-reward-rule-versions/{rule_version_id}

コイン報酬ルールバージョン詳細

コイン報酬ルールバージョンを取得します

Parameters

ParameterTypeDescription
rule_version_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_rule_versionobjectrequired
idstringrequired

ルールバージョンID

reward_type_idstringrequired

報酬種別ID

reward_type_codestringrequired

報酬種別コード

reward_type_namestringrequired

報酬種別名

amount_coininteger (int64)required

付与コイン量

source_typestringrequired

参照元種別

is_paidbooleanrequired

有償コインか

is_withdrawablebooleanrequired

出金可能か

expires_in_daysinteger (int32)

有効期限(日)

is_enabledbooleanrequired

有効フラグ

valid_fromstring (date-time)required

適用開始

valid_tostring (date-time)

適用終了(未設定で無期限)

priorityinteger (int32)required

優先度

created_by_admin_idstring

作成管理者ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

superseded_atstring (date-time)required

supersede された日時(current head の場合は null)

superseded_by_rule_version_idstringrequired

supersede 先ルールバージョンID(current head の場合は null)

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-rule-versions/{rule_version_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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();
patch

/api/v1/coin-reward-rule-versions/{rule_version_id}

コイン報酬ルールバージョン更新

有効/無効の切り替えまたは適用終了日時の更新のみ可能です

Parameters

ParameterTypeDescription
rule_version_id
REQUIRED
string

Request Body

is_enabledboolean

有効フラグ

valid_tostring (date-time)

適用終了(ウィンドウを閉じる等)

reasonstringrequired

変更理由

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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();
get

/api/v1/coin-reward-types

コイン報酬種別一覧

コイン報酬種別を一覧取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_typesArray<object>required
idstringrequired

種別ID

codestringrequired

コード

namestringrequired

名称

descriptionstring

説明

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

next_cursorstring
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-types" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-reward-types", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/coin-reward-types/{reward_type_id}

コイン報酬種別詳細

コイン報酬種別を取得します

Parameters

ParameterTypeDescription
reward_type_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_typeobjectrequired
idstringrequired

種別ID

codestringrequired

コード

namestringrequired

名称

descriptionstring

説明

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-types/{reward_type_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/coin-reward-admin-audit-logs

コイン報酬管理者監査ログ一覧

コイン報酬まわりの管理者操作ログを一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
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

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_admin_audit_logsArray<object>required
idstringrequired

ログID

entity_typestringrequired

エンティティ種別

entity_idstringrequired

エンティティID

reward_type_idstringrequired

報酬種別ID

rule_version_idstringrequired

ルールバージョンID

actionstringrequired

アクション

reasonstringrequired

理由

performed_by_admin_idstringrequired

実行管理者ID

before_snapshotunknownrequired

変更前スナップショット

after_snapshotunknownrequired

変更後スナップショット

metadataunknownrequired

メタデータ

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-admin-audit-logs" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
get

/api/v1/coin-reward-admin-audit-logs/{audit_log_id}

コイン報酬管理者監査ログ詳細

監査ログ詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
audit_log_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_reward_admin_audit_logobjectrequired
idstringrequired

ログID

entity_typestringrequired

エンティティ種別

entity_idstringrequired

エンティティID

reward_type_idstringrequired

報酬種別ID

rule_version_idstringrequired

ルールバージョンID

actionstringrequired

アクション

reasonstringrequired

理由

performed_by_admin_idstringrequired

実行管理者ID

before_snapshotunknownrequired

変更前スナップショット

after_snapshotunknownrequired

変更後スナップショット

metadataunknownrequired

メタデータ

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-reward-admin-audit-logs/{audit_log_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/debt-settlements

債務精算一覧

債務精算履歴を一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
debt_case_id
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

debt_settlementsArray<object>required
idstringrequired

精算ID

debt_case_idstringrequired

債務ケースID

user_idstringrequired

対象ユーザーID

amount_coininteger (int64)required

精算コイン数

coin_transaction_idstringrequired

対応するコイン取引ID

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/debt-settlements" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/debt-settlements", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/debt-settlements/{debt_settlement_id}

債務精算詳細

債務精算詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
debt_settlement_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

debt_settlementobjectrequired
idstringrequired

精算ID

debt_case_idstringrequired

債務ケースID

user_idstringrequired

対象ユーザーID

amount_coininteger (int64)required

精算コイン数

coin_transaction_idstringrequired

対応するコイン取引ID

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/debt-settlements/{debt_settlement_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/coin-lots

コインロット一覧

コインロットを横断的に一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
source_type
string
is_paid
string
is_withdrawable
string
remaining_only
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_lotsArray<object>required
idstringrequired

コインロットID

user_idstringrequired

対象ユーザーID

source_typestringrequired

発行元種別

is_paidbooleanrequired

有償コインフラグ

is_withdrawablebooleanrequired

出金可能フラグ

total_amount_coininteger (int32)required

発行時コイン数

remaining_amount_coininteger (int32)required

残存コイン数

expires_atstring (date-time)required

失効日時

withdrawable_atstring (date-time)required

出金可能になる日時

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-lots" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-lots", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/coin-lots/{lot_id}

コインロット詳細

コインロット詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
lot_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_lotobjectrequired
idstringrequired

コインロットID

user_idstringrequired

対象ユーザーID

source_typestringrequired

発行元種別

is_paidbooleanrequired

有償コインフラグ

is_withdrawablebooleanrequired

出金可能フラグ

total_amount_coininteger (int32)required

発行時コイン数

remaining_amount_coininteger (int32)required

残存コイン数

expires_atstring (date-time)required

失効日時

withdrawable_atstring (date-time)required

出金可能になる日時

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-lots/{lot_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/payments

決済一覧

IAP購入決済を一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
platform
string
status
string
from
string (date-time)
to
string (date-time)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

paymentsArray<object>required
idstringrequired

決済ID

user_idstringrequired

対象ユーザーID

platformstringrequired

決済プラットフォーム

provider_payment_idstringrequired

プロバイダー側決済IDのマスク済み表示値。raw purchaseToken / JWS は返さない

environmentstringrequired

Store / provider 環境(Apple: Sandbox/Production, Google: Test/Production)

store_product_idstringrequired

Apple / Google ストア側の商品 ID

provider_order_idstringrequired

Google Play orderId。Apple は null

amount_moneystringrequired

決済金額(文字列)

currencystringrequired

通貨コード

statusstringrequired

決済ステータス

coin_amountinteger (int64)required

付与されたコイン数

paid_atstring (date-time)required

決済日時

created_atstring (date-time)required

作成日時

store_completionsArray<object>

Store完了処理の状態。詳細取得時のみ返る

idstringrequired

Store完了処理ID

providerstringrequired

プロバイダー

environmentstringrequired

Store / provider 環境

actionstringrequired

完了処理種別

statusstringrequired

完了処理ステータス

store_product_idstringrequired

Apple / Google ストア側の商品 ID

retry_countinteger (int32)required

再試行回数

attempted_atstring (date-time)required

最終試行日時

next_attempt_atstring (date-time)required

次回再試行日時

succeeded_atstring (date-time)required

成功日時

last_error_codestringrequired

最後のエラーコード

last_error_messagestringrequired

最後のエラーメッセージ。token/JWS はマスク済み

provider_order_idstringrequired

Google Play orderId。Apple は null

provider_transaction_id_maskedstringrequired

Apple transactionId のマスク済み表示値

purchase_token_ref_idstringrequired

GooglePurchase 参照ID。raw purchaseToken ではない

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/payments" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/payments", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/payments/{payment_id}

決済詳細

決済詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
payment_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

paymentobjectrequired
idstringrequired

決済ID

user_idstringrequired

対象ユーザーID

platformstringrequired

決済プラットフォーム

provider_payment_idstringrequired

プロバイダー側決済IDのマスク済み表示値。raw purchaseToken / JWS は返さない

environmentstringrequired

Store / provider 環境(Apple: Sandbox/Production, Google: Test/Production)

store_product_idstringrequired

Apple / Google ストア側の商品 ID

provider_order_idstringrequired

Google Play orderId。Apple は null

amount_moneystringrequired

決済金額(文字列)

currencystringrequired

通貨コード

statusstringrequired

決済ステータス

coin_amountinteger (int64)required

付与されたコイン数

paid_atstring (date-time)required

決済日時

created_atstring (date-time)required

作成日時

store_completionsArray<object>

Store完了処理の状態。詳細取得時のみ返る

idstringrequired

Store完了処理ID

providerstringrequired

プロバイダー

environmentstringrequired

Store / provider 環境

actionstringrequired

完了処理種別

statusstringrequired

完了処理ステータス

store_product_idstringrequired

Apple / Google ストア側の商品 ID

retry_countinteger (int32)required

再試行回数

attempted_atstring (date-time)required

最終試行日時

next_attempt_atstring (date-time)required

次回再試行日時

succeeded_atstring (date-time)required

成功日時

last_error_codestringrequired

最後のエラーコード

last_error_messagestringrequired

最後のエラーメッセージ。token/JWS はマスク済み

provider_order_idstringrequired

Google Play orderId。Apple は null

provider_transaction_id_maskedstringrequired

Apple transactionId のマスク済み表示値

purchase_token_ref_idstringrequired

GooglePurchase 参照ID。raw purchaseToken ではない

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/payments/{payment_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
      }
    ]
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/payments/{payment_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

PaymentAuditTrail

get

/api/v1/payments/audit-trail

決済監査証跡取得

決済IDや購入意図IDなどから、決済から返金・回収・債務まで一括で監査証跡を取得します(管理者認証必須)。payment_id / purchase_intent_id / provider_payment_id+provider / payment_refund_id / user_id のいずれか1つが必須。

Parameters

ParameterTypeDescription
payment_id
string
purchase_intent_id
string
provider_payment_id
string
provider
string
payment_refund_id
string
user_id
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

itemsArray<object>required
purchase_intentobjectrequired
object
iap_ingress_eventsArray<object>required
idstringrequired
entrypointstringrequired
provider_payment_idstringrequired
receipt_sha256stringrequired
processed_atstring (date-time)required
created_atstring (date-time)required
iap_lifecycle_eventsArray<object>required
idstringrequired
event_typestringrequired
ingress_event_idstringrequired
created_atstring (date-time)required
verification_requestsArray<object>required
idstringrequired
purchase_intent_idstringrequired
statusstringrequired
retry_countinteger (int32)required
processed_atstring (date-time)required
created_atstring (date-time)required
verification_successobjectrequired
object
verification_failuresArray<object>required
idstringrequired
purchase_intent_idstringrequired
providerstringrequired
failure_reasonstringrequired
failed_atstring (date-time)required
paymentobjectrequired
object
apple_transactionobjectrequired
object
google_purchaseobjectrequired
object
provider_notification_eventsArray<object>required
idstringrequired
providerstringrequired
notification_typestringrequired
processing_statusstringrequired
payment_refund_idstringrequired
received_atstring (date-time)required
processed_atstring (date-time)required
coin_grant_outboxobjectrequired
object
paid_coin_grantobjectrequired
object
coin_transactionsArray<object>required
idstringrequired
payment_idstringrequired
user_coin_account_idstringrequired
typestringrequired
source_typestringrequired
amount_coininteger (int64)required
balance_after_coininteger (int64)required
reference_typestringrequired
reference_idstringrequired
created_atstring (date-time)required
coin_lot_changesArray<object>required
idstringrequired
coin_transaction_idstringrequired
coin_lot_idstringrequired
amountinteger (int64)required
created_atstring (date-time)required
coin_lotsArray<object>required
idstringrequired
statusstringrequired
remaining_coininteger (int64)required
expires_atstring (date-time)required
created_atstring (date-time)required
payment_refundsArray<object>required
idstringrequired
payment_idstringrequired
statusstringrequired
refund_coin_amountinteger (int64)required
recovered_coin_amountinteger (int64)required
shortfall_coin_amountinteger (int64)required
provider_refund_idstringrequired
created_atstring (date-time)required
payment_refund_eventsArray<object>required
idstringrequired
payment_refund_idstringrequired
event_typestringrequired
created_atstring (date-time)required
recovery_allocationsArray<object>required
idstringrequired
payment_refund_idstringrequired
coin_transaction_idstringrequired
coin_lot_idstringrequired
amountinteger (int64)required
created_atstring (date-time)required
recipient_recovery_targetsArray<object>required
idstringrequired
payment_refund_idstringrequired
gift_transaction_idstringrequired
receiver_user_coin_account_idstringrequired
target_coin_amountinteger (int64)required
recovered_coin_amountinteger (int64)required
shortfall_coin_amountinteger (int64)required
statusstringrequired
decision_reasonstringrequired
evidence_notestringrequired
decided_by_admin_user_idstringrequired
processed_atstring (date-time)required
created_atstring (date-time)required
debt_casesArray<object>required
idstringrequired
user_coin_account_idstringrequired
reasonstringrequired
reference_typestringrequired
reference_idstringrequired
original_amount_coininteger (int64)required
outstanding_coininteger (int64)required
statusstringrequired
created_atstring (date-time)required
settled_atstring (date-time)required
user_debtsArray<object>required
user_coin_account_idstringrequired
amount_coininteger (int64)required
reasonstringrequired
created_atstring (date-time)required
debt_settlementsArray<object>required
idstringrequired
debt_case_idstringrequired
user_coin_account_idstringrequired
amount_coininteger (int64)required
coin_transaction_idstringrequired
reasonstringrequired
performed_by_admin_idstringrequired
created_atstring (date-time)required
financial_report_rowsArray<object>required
idstringrequired
report_idstringrequired
payment_idstringrequired
payment_refund_idstringrequired
gross_amountstringrequired
reconciliation_statusstringrequired
reconciliation_findingsArray<object>required
idstringrequired
report_idstringrequired
row_idstringrequired
finding_typestringrequired
severitystringrequired
messagestringrequired
created_atstring (date-time)required
warningsArray<object>required
codestringrequired
messagestringrequired
related_idsArray<string>required
...
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/payments/audit-trail" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
          ]
        }
      ]
    }
  ]
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/payments/audit-trail", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

ProviderFinancialReports

get

/api/v1/provider-financial-reports

Store売上レポート一覧

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
provider
string
report_type
string
report_period
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

reportsArray<object>required
idstringrequired
providerstringrequired
report_typestringrequired
report_periodstringrequired
region_codestringrequired
vendor_numberstringrequired
source_file_sha256stringrequired
row_countinteger (int32)required
matched_countinteger (int32)required
finding_countinteger (int32)required
statusstringrequired
imported_by_admin_user_idstringrequired
imported_atstring (date-time)required
created_atstring (date-time)required
next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/provider-financial-reports/import

Store売上レポート取り込み

Apple/GoogleのStore売上レポートを管理者が手動アップロードし、Paymentと突合します。

Responses

200200 OK レスポンス
201201 Created レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

dry_runbooleanrequired
reportobjectrequired
object
rowsArray<object>required
idstring
report_idstring
line_numberinteger (int32)required
row_typestringrequired
provider_order_idstring
provider_transaction_idstring
store_product_idstring
country_or_regionstring
currencystring
gross_amountstring
tax_amountstring
store_fee_amountstring
net_proceeds_amountstring
exchange_ratestring
transaction_datestring (date-time)
settlement_datestring (date-time)
payment_idstring
payment_refund_idstring
reconciliation_statusstringrequired
match_strategystringrequired
raw_rowobjectrequired
object
created_atstring (date-time)
findingsArray<object>required
idstring
report_idstring
row_idstring
row_line_numberinteger (int32)
payment_idstring
payment_refund_idstring
finding_typestringrequired
severitystringrequired
statusstringrequired

ステータス: open / in_progress / resolved / dismissed

messagestringrequired
resolution_notestring
resolved_by_admin_user_idstring
resolved_atstring (date-time)
metadataobject
object
created_atstring (date-time)
summaryobjectrequired
row_countinteger (int32)required
matched_countinteger (int32)required
finding_countinteger (int32)required

Response Schema (201)

dry_runbooleanrequired
reportobjectrequired
object
rowsArray<object>required
idstring
report_idstring
line_numberinteger (int32)required
row_typestringrequired
provider_order_idstring
provider_transaction_idstring
store_product_idstring
country_or_regionstring
currencystring
gross_amountstring
tax_amountstring
store_fee_amountstring
net_proceeds_amountstring
exchange_ratestring
transaction_datestring (date-time)
settlement_datestring (date-time)
payment_idstring
payment_refund_idstring
reconciliation_statusstringrequired
match_strategystringrequired
raw_rowobjectrequired
object
created_atstring (date-time)
findingsArray<object>required
idstring
report_idstring
row_idstring
row_line_numberinteger (int32)
payment_idstring
payment_refund_idstring
finding_typestringrequired
severitystringrequired
statusstringrequired

ステータス: open / in_progress / resolved / dismissed

messagestringrequired
resolution_notestring
resolved_by_admin_user_idstring
resolved_atstring (date-time)
metadataobject
object
created_atstring (date-time)
summaryobjectrequired
row_countinteger (int32)required
matched_countinteger (int32)required
finding_countinteger (int32)required
Example Request
cURL
curl -X POST "http://localhost:8081/api/v1/provider-financial-reports/import" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/provider-financial-reports/import", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/provider-financial-reports/{report_id}

Store売上レポート詳細

Parameters

ParameterTypeDescription
report_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

reportobjectrequired
idstringrequired
providerstringrequired
report_typestringrequired
report_periodstringrequired
region_codestringrequired
vendor_numberstringrequired
source_file_sha256stringrequired
row_countinteger (int32)required
matched_countinteger (int32)required
finding_countinteger (int32)required
statusstringrequired
imported_by_admin_user_idstringrequired
imported_atstring (date-time)required
created_atstring (date-time)required
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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();
get

/api/v1/provider-financial-reports/{report_id}/findings

Store売上レポート突合差分一覧

Parameters

ParameterTypeDescription
report_id
REQUIRED
string
limit
integer (int32)
cursor
string
finding_type
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

findingsArray<object>required
idstring
report_idstring
row_idstring
row_line_numberinteger (int32)
payment_idstring
payment_refund_idstring
finding_typestringrequired
severitystringrequired
statusstringrequired

ステータス: open / in_progress / resolved / dismissed

messagestringrequired
resolution_notestring
resolved_by_admin_user_idstring
resolved_atstring (date-time)
metadataobject
object
created_atstring (date-time)
next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}/findings" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
patch

/api/v1/provider-financial-reports/{report_id}/findings/{finding_id}

突合差分ステータス更新

突合差分のステータスを更新します(open / in_progress / resolved / dismissed)

Parameters

ParameterTypeDescription
report_id
REQUIRED
string
finding_id
REQUIRED
string

Request Body

statusstringrequired

新しいステータス: open / in_progress / resolved / dismissed

resolution_notestring

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

findingobjectrequired
idstring
report_idstring
row_idstring
row_line_numberinteger (int32)
payment_idstring
payment_refund_idstring
finding_typestringrequired
severitystringrequired
statusstringrequired

ステータス: open / in_progress / resolved / dismissed

messagestringrequired
resolution_notestring
resolved_by_admin_user_idstring
resolved_atstring (date-time)
metadataobject
object
created_atstring (date-time)
Example Request
cURL
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"
}'
Response200 OK
{
  "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"
  }
}
Node.js
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();
get

/api/v1/provider-financial-reports/{report_id}/rows

Store売上レポート明細一覧

Parameters

ParameterTypeDescription
report_id
REQUIRED
string
limit
integer (int32)
cursor
string
reconciliation_status
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

rowsArray<object>required
idstring
report_idstring
line_numberinteger (int32)required
row_typestringrequired
provider_order_idstring
provider_transaction_idstring
store_product_idstring
country_or_regionstring
currencystring
gross_amountstring
tax_amountstring
store_fee_amountstring
net_proceeds_amountstring
exchange_ratestring
transaction_datestring (date-time)
settlement_datestring (date-time)
payment_idstring
payment_refund_idstring
reconciliation_statusstringrequired
match_strategystringrequired
raw_rowobjectrequired
object
created_atstring (date-time)
next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/provider-financial-reports/{report_id}/rows" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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

get

/api/v1/iap-restore-requests

購入復元履歴一覧

購入復元受付履歴を一覧取得します。receipt 原文や秘密情報は返しません。

Parameters

ParameterTypeDescription
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

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

iap_restore_requestsArray<object>required
idstringrequired

購入復元受付ID

user_idstringrequired

対象ユーザーID

platformstringrequired

プラットフォーム

entrypointunknownrequired

復元入口

statusunknownrequired

復元受付ステータス

requested_atstring (date-time)required

復元受付日時

completed_atstring (date-time)required

復元完了日時

response_balance_coininteger (int64)required

復元 API レスポンス時点の残高 snapshot

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

receipt_summaryunknownrequired

receipt ごとの処理結果サマリー

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/iap-restore-requests" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/iap-restore-requests", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/iap-restore-requests/{restore_request_id}

購入復元履歴詳細

購入復元受付 1 件と receipt ごとの処理結果を取得します。receipt 原文や秘密情報は返しません。

Parameters

ParameterTypeDescription
restore_request_id
REQUIRED
string (uuid)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

iap_restore_requestobjectrequired
idstringrequired

購入復元受付ID

user_idstringrequired

対象ユーザーID

platformstringrequired

プラットフォーム

entrypointunknownrequired

復元入口

statusunknownrequired

復元受付ステータス

requested_atstring (date-time)required

復元受付日時

completed_atstring (date-time)required

復元完了日時

response_balance_coininteger (int64)required

復元 API レスポンス時点の残高 snapshot

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

receipt_summaryunknownrequired

receipt ごとの処理結果サマリー

receipt_resultsArray<object>required
idstringrequired

購入復元 receipt 結果ID

restore_request_idstringrequired

購入復元受付ID

client_restore_item_idstringrequired

App 側の復元 item ID

receipt_sha256stringrequired

receipt SHA-256

statusunknownrequired

receipt 処理ステータス

payment_idstringrequired

決済ID

purchase_intent_idstringrequired

購入意図ID

provider_payment_idstringrequired

プロバイダー側決済ID

store_product_idstringrequired

Store 商品ID

coin_amountinteger (int64)required

付与コイン数

failure_reasonstringrequired

失敗理由

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/iap-restore-requests/{restore_request_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
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

get

/api/v1/coin-transactions

コイン取引一覧

全ユーザー横断でコイン取引台帳を一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
type
string
source_type
string
reference_type
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_transactionsArray<object>required
idstringrequired

コイン取引ID

user_idstringrequired

対象ユーザーID

amount_coininteger (int32)required

増減コイン数(正: 増加 / 負: 減少)

typestringrequired

取引種別(例: earn / spend / expire)

source_typestringrequired

ソース種別(例: iap / gift / admin / refund / expire / withdrawal)

reference_typestringrequired

参照種別

reference_idstringrequired

参照ID

balance_after_coininteger (int32)required

取引後残高

occurred_atstring (date-time)required

取引発生日時

created_atstring (date-time)required

作成日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-transactions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/coin-transactions", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/coin-transactions/{transaction_id}

コイン取引詳細

コイン取引詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
transaction_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

coin_transactionobjectrequired
idstringrequired

コイン取引ID

user_idstringrequired

対象ユーザーID

amount_coininteger (int32)required

増減コイン数(正: 増加 / 負: 減少)

typestringrequired

取引種別(例: earn / spend / expire)

source_typestringrequired

ソース種別(例: iap / gift / admin / refund / expire / withdrawal)

reference_typestringrequired

参照種別

reference_idstringrequired

参照ID

balance_after_coininteger (int32)required

取引後残高

occurred_atstring (date-time)required

取引発生日時

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/coin-transactions/{transaction_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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

get

/api/v1/user-coin-balances

ユーザーコイン残高一覧

ユーザーコイン残高スナップショットを横断で一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
user_id
string
min_balance
integer (int32)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

user_coin_balancesArray<object>required
user_idstringrequired

対象ユーザーID

balance_coininteger (int32)required

残高コイン数

updated_atstring (date-time)required

最終更新日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/user-coin-balances" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "user_coin_balances": [
    {
      "user_id": "string",
      "balance_coin": 0,
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/user-coin-balances", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

Users

get

/api/v1/users

ユーザー一覧

一般ユーザーを一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
account_status
string
username_like
string
display_name_like
string
include_deleted
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

usersArray<object>required
idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

biostringrequired

自己紹介

short_messagestringrequired

短文メッセージ

account_statusstringrequired

アカウント状態

status_changed_atstring (date-time)required

状態変更日時

withdrawn_atstring (date-time)required

退会日時

deleted_atstring (date-time)required

削除日時

suspended_atstring (date-time)required

凍結日時

profile_image_idstringrequired

プロフィール画像ID

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/users" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/users", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/users/{user_id}

ユーザー詳細

ユーザー詳細を取得します(管理者認証必須)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string

Responses

200200 OK レスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

userobjectrequired
followers_countinteger (int32)required

フォロワー数

following_countinteger (int32)required

フォロー数

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/users/{user_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "user": {
    "followers_count": 0,
    "following_count": 0
  }
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/users/{user_id}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

Stats

get

/api/v1/stats/overview

ダッシュボード集計サマリー

コイン流通量・売上・利益(返金考慮あり/なし)を一括取得します

Parameters

ParameterTypeDescription
from
string (date-time)
to
string (date-time)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

fromstring (date-time)required

集計開始日時 (ISO8601, UTC)

tostring (date-time)required

集計終了日時 (ISO8601, UTC)

coins_in_circulationinteger (int64)required

流通コイン数 (時点値, 全ユーザーの残高合計, from/to の影響を受けない)

revenuenumber (double)required

売上 (期間中の status='succeeded' かつ currency='JPY' な Payment の amount_money 合計, 円。非 JPY 決済は集計対象外)

profit_excl_refundsnumber (double)required

利益 (返金除外: revenue − 期間中の status='paid' な Withdrawal.net_amount_yen 合計)

profit_incl_refundsnumber (double)required

利益 (返金控除: profit_excl_refunds − 期間中の status='succeeded' な PaymentRefund.refund_amount_money 合計)

Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/stats/overview" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/stats/overview", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();

ReconciliationJobRuns

get

/api/v1/reconciliation-job-runs

照合ジョブ実行一覧

照合ジョブの実行履歴を一覧取得します(管理者認証必須)

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
provider
string
job_type
string
status
string

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

itemsArray<object>required
idstringrequired

ジョブ実行ID

providerstringrequired

決済プロバイダー(google / apple)

job_typestringrequired

ジョブ種別

statusstringrequired

実行ステータス(running / completed / failed)

started_atstring (date-time)required

開始日時

completed_atstring (date-time)required

完了日時

total_itemsinteger (int32)required

処理対象件数

processed_itemsinteger (int32)required

処理済み件数

error_countinteger (int32)required

エラー件数

dry_runbooleanrequired

ドライラン実行かどうか

created_atstring (date-time)required

作成日時

updated_atstring (date-time)required

更新日時

next_cursorstringrequired
Example Request
cURL
curl -X GET "http://localhost:8081/api/v1/reconciliation-job-runs" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("http://localhost:8081/api/v1/reconciliation-job-runs", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();