Revost API
101 endpoints across 30 resource groups
System
/api/v1/health
ヘルスチェック
サーバーの動作状態を確認するエンドポイント(認証不要)
Responses
curl -X GET "https://dev.api.revost.app/api/v1/health"const response = await fetch("https://dev.api.revost.app/api/v1/health", {
method: "GET",
});
const data = await response.json();Auth
/api/v1/auth/line
LINE認証
LINEアクセストークンを検証し、Firebase Custom Tokenを返します
Request Body
LINE IDトークン
LINE nonce
Responses
Response Schema (200)
Firebase Custom Token
LINEの表示名
curl -X POST "https://dev.api.revost.app/api/v1/auth/line" \
-H "Content-Type: application/json" \
-d '{
"id_token": "string",
"nonce": "string"
}'{
"firebase_custom_token": "string",
"line_display_name": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/auth/line", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"id_token": "string",
"nonce": "string"
})
});
const data = await response.json();Me
/api/v1/me
自分のユーザー情報取得
認証されたユーザーの情報を取得します
Responses
Response Schema (200)
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
シフトのデフォルト公開範囲
アカウント状態
退会日時
削除日時
凍結日時
curl -X GET "https://dev.api.revost.app/api/v1/me" \
-H "Authorization: Bearer <token>"{
"user": {
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"default_shift_visibility": null,
"account_status": null,
"withdrawn_at": "2024-01-01T00:00:00Z",
"deleted_at": "2024-01-01T00:00:00Z",
"suspended_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/me", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me
自分のユーザー情報作成
認証されたユーザーの情報を作成/登録します
Request Body
ユーザー名
表示名
自己紹介文(省略時はデフォルト値が設定されます)
一言メッセージ(省略時はデフォルト値が設定されます)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/me" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"username": "string",
"display_name": "string",
"bio": "string",
"short_message": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/me", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "string",
"display_name": "string",
"bio": "string",
"short_message": "string"
})
});
const data = await response.json();/api/v1/me
自分のプロフィール更新
display_name、bio、short_message、default_shift_visibilityを部分更新します。少なくとも1つのフィールドを指定する必要があります。
Request Body
表示名。nullを指定すると更新しません。
自己紹介文。undefined/nullを指定すると更新しません。
一言メッセージ。undefined/nullを指定すると更新しません。
シフトのデフォルト公開範囲。nullを指定すると更新しません。
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/me" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"display_name": "string",
"bio": "string",
"short_message": "string",
"default_shift_visibility": null
}'const response = await fetch("https://dev.api.revost.app/api/v1/me", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"display_name": "string",
"bio": "string",
"short_message": "string",
"default_shift_visibility": null
})
});
const data = await response.json();/api/v1/me
自分のユーザー削除
認証されたユーザーを削除します(本人のみ、認証必須)
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/me" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/me", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/profile-image
自分のプロフィール画像更新
プロフィール画像をbase64でアップロードして更新します。
Request Body
プロフィール画像のbase64エンコード文字列(data URI形式可)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/me/profile-image" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"profile_image_base64": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/profile-image", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"profile_image_base64": "string"
})
});
const data = await response.json();/api/v1/me/restore
自分のユーザー復帰
削除されたユーザーを復帰させます(本人のみ、認証必須、削除から10日以内のみ可能)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/me/restore" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/me/restore", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/username
自分のユーザー名更新
ユーザー名を更新します。
Request Body
ユーザー名
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/me/username" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"username": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/username", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "string"
})
});
const data = await response.json();terms-of-service
/api/v1/terms-of-service/agreements
自分の利用規約同意記録取得
自分の利用規約同意記録を取得します(認証必須)
Responses
Response Schema (200)
ユーザーが同意した利用規約のバージョン(同意記録がない場合はnull)
ユーザーが同意した日時(同意記録がない場合はnull)
システム全体の最新の利用規約バージョン
最新の利用規約バージョンの更新日時
curl -X GET "https://dev.api.revost.app/api/v1/terms-of-service/agreements" \
-H "Authorization: Bearer <token>"{
"app_terms_agree_version": "string",
"app_terms_agree_at": "2024-01-01T00:00:00Z",
"latest_terms_agree_version": "string",
"latest_terms_update_at": "2024-01-01T00:00:00Z"
}const response = await fetch("https://dev.api.revost.app/api/v1/terms-of-service/agreements", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/terms-of-service/agreements
利用規約に同意
利用規約に同意します(認証必須、同じバージョンへの重複同意は不可)
Request Body
利用規約のバージョン
Responses
curl -X POST "https://dev.api.revost.app/api/v1/terms-of-service/agreements" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"version": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/terms-of-service/agreements", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"version": "string"
})
});
const data = await response.json();Users
/api/v1/users
ユーザー取得
指定されたIDまたはユーザー名でユーザーを取得します(認証不要)。user_id または username のいずれか一方を指定してください。
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id | string | — |
username | string | — |
Responses
Response Schema (200)
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
アカウント状態
フォロー中の数
フォロワーの数
curl -X GET "https://dev.api.revost.app/api/v1/users"{
"user": {
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"account_status": null,
"following_count": 0,
"followers_count": 0
}
}const response = await fetch("https://dev.api.revost.app/api/v1/users", {
method: "GET",
});
const data = await response.json();/api/v1/users/search
ユーザー検索
クエリ文字列でユーザーを検索します(認証不要)。ユーザー名の前方一致と表示名の部分一致で検索します。
Parameters
| Parameter | Type | Description |
|---|---|---|
q REQUIRED | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
アカウント状態
フォロー中の数
フォロワーの数
curl -X GET "https://dev.api.revost.app/api/v1/users/search"{
"users": [
{
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"account_status": null,
"following_count": 0,
"followers_count": 0
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/users/search", {
method: "GET",
});
const data = await response.json();/api/v1/users/{user_id}/check-ins
公開チェックイン一覧
指定ユーザーの公開可能なチェックイン履歴を新しい順に取得します。現状は kind=BEER_CHEERS のみ公開対象です。
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
kind | string | チェックインの種別 |
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
公開チェックイン一覧
CheckIn ID
公開するチェックイン種別。現状は BEER_CHEERS のみ
店舗
チェックイン日時
次ページ cursor。次ページが無い場合 null
次ページの有無
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/check-ins"{
"items": [
{
"id": "string",
"kind": null,
"place": null,
"checked_in_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/check-ins", {
method: "GET",
});
const data = await response.json();Usernames
/api/v1/usernames/{username}/availability
ユーザー名の利用可能チェック
指定されたユーザー名が利用可能かどうかを確認します(認証不要)。
Parameters
| Parameter | Type | Description |
|---|---|---|
username REQUIRED | string | — |
Responses
Response Schema (200)
利用可能かどうか
curl -X GET "https://dev.api.revost.app/api/v1/usernames/{username}/availability"{
"available": true
}const response = await fetch("https://dev.api.revost.app/api/v1/usernames/{username}/availability", {
method: "GET",
});
const data = await response.json();Place
/api/v1/places
場所詳細取得
指定されたIDの場所の詳細を取得します。place_id または google_place_id のいずれか一方を指定してください。
Parameters
| Parameter | Type | Description |
|---|---|---|
place_id | string | — |
google_place_id | string | — |
Responses
Response Schema (200)
場所ID
Google MapのID
場所名
住所
緯度
経度
都道府県コード
Google Placeのプライマリータイプ (例: cafe, restaurant)
曜日別営業時間テキスト (例: ["月曜日: 9:00~22:00", ...])
curl -X GET "https://dev.api.revost.app/api/v1/places"{
"place": {
"id": "string",
"google_map_id": "string",
"name": "string",
"address": "string",
"latitude": 0,
"longitude": 0,
"prefecture_code": 0,
"primary_type": "string",
"weekday_descriptions": [
"string"
]
}
}const response = await fetch("https://dev.api.revost.app/api/v1/places", {
method: "GET",
});
const data = await response.json();/api/v1/places/autocomplete
オートコンプリート検索
Google Places APIを使用してオートコンプリート候補を取得します
Request Body
検索テキスト
緯度(位置バイアス用)
経度(位置バイアス用)
半径(メートル単位、位置バイアス用)
含めるプライマリータイプ
セッショントークン
Responses
Response Schema (200)
場所候補
curl -X POST "https://dev.api.revost.app/api/v1/places/autocomplete" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"input": "string",
"latitude": 0,
"longitude": 0,
"radius": 0,
"included_primary_types": [
"string"
],
"session_token": "string"
}'{
"suggestions": [
{
"place_prediction": null
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/places/autocomplete", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"input": "string",
"latitude": 0,
"longitude": 0,
"radius": 0,
"included_primary_types": [
"string"
],
"session_token": "string"
})
});
const data = await response.json();/api/v1/places/reverse-geocode
リバースジオコーディング
Google Geocoding APIを使用して緯度・経度から住所を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
latitude REQUIRED | number (float) | — |
longitude REQUIRED | number (float) | — |
Responses
Response Schema (200)
フォーマット済み住所
都道府県と市区町村
curl -X GET "https://dev.api.revost.app/api/v1/places/reverse-geocode" \
-H "Authorization: Bearer <token>"{
"formatted_address": "string",
"prefecture_and_city": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/places/reverse-geocode", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/places/search-text
テキスト検索
Google Places APIを使用してテキストクエリで場所を検索します
Request Body
検索テキスト
場所タイプ(1つのみ指定可能)
緯度
経度
半径(メートル単位)
Responses
Response Schema (200)
Google Place ID
表示名
フォーマット済み住所
位置情報
curl -X POST "https://dev.api.revost.app/api/v1/places/search-text" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"text_query": "string",
"included_type": "string",
"latitude": 0,
"longitude": 0,
"radius": 0
}'{
"places": [
{
"google_place_id": "string",
"display_name": "string",
"formatted_address": "string",
"location": null
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/places/search-text", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"text_query": "string",
"included_type": "string",
"latitude": 0,
"longitude": 0,
"radius": 0
})
});
const data = await response.json();Staff
/api/v1/staffs
スタッフ一覧取得
place_id または user_id でフィルタリングしてスタッフ一覧を取得します(在籍中のみ)。place_id と user_id の両方指定時は両方に該当するスタッフを返します。
Parameters
| Parameter | Type | Description |
|---|---|---|
place_id | string | — |
user_id | string | — |
offset | integer (int32) | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
場所ID
Google MapのID
場所名
住所
緯度
経度
都道府県コード
Google Placeのプライマリータイプ (例: cafe, restaurant)
曜日別営業時間テキスト (例: ["月曜日: 9:00~22:00", ...])
curl -X GET "https://dev.api.revost.app/api/v1/staffs"{
"staffs": null,
"place": {
"id": "string",
"google_map_id": "string",
"name": "string",
"address": "string",
"latitude": 0,
"longitude": 0,
"prefecture_code": 0,
"primary_type": "string",
"weekday_descriptions": [
"string"
]
},
"total": 0,
"has_more": true
}const response = await fetch("https://dev.api.revost.app/api/v1/staffs", {
method: "GET",
});
const data = await response.json();/api/v1/staffs
スタッフ登録
指定された場所に自分自身をスタッフとして登録します(認証されたユーザーのIDが使用されます)
Request Body
Google Place ID
Responses
Response Schema (201)
作成されたスタッフID
curl -X POST "https://dev.api.revost.app/api/v1/staffs" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"google_place_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/staffs", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"google_place_id": "string"
})
});
const data = await response.json();/api/v1/staffs/{staff_id}
スタッフ詳細取得
指定されたIDのスタッフ情報を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
staff_id REQUIRED | string | — |
Responses
Response Schema (200)
スタッフID
場所情報
ユーザー情報
入店日時
スタッフステータス
退職日時(退職していない場合はnull)
削除日時(削除されていない場合はnull)
curl -X GET "https://dev.api.revost.app/api/v1/staffs/{staff_id}"{
"staff": {
"id": "string",
"place": null,
"user": null,
"joined_at": "2024-01-01T00:00:00Z",
"staff_status": "string",
"left_at": "2024-01-01T00:00:00Z",
"deleted_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/staffs/{staff_id}", {
method: "GET",
});
const data = await response.json();/api/v1/staffs/{staff_id}
スタッフ情報更新
指定されたスタッフの情報を更新します(退職処理)
Parameters
| Parameter | Type | Description |
|---|---|---|
staff_id REQUIRED | string | — |
Request Body
退職フラグ(trueの場合のみ退職処理を実行。未指定の場合は更新なし)
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/staffs/{staff_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"left": true
}'const response = await fetch("https://dev.api.revost.app/api/v1/staffs/{staff_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"left": true
})
});
const data = await response.json();/api/v1/staffs/{staff_id}
スタッフ削除
指定されたスタッフを削除します(ソフトデリート)
Parameters
| Parameter | Type | Description |
|---|---|---|
staff_id REQUIRED | string | — |
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/staffs/{staff_id}" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/staffs/{staff_id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/staffs/{staff_id}/restore
スタッフ復帰
削除されたスタッフを復帰させます
Parameters
| Parameter | Type | Description |
|---|---|---|
staff_id REQUIRED | string | — |
Responses
curl -X POST "https://dev.api.revost.app/api/v1/staffs/{staff_id}/restore" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/staffs/{staff_id}/restore", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Shifts
/api/v1/shifts
シフト一覧取得
シフト一覧を取得します。place_id, user_id でフィルタリングできます。認証済みで user_id を省略した場合は自分のシフト(PRIVATE含む)を返します。認証トークンがない場合はPUBLICのシフトのみ取得します。
Parameters
| Parameter | Type | Description |
|---|---|---|
start_date REQUIRED | string (date-time) | — |
end_date REQUIRED | string (date-time) | — |
user_id | string | — |
place_id | string | — |
offset | integer | — |
limit | integer | — |
Responses
Response Schema (200)
シフトID
繰り返し展開後のインスタンスID
開始日時
終了日時
繰り返しルール(iCalendar RRULE)。null は単発
公開レベル
備考
タイムゾーン
スタッフ情報
場所情報
シフトステータス
削除日時
curl -X GET "https://dev.api.revost.app/api/v1/shifts"{
"shifts": [
{
"id": "string",
"instance_id": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"rrule": "string",
"visibility": null,
"notes": "string",
"timezone": "string",
"staff": null,
"place": null,
"shift_status": "string",
"deleted_at": "2024-01-01T00:00:00Z"
}
],
"total": 0,
"has_more": true
}const response = await fetch("https://dev.api.revost.app/api/v1/shifts", {
method: "GET",
});
const data = await response.json();/api/v1/shifts
シフト作成
新しいシフトを作成します(認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
スタッフID
開始日時
終了日時
公開レベル
備考
繰り返しルール(iCalendar RRULE)。省略時は単発
タイムゾーン
Responses
Response Schema (201)
作成されたシフトID
curl -X POST "https://dev.api.revost.app/api/v1/shifts" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"staff_id": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"visibility": null,
"notes": "string",
"rrule": "string",
"timezone": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/shifts", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"staff_id": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"visibility": null,
"notes": "string",
"rrule": "string",
"timezone": "string"
})
});
const data = await response.json();/api/v1/shifts/calendar
カレンダー日付取得
指定期間内でシフトが存在する日付の一覧を返します。カレンダーグリッドのドット表示用の軽量エンドポイントです。認証済みの場合は可視性ルールに基づき日付を返します。
Parameters
| Parameter | Type | Description |
|---|---|---|
start_date REQUIRED | string (date-time) | — |
end_date REQUIRED | string (date-time) | — |
user_id | string | — |
place_id | string | — |
timezone | string | — |
Responses
Response Schema (200)
シフトが存在する日付の一覧(YYYY-MM-DD形式、ソート済み)
curl -X GET "https://dev.api.revost.app/api/v1/shifts/calendar"{
"dates": [
"string"
]
}const response = await fetch("https://dev.api.revost.app/api/v1/shifts/calendar", {
method: "GET",
});
const data = await response.json();/api/v1/shifts/{shift_id}
シフト1件取得
指定されたIDのシフト情報を取得します。公開レベルに応じてアクセス制御されます(認証オプション)
Parameters
| Parameter | Type | Description |
|---|---|---|
shift_id REQUIRED | string | — |
Responses
Response Schema (200)
シフトID
繰り返し展開後のインスタンスID
開始日時
終了日時
繰り返しルール(iCalendar RRULE)。null は単発
公開レベル
備考
タイムゾーン
スタッフ情報
場所情報
シフトステータス
削除日時
curl -X GET "https://dev.api.revost.app/api/v1/shifts/{shift_id}"{
"shift": {
"id": "string",
"instance_id": "string",
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"rrule": "string",
"visibility": null,
"notes": "string",
"timezone": "string",
"staff": null,
"place": null,
"shift_status": "string",
"deleted_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}", {
method: "GET",
});
const data = await response.json();/api/v1/shifts/{shift_id}
シフト更新
指定されたIDのシフトを更新します(認証必須、作成者のみ)。過去のシフト(end_at < NOW())は編集不可です。
Parameters
| Parameter | Type | Description |
|---|---|---|
shift_id REQUIRED | string | — |
Request Body
開始日時(nullで更新しない)
終了日時(nullで更新しない)
公開レベル(nullで更新しない)
備考
繰り返しルール(iCalendar RRULE)(nullで更新しない)
この日以降を変更する場合の起点日(YYYY-MM-DD)。繰り返しシフトのみ有効。指定時は元の繰り返しを打ち切り、新規シフトをこの日以降に作成
タイムゾーン
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/shifts/{shift_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"visibility": null,
"notes": "string",
"rrule": "string",
"from_occurrence_date": "string",
"timezone": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"visibility": null,
"notes": "string",
"rrule": "string",
"from_occurrence_date": "string",
"timezone": "string"
})
});
const data = await response.json();/api/v1/shifts/{shift_id}
シフト削除
指定されたIDのシフトを削除します(ソフトデリート、認証必須、作成者のみ)
Parameters
| Parameter | Type | Description |
|---|---|---|
shift_id REQUIRED | string | — |
from_occurrence_date | string | — |
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/shifts/{shift_id}" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}
シフト例外解除
例外を解除します。該当日は再び RRULE に従って表示されます(認証必須、作成者のみ)
Parameters
| Parameter | Type | Description |
|---|---|---|
shift_id REQUIRED | string | — |
occurrence_date REQUIRED | string | — |
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}
シフト例外追加/更新
繰り返しシフトの特定日のキャンセルまたは変更を登録・更新します(認証必須、作成者のみ)。単発シフトには例外を追加できません。
Parameters
| Parameter | Type | Description |
|---|---|---|
shift_id REQUIRED | string | — |
occurrence_date REQUIRED | string | — |
Request Body
例外の種類
変更後の開始日時(MODIFIED の場合必須)
変更後の終了日時(MODIFIED の場合必須)
変更後の備考(MODIFIED の場合)
Responses
curl -X PUT "https://dev.api.revost.app/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"exception_type": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"notes": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"exception_type": null,
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-01-01T00:00:00Z",
"notes": "string"
})
});
const data = await response.json();Follow
/api/v1/users/{user_id}/follow
フォローする
指定されたユーザーをフォローします(認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
Responses
curl -X POST "https://dev.api.revost.app/api/v1/users/{user_id}/follow" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/follow", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/users/{user_id}/follow
フォロー解除
指定されたユーザーのフォローを解除します(認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/users/{user_id}/follow" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/follow", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/users/{user_id}/follow-status
フォロー状態を確認
指定されたユーザーをフォローしているかどうかを確認します(認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
Responses
Response Schema (200)
フォローしているかどうか
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/follow-status" \
-H "Authorization: Bearer <token>"{
"is_following": true
}const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/follow-status", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/users/{user_id}/followers
フォロワー一覧を取得
指定されたユーザーをフォローしているユーザー一覧を取得します(認証不要、公開情報、カーソルページネーション)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
ユーザー一覧
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
アカウント状態
フォロー中の数
フォロワーの数
次ページカーソル
次ページがあるかどうか
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/followers"{
"users": [
{
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"account_status": null,
"following_count": 0,
"followers_count": 0
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/followers", {
method: "GET",
});
const data = await response.json();/api/v1/users/{user_id}/following
フォロー中一覧を取得
指定されたユーザーがフォローしているユーザー一覧を取得します(認証不要、公開情報、カーソルページネーション)
Parameters
| Parameter | Type | Description |
|---|---|---|
user_id REQUIRED | string | — |
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
ユーザー一覧
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
アカウント状態
フォロー中の数
フォロワーの数
次ページカーソル
次ページがあるかどうか
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/following"{
"users": [
{
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"account_status": null,
"following_count": 0,
"followers_count": 0
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/following", {
method: "GET",
});
const data = await response.json();ShiftVisibilityAllowlist
/api/v1/shift-visibility-allowlist
シフト閲覧許可リスト一覧取得
自分がシフトの限定公開対象として登録したユーザー一覧を取得します(認証必須)
Responses
Response Schema (200)
ユーザーID
ユーザー名
表示名
プロフィール画像URL
自己紹介文
一言メッセージ
アカウント状態
フォロー中の数
フォロワーの数
curl -X GET "https://dev.api.revost.app/api/v1/shift-visibility-allowlist" \
-H "Authorization: Bearer <token>"{
"shift_visibility_allowlist": [
{
"id": "string",
"username": "string",
"display_name": "string",
"profile_image_url": "https://example.com",
"bio": "string",
"short_message": "string",
"account_status": null,
"following_count": 0,
"followers_count": 0
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/shift-visibility-allowlist", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/shift-visibility-allowlist
シフト閲覧許可リストに追加
シフトの限定公開対象として追加します(認証必須)。自分自身を追加することはできません。
Request Body
シフト閲覧許可リストに追加するユーザーIDのリスト(最大100件)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/shift-visibility-allowlist" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"user_ids": [
"string"
]
}'const response = await fetch("https://dev.api.revost.app/api/v1/shift-visibility-allowlist", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"user_ids": [
"string"
]
})
});
const data = await response.json();/api/v1/shift-visibility-allowlist
シフト閲覧許可リストから削除
指定されたユーザーIDをシフト閲覧許可リストから削除します(認証必須)。複数のユーザーを一度に削除できます。
Request Body
削除対象のユーザーIDのリスト(最大100件)
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/shift-visibility-allowlist" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"user_ids": [
"string"
]
}'const response = await fetch("https://dev.api.revost.app/api/v1/shift-visibility-allowlist", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"user_ids": [
"string"
]
})
});
const data = await response.json();Invitation
/api/v1/invitations
自分の招待コード取得
自分の招待コードを取得します(認証必須)
Responses
Response Schema (200)
招待ID
招待コード
招待者情報
最大使用回数
現在の使用回数
作成日時
curl -X GET "https://dev.api.revost.app/api/v1/invitations" \
-H "Authorization: Bearer <token>"{
"invitation": {
"id": "string",
"code": "string",
"inviter": null,
"max_uses": 0,
"usage_count": 0,
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/invitations", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/invitations
自分の招待コードを発行
自分の招待コードを発行します(認証必須、1人1つまで)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/invitations" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/invitations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/invitations/eligibility
招待コード利用可否チェック
認証ユーザーが招待コードを利用できるか確認します(認証必須)
Responses
Response Schema (200)
招待コード利用可否ステータス
curl -X GET "https://dev.api.revost.app/api/v1/invitations/eligibility" \
-H "Authorization: Bearer <token>"{
"status": "available"
}const response = await fetch("https://dev.api.revost.app/api/v1/invitations/eligibility", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/invitations/use
招待コードを使用
招待コードを使用します(認証必須、アカウント作成から72時間以内のみ有効)
Request Body
招待コード
デバイスID
Responses
curl -X POST "https://dev.api.revost.app/api/v1/invitations/use" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"code": "string",
"device_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/invitations/use", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"code": "string",
"device_id": "string"
})
});
const data = await response.json();Coin
/api/v1/coin/balance
コイン残高取得
認証ユーザーのコイン残高を取得します
Responses
Response Schema (200)
コイン残高
未返済の債務コイン数
curl -X GET "https://dev.api.revost.app/api/v1/coin/balance" \
-H "Authorization: Bearer <token>"{
"balance": {
"balance_coin": 0,
"debt_coin": 0
}
}const response = await fetch("https://dev.api.revost.app/api/v1/coin/balance", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin/transactions
コイン取引履歴一覧
認証ユーザーのコイン取引履歴を新しい順で取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
type | string | コイン取引タイプ |
Responses
Response Schema (200)
コイン取引一覧(新しい順)
取引ID
取引コイン数(増加は正、減少は負)
取引タイプ
発生元
取引後残高
参照種別
参照ID
作成日時
次ページ取得用カーソル
curl -X GET "https://dev.api.revost.app/api/v1/coin/transactions" \
-H "Authorization: Bearer <token>"{
"transactions": [
{
"id": "string",
"amount_coin": 0,
"type": null,
"source_type": null,
"balance_after_coin": 0,
"reference_type": "string",
"reference_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/coin/transactions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/coin/transactions/{transaction_id}
コイン取引詳細
認証ユーザーの指定コイン取引の詳細を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction_id REQUIRED | string | — |
Responses
Response Schema (200)
取引ID
取引コイン数(増加は正、減少は負)
取引タイプ
発生元
取引後残高
参照種別
参照ID
作成日時
curl -X GET "https://dev.api.revost.app/api/v1/coin/transactions/{transaction_id}" \
-H "Authorization: Bearer <token>"{
"transaction": {
"id": "string",
"amount_coin": 0,
"type": null,
"source_type": null,
"balance_after_coin": 0,
"reference_type": "string",
"reference_id": "string",
"created_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/coin/transactions/{transaction_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();PaymentIntents
/api/v1/payment-intents
PaymentIntent 一覧
認証ユーザーの起動時回収対象 PaymentIntent を取得します。pending / verification_pending / grant_pending など、アプリが新規購入を作らず回収・待機すべき状態を返します
Parameters
| Parameter | Type | Description |
|---|---|---|
scope | string | 取得範囲。recoverable は起動時回収・復帰時回収で扱う未完了 intent を返します |
status | string | 後方互換用。旧クライアントの status=pending 指定でも recoverable 一覧を返します |
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
PaymentIntent 一覧(新しい順)
PaymentIntent ID
プラットフォーム
Revost の IAP 商品マスタ ID。古い intent では null の場合がある
Apple / Google ストア側の商品 ID
Store 購入に渡した照合 ID。起動時回収や webhook 照合で PurchaseIntent を特定する
ステータス
作成日時
完了日時。未完了の場合は null
次ページ取得用カーソル
curl -X GET "https://dev.api.revost.app/api/v1/payment-intents" \
-H "Authorization: Bearer <token>"{
"payment_intents": [
{
"id": "string",
"platform": null,
"iap_product_id": "string",
"store_product_id": "string",
"store_correlation_id": "string",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z",
"completed_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/payment-intents", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payment-intents
PaymentIntent 作成
IAP の決済開始状態を PaymentIntent として新規作成します
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
Revost の IAP 商品マスタ ID
プラットフォーム
Responses
Response Schema (201)
PaymentIntent ID
Apple / Google ストア側の商品 ID
Store 購入に渡す照合 ID。Apple appAccountToken / Google obfuscatedExternalAccountId に入れる
curl -X POST "https://dev.api.revost.app/api/v1/payment-intents" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"iap_product_id": "string",
"platform": null
}'const response = await fetch("https://dev.api.revost.app/api/v1/payment-intents", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"iap_product_id": "string",
"platform": null
})
});
const data = await response.json();/api/v1/payment-intents/{payment_intent_id}
PaymentIntent 詳細
認証ユーザーの指定 PaymentIntent の状態を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
payment_intent_id REQUIRED | string | — |
Responses
Response Schema (200)
PaymentIntent ID
プラットフォーム
Revost の IAP 商品マスタ ID。古い intent では null の場合がある
Apple / Google ストア側の商品 ID
Store 購入に渡した照合 ID。起動時回収や webhook 照合で PurchaseIntent を特定する
ステータス
作成日時
完了日時。未完了の場合は null
curl -X GET "https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}" \
-H "Authorization: Bearer <token>"{
"payment_intent": {
"id": "string",
"platform": null,
"iap_product_id": "string",
"store_product_id": "string",
"store_correlation_id": "string",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z",
"completed_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/payment-intents/{payment_intent_id}/cancel
PaymentIntent キャンセル
pending 状態の PaymentIntent をキャンセルします
Parameters
| Parameter | Type | Description |
|---|---|---|
payment_intent_id REQUIRED | string | — |
Request Body
失敗理由(user_cancelled / purchase_failed 等)
Responses
curl -X POST "https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}/cancel" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}/cancel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"reason": "string"
})
});
const data = await response.json();/api/v1/payment-intents/{payment_intent_id}/verify
PaymentIntent 検証受付(非同期)
IAP レシート検証依頼を受け付け、検証とコイン付与は internal task で非同期処理します。Google の場合は PurchaseStatus.pending な購入も送信可能で、BE が purchaseState を判定して store_pending / store_canceled / purchased に分岐します
Parameters
| Parameter | Type | Description |
|---|---|---|
payment_intent_id REQUIRED | string | — |
Request Body
レシート(Apple: JWS 文字列 / Google: purchaseToken と storeProductId を含む JSON 文字列)。Google の場合は PurchaseStatus.pending(コンビニ払い等)でも送信可能。BE が purchaseState を判定して store_pending に遷移する
検証入口。未指定時は通常購入として扱う
Responses
curl -X POST "https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}/verify" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"receipt": "string",
"entrypoint": "app_purchase"
}'const response = await fetch("https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}/verify", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"receipt": "string",
"entrypoint": "app_purchase"
})
});
const data = await response.json();Purchases
/api/v1/purchases/restore
購入の復元
ストアから取得した未完了購入のレシートを一括検証し、未付与分のコインをアトミックに付与します。既に付与済みの購入は冪等にスキップされます。
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
プラットフォーム
復元入口。未指定時は手動復元として扱う
ストアから取得した未完了購入のレシート一覧
App側で復元レシートとレスポンスを照合するためのID。未指定時はBackendで生成する
レシート(Apple: JWS 文字列 / Google: purchaseToken+storeProductId を含む JSON 文字列)
Responses
Response Schema (200)
復元ボタン1回分のBackend側ID
レシートごとの処理結果
Backend側の復元アイテムID
App側で送った復元アイテムID
ステータス
決済ID(credited / already_owned のみ)
商品ID(検証成功時のみ)
コイン数(credited / already_owned のみ)
今回新規付与した合計コイン数
更新後の残高
curl -X POST "https://dev.api.revost.app/api/v1/purchases/restore" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"platform": null,
"entrypoint": "manual_restore",
"receipts": [
{
"client_restore_item_id": "string",
"receipt": "string"
}
]
}'{
"restore_request_id": "string",
"restored": [
{
"restore_item_id": "string",
"client_restore_item_id": "string",
"status": null,
"payment_id": "string",
"product_id": "string",
"coin_amount": 0
}
],
"total_credited_coin": 0,
"balance_coin": 0
}const response = await fetch("https://dev.api.revost.app/api/v1/purchases/restore", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"platform": null,
"entrypoint": "manual_restore",
"receipts": [
{
"client_restore_item_id": "string",
"receipt": "string"
}
]
})
});
const data = await response.json();Withdrawal
/api/v1/withdrawals
出金履歴一覧
認証ユーザーの出金履歴を新しい順で取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
status | string | 出金ステータス |
Responses
Response Schema (200)
出金履歴(新しい順)
出金ID
対象年月(YYYY-MM)
出金コイン数
適用レート(円/コイン)
総額(円)
手数料(円)
支払額(円)
出金ステータス
作成日時
支払日時
取消日時
次ページ取得用カーソル
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals" \
-H "Authorization: Bearer <token>"{
"withdrawals": [
{
"id": "string",
"year_month": "string",
"amount_coin": 0,
"rate_yen_per_coin_applied": 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",
"cancelled_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals
出金申請
認証ユーザーの出金申請を作成します
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
出金申請コイン数 (100 〜 1,000,000)
Responses
Response Schema (201)
出金ID
申請ステータス
curl -X POST "https://dev.api.revost.app/api/v1/withdrawals" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"amount_coin": 0
}'const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount_coin": 0
})
});
const data = await response.json();/api/v1/withdrawals/availability
出金可能情報取得
認証ユーザーの出金可能コイン数と債務情報を取得します
Responses
Response Schema (200)
現在出金可能なコイン数
債務有無
債務コイン数
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/availability" \
-H "Authorization: Bearer <token>"{
"availability": {
"withdrawable_coin": 0,
"has_debt": true,
"debt_amount_coin": 0
}
}const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/availability", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/quote
出金見積取得
指定コイン数の出金見積(レート・手数料)を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
amount_coin REQUIRED | integer (int32) | — |
Responses
Response Schema (200)
見積対象コイン数
適用レート(円/コイン)
総額(円)
手数料(円)
支払額(円)
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/quote" \
-H "Authorization: Bearer <token>"{
"quote": {
"amount_coin": 0,
"rate_yen_per_coin": 0,
"gross_amount_yen": 0,
"fee_amount_yen": 0,
"net_amount_yen": 0
}
}const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/quote", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}
出金詳細
認証ユーザーの指定出金の詳細を取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
Response Schema (200)
出金ID
対象年月(YYYY-MM)
出金コイン数
適用レート(円/コイン)
総額(円)
手数料(円)
支払額(円)
出金ステータス
作成日時
支払日時
取消日時
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/{withdrawal_id}" \
-H "Authorization: Bearer <token>"{
"withdrawal": {
"id": "string",
"year_month": "string",
"amount_coin": 0,
"rate_yen_per_coin_applied": 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",
"cancelled_at": "2024-01-01T00:00:00Z"
}
}const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/{withdrawal_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/withdrawals/{withdrawal_id}/cancel
出金取り消し
pending 状態の出金申請を取り消します
Parameters
| Parameter | Type | Description |
|---|---|---|
withdrawal_id REQUIRED | string | — |
Responses
curl -X POST "https://dev.api.revost.app/api/v1/withdrawals/{withdrawal_id}/cancel" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/{withdrawal_id}/cancel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Debt
/api/v1/debt
債務サマリ取得
認証ユーザーの債務サマリを取得します
Responses
Response Schema (200)
債務残高(コイン)
債務有無
curl -X GET "https://dev.api.revost.app/api/v1/debt" \
-H "Authorization: Bearer <token>"{
"debt": {
"amount_coin": 0,
"has_debt": true
}
}const response = await fetch("https://dev.api.revost.app/api/v1/debt", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/debt/cases
債務案件一覧
認証ユーザーの債務案件一覧を新しい順で取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
status | string | 債務案件ステータス |
Responses
Response Schema (200)
債務案件一覧(新しい順)
債務案件ID
債務理由(refund / chargeback など)
参照種別
参照ID
発生時債務コイン数
残債コイン数
案件ステータス
作成日時
解消日時
次ページ取得用カーソル
curl -X GET "https://dev.api.revost.app/api/v1/debt/cases" \
-H "Authorization: Bearer <token>"{
"debt_cases": [
{
"id": "string",
"reason": "string",
"reference_type": "string",
"reference_id": "string",
"original_amount_coin": 0,
"outstanding_coin": 0,
"status": null,
"created_at": "2024-01-01T00:00:00Z",
"settled_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/debt/cases", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/debt/repay
債務返済
認証ユーザーの既存コイン残高から、指定したコイン数を自主返済します
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
返済するコイン数
Responses
curl -X POST "https://dev.api.revost.app/api/v1/debt/repay" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"amount_coin": 0
}'const response = await fetch("https://dev.api.revost.app/api/v1/debt/repay", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount_coin": 0
})
});
const data = await response.json();/api/v1/debt/settlements
債務返済履歴一覧
認証ユーザーの債務返済履歴を新しい順で取得します
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
cursor | string | — |
Responses
Response Schema (200)
返済履歴一覧(新しい順)
返済イベントID
債務案件ID
返済コイン数
作成日時
次ページ取得用カーソル
curl -X GET "https://dev.api.revost.app/api/v1/debt/settlements" \
-H "Authorization: Bearer <token>"{
"debt_settlements": [
{
"id": "string",
"debt_case_id": "string",
"amount_coin": 0,
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string"
}const response = await fetch("https://dev.api.revost.app/api/v1/debt/settlements", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Gift
/api/v1/gifts
ギフト一覧取得
有効なギフト一覧を取得します(認証オプション)
Responses
Response Schema (200)
ギフトID
ギフト名
ギフト画像URL
ベースコイン消費量
還元率(0.0〜1.0)(ランダム報酬型は null)
有効か
curl -X GET "https://dev.api.revost.app/api/v1/gifts"{
"gifts": [
{
"id": "string",
"name": "string",
"image_url": "https://example.com",
"base_coin_cost": 0,
"return_rate": 0,
"is_active": true
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/gifts", {
method: "GET",
});
const data = await response.json();/api/v1/gifts
ギフト送信
指定したギフトを指定ユーザーに送信します(認証必須)
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
ギフトID
受取者ユーザーID
Responses
Response Schema (201)
ギフト取引ID
消費コイン数
更新後の残高
curl -X POST "https://dev.api.revost.app/api/v1/gifts" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"gift_id": "string",
"receiver_user_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/gifts", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"gift_id": "string",
"receiver_user_id": "string"
})
});
const data = await response.json();GiftBag
/api/v1/gift-bag
ギフトバッグ一覧取得
自分のギフトバッグ内のアイテム一覧を取得します(認証必須)
Responses
Response Schema (200)
ギフトID
ギフト名
ギフト画像URL
ベースコイン消費量
還元率(0.0〜1.0)(ランダム報酬型は null)
残り個数合計
最も早い有効期限
curl -X GET "https://dev.api.revost.app/api/v1/gift-bag" \
-H "Authorization: Bearer <token>"{
"items": [
{
"gift_id": "string",
"gift_name": "string",
"gift_image_url": "https://example.com",
"base_coin_cost": 0,
"return_rate": 0,
"total_remaining_qty": 0,
"earliest_expires_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/gift-bag", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gift-bag/send
バッグからギフト送信
ギフトバッグからギフトを指定ユーザーに送信します(コイン消費なし、認証必須)
Request Body
ギフトID
受取者ユーザーID
Responses
Response Schema (201)
ギフト取引ID
curl -X POST "https://dev.api.revost.app/api/v1/gift-bag/send" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"gift_id": "string",
"receiver_user_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/gift-bag/send", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"gift_id": "string",
"receiver_user_id": "string"
})
});
const data = await response.json();Gacha
/api/v1/gacha/pools
ガチャプール一覧取得
公開中(active)のガチャプール一覧を返します。
Responses
Response Schema (200)
プールID
プールバージョンID
プール名
説明
単発引きのコスト
連引きの総コスト
連引きの回数
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pools" \
-H "Authorization: Bearer <token>"{
"pools": [
{
"pool_id": "string",
"pool_version_id": "string",
"name": "string",
"description": "string",
"coin_cost_per_pull": 0,
"batch_coin_cost": 0,
"batch_pull_count": 0
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pools", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gacha/pools/{pool_id}
ガチャプール詳細取得
指定したプールの公開中バージョンとアイテム一覧を返します。
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id REQUIRED | string | — |
Responses
Response Schema (200)
プールID
プールバージョンID
プール名
説明
単発引きのコスト
連引きの総コスト
連引きの回数
抽選アイテム一覧
アイテムID
報酬種別
表示ラベル
抽選重み
表示順
ギフトID(GIFT_BAG_ITEM 時)
ギフト個数(GIFT_BAG_ITEM 時)
コイン報酬量(COIN 時)
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}" \
-H "Authorization: Bearer <token>"{
"pool_id": "string",
"pool_version_id": "string",
"name": "string",
"description": "string",
"coin_cost_per_pull": 0,
"batch_coin_cost": 0,
"batch_pull_count": 0,
"items": [
{
"item_id": "string",
"reward_type": null,
"label": "string",
"weight": 0,
"sort_order": 0,
"gift_id": "string",
"gift_quantity": 0,
"coin_amount": 0
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/gacha/pools/{pool_id}/batch-pull
ガチャ連引き
プールに設定された batch_coin_cost で連引き(batch_pull_count 回)を実行します。Idempotency-Key ヘッダー対応。
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id REQUIRED | string | — |
Request Body
objectResponses
Response Schema (201)
連引き親レコードID
連引きの総コスト
連引きの抽選日時
子の抽選結果
抽選レコードID
報酬種別
付与された GiftBagItem の ID(GIFT_BAG_ITEM 時のみ)
付与されたコイン量(COIN 時のみ)
抽選日時
curl -X POST "https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}/batch-pull" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}/batch-pull", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});
const data = await response.json();/api/v1/gacha/pools/{pool_id}/pull
ガチャ 1 回引き
コインを 1 回分消費して抽選を実行します。Idempotency-Key ヘッダー対応。
Parameters
| Parameter | Type | Description |
|---|---|---|
pool_id REQUIRED | string | — |
Request Body
objectResponses
Response Schema (201)
抽選レコードID
報酬種別
付与された GiftBagItem の ID(GIFT_BAG_ITEM 時のみ)
付与されたコイン量(COIN 時のみ)
抽選日時
curl -X POST "https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}/pull" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}/pull", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});
const data = await response.json();/api/v1/gacha/pulls
自分のガチャ抽選履歴一覧
認証ユーザーの抽選履歴を新しい順に取得します(最大 200 件)。
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
Responses
Response Schema (200)
抽選レコードID
プールバージョンID
連引き親ID(連引きの場合のみ)
報酬種別
付与されたコイン量(COIN 報酬のみ)
支払ったコイン
抽選日時
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pulls" \
-H "Authorization: Bearer <token>"{
"pulls": [
{
"gacha_pull_id": "string",
"pool_version_id": "string",
"batch_pull_id": "string",
"reward_type": null,
"reward_coin_amount": 0,
"coin_cost_paid": 0,
"pulled_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pulls", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Device
/api/v1/devices
自分のデバイスIDを登録
自分のデバイスIDを登録します(認証必須)
Request Body
デバイスID
Responses
curl -X POST "https://dev.api.revost.app/api/v1/devices" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"device_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/devices", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"device_id": "string"
})
});
const data = await response.json();Webhook
/api/v1/webhooks/apple
Apple通知受信
App Store Server Notification V2 を受信して処理します
Request Body
Apple App Store Server Notifications V2 の署名済みペイロード
Responses
Response Schema (200)
curl -X POST "https://dev.api.revost.app/api/v1/webhooks/apple" \
-H "Content-Type: application/json" \
-d '{
"signedPayload": "string"
}'{
"ok": true
}const response = await fetch("https://dev.api.revost.app/api/v1/webhooks/apple", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"signedPayload": "string"
})
});
const data = await response.json();/api/v1/webhooks/google
Google通知受信
Google Play RTDN を Pub/Sub push 経由で受信して処理します。Authorization ヘッダの OIDC JWT で認証します。
Parameters
| Parameter | Type | Description |
|---|---|---|
Authorization REQUIRED | string | — |
Request Body
Pub/Sub messageId
Pub/Sub message_id
Base64の通知本体
Responses
curl -X POST "https://dev.api.revost.app/api/v1/webhooks/google" \
-H "Content-Type: application/json" \
-d '{
"message": {
"messageId": "string",
"message_id": "string",
"data": "string"
}
}'const response = await fetch("https://dev.api.revost.app/api/v1/webhooks/google", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"message": {
"messageId": "string",
"message_id": "string",
"data": "string"
}
})
});
const data = await response.json();Chat
/api/v1/chat-rooms
チャットルーム一覧取得
認証ユーザーが参加しているチャットルーム一覧を取得します。
Parameters
| Parameter | Type | Description |
|---|---|---|
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
ルームID
DIRECTルームの相手ユーザーID
表示名
表示画像URL
最終メッセージプレビュー
最終メッセージ時刻
未読件数
最終メッセージ種別
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms" \
-H "Authorization: Bearer <token>"{
"chat_rooms": [
{
"room_id": "string",
"target_user_id": "string",
"display_name": "string",
"display_image_url": "https://example.com",
"last_message_preview": "string",
"last_message_at": "2024-01-01T00:00:00Z",
"unread_count": 0,
"last_message_type": null
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/chat-rooms/direct
ダイレクトルーム作成
相手ユーザー向けの 1 対 1 ルームを作成します。
Request Body
Responses
Response Schema (201)
curl -X POST "https://dev.api.revost.app/api/v1/chat-rooms/direct" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"target_user_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/direct", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"target_user_id": "string"
})
});
const data = await response.json();/api/v1/chat-rooms/lookup
チャットルーム検索(ID or 相手ユーザーID)
room_id または target_user_id を使って、チャットルームを 1 件取得します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id | string | — |
target_user_id | string | — |
Responses
Response Schema (200)
ルームID
DIRECTルームの相手ユーザーID
表示名
表示画像URL
最終メッセージプレビュー
最終メッセージ時刻
未読件数
最終メッセージ種別
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/lookup" \
-H "Authorization: Bearer <token>"{
"chat_room": {
"room_id": "string",
"target_user_id": "string",
"display_name": "string",
"display_image_url": "https://example.com",
"last_message_preview": "string",
"last_message_at": "2024-01-01T00:00:00Z",
"unread_count": 0,
"last_message_type": null
}
}const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/lookup", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/chat-rooms/unread-summary
未読件数サマリ取得
認証ユーザーの未読チャットメッセージ数を 1 回で確認できます。
Responses
Response Schema (200)
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/unread-summary" \
-H "Authorization: Bearer <token>"{
"total_unread_count": 0
}const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/unread-summary", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/chat-rooms/{room_id}/bag-gift-messages
チャットでバッグギフト送信
バッグギフトを指定ルームに送信します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id REQUIRED | string | — |
Request Body
クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。
Responses
Response Schema (201)
curl -X POST "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/bag-gift-messages" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"gift_id": "string",
"receiver_user_id": "string",
"client_message_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/bag-gift-messages", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"gift_id": "string",
"receiver_user_id": "string",
"client_message_id": "string"
})
});
const data = await response.json();/api/v1/chat-rooms/{room_id}/gift-messages
チャットでギフト送信
ギフトを指定ルームに送信します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id REQUIRED | string | — |
Request Body
クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。
Responses
Response Schema (201)
curl -X POST "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/gift-messages" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"gift_id": "string",
"receiver_user_id": "string",
"client_message_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/gift-messages", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"gift_id": "string",
"receiver_user_id": "string",
"client_message_id": "string"
})
});
const data = await response.json();/api/v1/chat-rooms/{room_id}/messages
チャットメッセージ一覧取得
ルーム内のメッセージを時系列順で取得します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id REQUIRED | string | — |
before | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
メッセージID
ルームID
送信者
種別
本文
添付
添付ID
添付種別
URL
表示順
ギフト情報(message_type=GIFTのときのみ)
送信日時
自分のメッセージか
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/messages" \
-H "Authorization: Bearer <token>"{
"messages": [
{
"id": "string",
"room_id": "string",
"sender_user": null,
"message_type": null,
"text_body": "string",
"attachments": [
{
"id": "string",
"media_type": null,
"url": "https://example.com",
"sort_order": 0
}
],
"gift": null,
"sent_at": "2024-01-01T00:00:00Z",
"is_mine": true
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/messages", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/chat-rooms/{room_id}/messages
チャットメッセージ送信
テキストメッセージを指定ルームに送信します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id REQUIRED | string | — |
Request Body
送信可能メッセージ種別
クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。
チャット添付ファイル種別
Responses
Response Schema (201)
curl -X POST "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/messages" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"message_type": "TEXT",
"text_body": "string",
"client_message_id": "string",
"attachments": [
{
"media_type": "IMAGE",
"url": "https://example.com"
}
]
}'const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/messages", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"message_type": "TEXT",
"text_body": "string",
"client_message_id": "string",
"attachments": [
{
"media_type": "IMAGE",
"url": "https://example.com"
}
]
})
});
const data = await response.json();/api/v1/chat-rooms/{room_id}/read
既読更新
ルームのメッセージ既読状態を更新します。
Parameters
| Parameter | Type | Description |
|---|---|---|
room_id REQUIRED | string | — |
Request Body
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/read" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"last_read_message_id": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/read", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"last_read_message_id": "string"
})
});
const data = await response.json();CheckIn
/api/v1/check-ins/
自分のチェックイン一覧
自分のチェックイン履歴を新しい順に取得する
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer (int32) | — |
offset | integer (int32) | — |
Responses
Response Schema (200)
CheckIn ID
店舗 ID
店舗名
店舗住所
店舗からの距離 (メートル)
チェックイン日時
タイムゾーン
チェックイン種別
curl -X GET "https://dev.api.revost.app/api/v1/check-ins/" \
-H "Authorization: Bearer <token>"{
"check_ins": [
{
"id": "string",
"place_id": "string",
"place_name": "string",
"place_address": "string",
"distance_meters": 0,
"checked_in_at": "2024-01-01T00:00:00Z",
"timezone": "string",
"kind": null
}
],
"total_count": 0
}const response = await fetch("https://dev.api.revost.app/api/v1/check-ins/", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/check-ins/
チェックイン (乾杯) を作成
店舗へのチェックイン (乾杯) を作成する。 - `recipients` を省略すると従来挙動 (通知なし、`notification` 応答なし)。 - `recipients.mode=FOLLOWERS/FOLLOWING` は自分のフォロー関係から受信者を自動解決。 - `recipients.mode=CUSTOM` は `user_ids` を必須とし、全員が自分のフォロイーである必要がある。 - 非フォロイー / 自分自身を含む場合は `INVALID_RECIPIENT_USER_IDS` (400)。 - 空配列は `RECIPIENTS_CUSTOM_EMPTY` (400)。 - 通知は best-effort で送信され、一部失敗しても CheckIn は成立する。
Parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key REQUIRED | string | 同一リクエストの二重実行を防ぐ冪等性キー (8〜128 文字) |
Request Body
チェックイン対象の店舗ID
現在地の緯度
現在地の経度
タイムゾーン
乾杯通知の宛先 (省略時は通知なしの従来フロー)
Responses
Response Schema (201)
作成された CheckIn ID
非推奨・互換性維持用。チェックインではコイン付与を行わないため常に 0
非推奨・互換性維持用。チェックイン後の現在残高。残高確認は GET /coin/balance を利用してください。
通知ファンアウトのサマリ (recipients 指定時のみ)
curl -X POST "https://dev.api.revost.app/api/v1/check-ins/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"place_id": "string",
"latitude": 0,
"longitude": 0,
"timezone": "string",
"recipients": null
}'const response = await fetch("https://dev.api.revost.app/api/v1/check-ins/", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"place_id": "string",
"latitude": 0,
"longitude": 0,
"timezone": "string",
"recipients": null
})
});
const data = await response.json();Location
/api/v1/me/location
デバイスの位置情報を更新
デバイスの現在位置をサーバーへ送信する(5分間隔で呼び出される)
Request Body
Responses
curl -X PUT "https://dev.api.revost.app/api/v1/me/location" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"device_id": "string",
"lat": 0,
"lng": 0
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/location", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"device_id": "string",
"lat": 0,
"lng": 0
})
});
const data = await response.json();CheersReceived
/api/v1/me/cheers-received/
受信乾杯一覧
自分宛に届いた乾杯を新しい順に取得する。cursor ベースのページネーション。 - cursor: `{createdAt, checkInId}` を base64url(JSON) でエンコードした値 - limit: default 20, max 50 - 削除された送信者は `displayName='削除されたユーザー'`, `avatarUrl=null`
Parameters
| Parameter | Type | Description |
|---|---|---|
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
受信乾杯一覧 (新しい順)
CheckIn ID
送信者
店舗
乾杯日時 (ISO8601)
既読日時 (未読は null)
次ページ cursor。次ページが無い場合 null
次ページの有無
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/" \
-H "Authorization: Bearer <token>"{
"items": [
{
"checkInId": "string",
"sender": null,
"place": null,
"checkedInAt": "2024-01-01T00:00:00Z",
"readAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string",
"hasNext": true
}const response = await fetch("https://dev.api.revost.app/api/v1/me/cheers-received/", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/cheers-received/read
受信乾杯 一括既読
指定した CheckIn ID 群を既読にする。冪等。 - `recipient_user_id = authedUserId AND read_at IS NULL` を WHERE にバインドするため 他人の行 / 既読行 / 存在しない行は無視される。 - 空配列は 400 (Zod バリデーション)。
Request Body
既読化する CheckIn ID (1..100)
Responses
curl -X PATCH "https://dev.api.revost.app/api/v1/me/cheers-received/read" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"checkInIds": [
"string"
]
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/cheers-received/read", {
method: "PATCH",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"checkInIds": [
"string"
]
})
});
const data = await response.json();/api/v1/me/cheers-received/unread-count
未読数取得
自分宛の未読乾杯数を返す。バッジ表示用の軽量エンドポイント。値は 9999 で clamp される。
Responses
Response Schema (200)
自分宛未読件数 (0..9999 で clamp)
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/unread-count" \
-H "Authorization: Bearer <token>"{
"count": 0
}const response = await fetch("https://dev.api.revost.app/api/v1/me/cheers-received/unread-count", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/cheers-received/{check_in_id}
受信乾杯 単一取得
`check_in_id` で自分宛に届いた乾杯 1 件を取得する。詳細画面で使用する。 判定は CheckInRecipient(受信者行)ベース: - 自分宛の受信乾杯がある → 200 - 自分宛の受信乾杯が無い(該当 CheckIn に受信者行が無い/CheckIn 自体不存在) → 404 - 該当 CheckIn に他人宛の受信者行がある → 403
Parameters
| Parameter | Type | Description |
|---|---|---|
check_in_id REQUIRED | string | — |
Responses
Response Schema (200)
CheckIn ID
送信者
店舗
乾杯日時 (ISO8601)
既読日時 (未読は null)
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/{check_in_id}" \
-H "Authorization: Bearer <token>"{
"checkInId": "string",
"sender": null,
"place": null,
"checkedInAt": "2024-01-01T00:00:00Z",
"readAt": "2024-01-01T00:00:00Z"
}const response = await fetch("https://dev.api.revost.app/api/v1/me/cheers-received/{check_in_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Notification
/api/v1/me/fcm-tokens
FCMトークン削除
ログアウト時にFCMトークンを削除します
Request Body
FCMトークン
Responses
curl -X DELETE "https://dev.api.revost.app/api/v1/me/fcm-tokens" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"token": "string"
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/fcm-tokens", {
method: "DELETE",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "string"
})
});
const data = await response.json();/api/v1/me/fcm-tokens
FCMトークン登録
FCMトークンを登録・更新します
Request Body
FCMトークン
デバイスID
プラットフォーム (IOS | ANDROID)
Responses
curl -X PUT "https://dev.api.revost.app/api/v1/me/fcm-tokens" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"token": "string",
"device_id": "string",
"platform": null
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/fcm-tokens", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "string",
"device_id": "string",
"platform": null
})
});
const data = await response.json();/api/v1/me/notification-settings
通知設定取得
自分の通知設定一覧を取得します
Responses
Response Schema (200)
通知設定一覧
通知カテゴリ
有効/無効
curl -X GET "https://dev.api.revost.app/api/v1/me/notification-settings" \
-H "Authorization: Bearer <token>"{
"settings": [
{
"category": null,
"enabled": true
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/me/notification-settings", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/notification-settings/{category}
通知設定更新
カテゴリごとの通知ON/OFFを更新します
Parameters
| Parameter | Type | Description |
|---|---|---|
category REQUIRED | string | — |
Request Body
有効/無効
Responses
curl -X PUT "https://dev.api.revost.app/api/v1/me/notification-settings/{category}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/notification-settings/{category}", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"enabled": true
})
});
const data = await response.json();/api/v1/me/notifications
通知履歴取得
自分の通知履歴を取得します(ページネーション対応)
Parameters
| Parameter | Type | Description |
|---|---|---|
cursor | string | — |
limit | integer (int32) | — |
Responses
Response Schema (200)
通知一覧
通知ID
カテゴリ
タイトル
本文
追加データ
objectアプリ内遷移パス
既読日時
送信日時
作成日時
次ページカーソル
次ページがあるかどうか
curl -X GET "https://dev.api.revost.app/api/v1/me/notifications" \
-H "Authorization: Bearer <token>"{
"notifications": [
{
"id": "string",
"category": null,
"title": "string",
"body": "string",
"data": {},
"path": "string",
"read_at": "2024-01-01T00:00:00Z",
"sent_at": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"next_cursor": "string",
"has_next": true
}const response = await fetch("https://dev.api.revost.app/api/v1/me/notifications", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();IapProducts
/api/v1/iap-products
アクティブなIAP商品一覧取得
アプリで購入可能なアクティブIAP商品一覧を取得します(認証必須)
Responses
Response Schema (200)
IAP商品ID
購入プラットフォーム
ストア商品ID
商品種別(現在サポート: consumable のみ。non_consumable / subscription は将来対応予定)
付与コイン数
作成日時
curl -X GET "https://dev.api.revost.app/api/v1/iap-products" \
-H "Authorization: Bearer <token>"{
"iap_products": [
{
"id": "string",
"platform": "string",
"store_product_id": "string",
"product_type": "string",
"coin_amount": 0,
"created_at": "2024-01-01T00:00:00Z"
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/iap-products", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Media
/api/v1/media/{media_id}
メディア取得
指定メディアの署名付きURLへリダイレクトします
Parameters
| Parameter | Type | Description |
|---|---|---|
media_id REQUIRED | string | — |
Responses
curl -X GET "https://dev.api.revost.app/api/v1/media/{media_id}" \
-H "Authorization: Bearer <token>"const response = await fetch("https://dev.api.revost.app/api/v1/media/{media_id}", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();Stats
/api/v1/me/stats-visibility-settings
統計表示設定取得
自分の統計表示設定一覧を取得します
Responses
Response Schema (200)
統計表示設定一覧
統計種別
表示/非表示
curl -X GET "https://dev.api.revost.app/api/v1/me/stats-visibility-settings" \
-H "Authorization: Bearer <token>"{
"settings": [
{
"stat_type": null,
"is_visible": true
}
]
}const response = await fetch("https://dev.api.revost.app/api/v1/me/stats-visibility-settings", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();/api/v1/me/stats-visibility-settings/{stat_type}
統計表示設定更新
統計種別ごとの表示ON/OFFを更新します
Parameters
| Parameter | Type | Description |
|---|---|---|
stat_type REQUIRED | string | — |
Request Body
表示/非表示
Responses
curl -X PUT "https://dev.api.revost.app/api/v1/me/stats-visibility-settings/{stat_type}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"is_visible": true
}'const response = await fetch("https://dev.api.revost.app/api/v1/me/stats-visibility-settings/{stat_type}", {
method: "PUT",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"is_visible": true
})
});
const data = await response.json();