Revost API

101 endpoints across 30 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 "https://dev.api.revost.app/api/v1/health"
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/health", {
  method: "GET",
});

const data = await response.json();

Auth

post

/api/v1/auth/line

LINE認証

LINEアクセストークンを検証し、Firebase Custom Tokenを返します

Request Body

id_tokenstringrequired

LINE IDトークン

noncestring

LINE nonce

Responses

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

Response Schema (200)

firebase_custom_tokenstringrequired

Firebase Custom Token

line_display_namestringrequired

LINEの表示名

Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/auth/line" \
  -H "Content-Type: application/json" \
  -d '{
  "id_token": "string",
  "nonce": "string"
}'
Response200 OK
{
  "firebase_custom_token": "string",
  "line_display_name": "string"
}
Node.js
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

get

/api/v1/me

自分のユーザー情報取得

認証されたユーザーの情報を取得します

Responses

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

Response Schema (200)

userobjectrequired
idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

default_shift_visibilityunknownrequired

シフトのデフォルト公開範囲

account_statusunknownrequired

アカウント状態

withdrawn_atstring (date-time)

退会日時

deleted_atstring (date-time)

削除日時

suspended_atstring (date-time)

凍結日時

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

const data = await response.json();
post

/api/v1/me

自分のユーザー情報作成

認証されたユーザーの情報を作成/登録します

Request Body

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

biostring

自己紹介文(省略時はデフォルト値が設定されます)

short_messagestring

一言メッセージ(省略時はデフォルト値が設定されます)

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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();
patch

/api/v1/me

自分のプロフィール更新

display_name、bio、short_message、default_shift_visibilityを部分更新します。少なくとも1つのフィールドを指定する必要があります。

Request Body

display_namestring

表示名。nullを指定すると更新しません。

biostring

自己紹介文。undefined/nullを指定すると更新しません。

short_messagestring

一言メッセージ。undefined/nullを指定すると更新しません。

default_shift_visibilityunknown

シフトのデフォルト公開範囲。nullを指定すると更新しません。

Responses

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

/api/v1/me

自分のユーザー削除

認証されたユーザーを削除します(本人のみ、認証必須)

Responses

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

const data = await response.json();
post

/api/v1/me/profile-image

自分のプロフィール画像更新

プロフィール画像をbase64でアップロードして更新します。

Request Body

profile_image_base64stringrequired

プロフィール画像のbase64エンコード文字列(data URI形式可)

Responses

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

/api/v1/me/restore

自分のユーザー復帰

削除されたユーザーを復帰させます(本人のみ、認証必須、削除から10日以内のみ可能)

Responses

204204 No Content レスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
410410 Gone エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/me/restore" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/me/restore", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
patch

/api/v1/me/username

自分のユーザー名更新

ユーザー名を更新します。

Request Body

usernamestringrequired

ユーザー名

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X PATCH "https://dev.api.revost.app/api/v1/me/username" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "username": "string"
}'
Node.js
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

get

/api/v1/terms-of-service/agreements

自分の利用規約同意記録取得

自分の利用規約同意記録を取得します(認証必須)

Responses

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

Response Schema (200)

app_terms_agree_versionstring

ユーザーが同意した利用規約のバージョン(同意記録がない場合はnull)

app_terms_agree_atstring (date-time)

ユーザーが同意した日時(同意記録がない場合はnull)

latest_terms_agree_versionstringrequired

システム全体の最新の利用規約バージョン

latest_terms_update_atstring (date-time)required

最新の利用規約バージョンの更新日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/terms-of-service/agreements" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
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();
post

/api/v1/terms-of-service/agreements

利用規約に同意

利用規約に同意します(認証必須、同じバージョンへの重複同意は不可)

Request Body

versionstringrequired

利用規約のバージョン

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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

get

/api/v1/users

ユーザー取得

指定されたIDまたはユーザー名でユーザーを取得します(認証不要)。user_id または username のいずれか一方を指定してください。

Parameters

ParameterTypeDescription
user_id
string
username
string

Responses

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

Response Schema (200)

userobjectrequired
idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

account_statusunknownrequired

アカウント状態

following_countinteger (int32)

フォロー中の数

followers_countinteger (int32)

フォロワーの数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users"
Response200 OK
{
  "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
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/users", {
  method: "GET",
});

const data = await response.json();
get

/api/v1/users/search

ユーザー検索

クエリ文字列でユーザーを検索します(認証不要)。ユーザー名の前方一致と表示名の部分一致で検索します。

Parameters

ParameterTypeDescription
q
REQUIRED
string
limit
integer (int32)

Responses

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

Response Schema (200)

usersArray<object>required
idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

account_statusunknownrequired

アカウント状態

following_countinteger (int32)

フォロー中の数

followers_countinteger (int32)

フォロワーの数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users/search"
Response200 OK
{
  "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
    }
  ]
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/users/search", {
  method: "GET",
});

const data = await response.json();
get

/api/v1/users/{user_id}/check-ins

公開チェックイン一覧

指定ユーザーの公開可能なチェックイン履歴を新しい順に取得します。現状は kind=BEER_CHEERS のみ公開対象です。

Parameters

ParameterTypeDescription
user_id
REQUIRED
string
kind
stringチェックインの種別
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

itemsArray<object>required

公開チェックイン一覧

idstringrequired

CheckIn ID

kindunknownrequired

公開するチェックイン種別。現状は BEER_CHEERS のみ

placeunknownrequired

店舗

checked_in_atstring (date-time)required

チェックイン日時

next_cursorstringrequired

次ページ cursor。次ページが無い場合 null

has_nextbooleanrequired

次ページの有無

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/check-ins"
Response200 OK
{
  "items": [
    {
      "id": "string",
      "kind": null,
      "place": null,
      "checked_in_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string",
  "has_next": true
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/check-ins", {
  method: "GET",
});

const data = await response.json();

Usernames

get

/api/v1/usernames/{username}/availability

ユーザー名の利用可能チェック

指定されたユーザー名が利用可能かどうかを確認します(認証不要)。

Parameters

ParameterTypeDescription
username
REQUIRED
string

Responses

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

Response Schema (200)

availablebooleanrequired

利用可能かどうか

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/usernames/{username}/availability"
Response200 OK
{
  "available": true
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/usernames/{username}/availability", {
  method: "GET",
});

const data = await response.json();

Place

get

/api/v1/places

場所詳細取得

指定されたIDの場所の詳細を取得します。place_id または google_place_id のいずれか一方を指定してください。

Parameters

ParameterTypeDescription
place_id
string
google_place_id
string

Responses

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

Response Schema (200)

placeobjectrequired
idstringrequired

場所ID

google_map_idstringrequired

Google MapのID

namestringrequired

場所名

addressstringrequired

住所

latitudenumber (float)required

緯度

longitudenumber (float)required

経度

prefecture_codeinteger (int32)required

都道府県コード

primary_typestringrequired

Google Placeのプライマリータイプ (例: cafe, restaurant)

weekday_descriptionsArray<string>required

曜日別営業時間テキスト (例: ["月曜日: 9:00~22:00", ...])

string
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/places"
Response200 OK
{
  "place": {
    "id": "string",
    "google_map_id": "string",
    "name": "string",
    "address": "string",
    "latitude": 0,
    "longitude": 0,
    "prefecture_code": 0,
    "primary_type": "string",
    "weekday_descriptions": [
      "string"
    ]
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/places", {
  method: "GET",
});

const data = await response.json();
post

/api/v1/places/autocomplete

オートコンプリート検索

Google Places APIを使用してオートコンプリート候補を取得します

Request Body

inputstringrequired

検索テキスト

latitudenumber (float)

緯度(位置バイアス用)

longitudenumber (float)

経度(位置バイアス用)

radiusnumber (float)

半径(メートル単位、位置バイアス用)

included_primary_typesArray<string>

含めるプライマリータイプ

string
session_tokenstring

セッショントークン

Responses

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

Response Schema (200)

suggestionsArray<object>required
place_predictionunknownrequired

場所候補

Example Request
cURL
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"
}'
Response200 OK
{
  "suggestions": [
    {
      "place_prediction": null
    }
  ]
}
Node.js
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();
get

/api/v1/places/reverse-geocode

リバースジオコーディング

Google Geocoding APIを使用して緯度・経度から住所を取得します

Parameters

ParameterTypeDescription
latitude
REQUIRED
number (float)
longitude
REQUIRED
number (float)

Responses

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

Response Schema (200)

formatted_addressstringrequired

フォーマット済み住所

prefecture_and_citystringrequired

都道府県と市区町村

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/places/reverse-geocode" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "formatted_address": "string",
  "prefecture_and_city": "string"
}
Node.js
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();
post

/api/v1/places/search-text

テキスト検索

Google Places APIを使用してテキストクエリで場所を検索します

Request Body

text_querystringrequired

検索テキスト

included_typestring

場所タイプ(1つのみ指定可能)

latitudenumber (float)required

緯度

longitudenumber (float)required

経度

radiusnumber (float)

半径(メートル単位)

Responses

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

Response Schema (200)

placesArray<object>required
google_place_idstringrequired

Google Place ID

display_namestringrequired

表示名

formatted_addressstringrequired

フォーマット済み住所

locationunknownrequired

位置情報

Example Request
cURL
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
}'
Response200 OK
{
  "places": [
    {
      "google_place_id": "string",
      "display_name": "string",
      "formatted_address": "string",
      "location": null
    }
  ]
}
Node.js
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

get

/api/v1/staffs

スタッフ一覧取得

place_id または user_id でフィルタリングしてスタッフ一覧を取得します(在籍中のみ)。place_id と user_id の両方指定時は両方に該当するスタッフを返します。

Parameters

ParameterTypeDescription
place_id
string
user_id
string
offset
integer (int32)
limit
integer (int32)

Responses

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

Response Schema (200)

staffsunknownrequired
placeobject
idstringrequired

場所ID

google_map_idstringrequired

Google MapのID

namestringrequired

場所名

addressstringrequired

住所

latitudenumber (float)required

緯度

longitudenumber (float)required

経度

prefecture_codeinteger (int32)required

都道府県コード

primary_typestringrequired

Google Placeのプライマリータイプ (例: cafe, restaurant)

weekday_descriptionsArray<string>required

曜日別営業時間テキスト (例: ["月曜日: 9:00~22:00", ...])

string
totalinteger (int32)required
has_morebooleanrequired
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/staffs"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/staffs", {
  method: "GET",
});

const data = await response.json();
post

/api/v1/staffs

スタッフ登録

指定された場所に自分自身をスタッフとして登録します(認証されたユーザーのIDが使用されます)

Request Body

google_place_idstringrequired

Google Place ID

Responses

201The request has succeeded and a new resource has been created as a result.
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたスタッフID

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

/api/v1/staffs/{staff_id}

スタッフ詳細取得

指定されたIDのスタッフ情報を取得します

Parameters

ParameterTypeDescription
staff_id
REQUIRED
string

Responses

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

Response Schema (200)

staffobjectrequired
idstringrequired

スタッフID

placeunknownrequired

場所情報

userunknownrequired

ユーザー情報

joined_atstring (date-time)required

入店日時

staff_statusstringrequired

スタッフステータス

left_atstring (date-time)

退職日時(退職していない場合はnull)

deleted_atstring (date-time)

削除日時(削除されていない場合はnull)

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/staffs/{staff_id}"
Response200 OK
{
  "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"
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/staffs/{staff_id}", {
  method: "GET",
});

const data = await response.json();
patch

/api/v1/staffs/{staff_id}

スタッフ情報更新

指定されたスタッフの情報を更新します(退職処理)

Parameters

ParameterTypeDescription
staff_id
REQUIRED
string

Request Body

leftboolean

退職フラグ(trueの場合のみ退職処理を実行。未指定の場合は更新なし)

Responses

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

/api/v1/staffs/{staff_id}

スタッフ削除

指定されたスタッフを削除します(ソフトデリート)

Parameters

ParameterTypeDescription
staff_id
REQUIRED
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "https://dev.api.revost.app/api/v1/staffs/{staff_id}" \
  -H "Authorization: Bearer <token>"
Node.js
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();
post

/api/v1/staffs/{staff_id}/restore

スタッフ復帰

削除されたスタッフを復帰させます

Parameters

ParameterTypeDescription
staff_id
REQUIRED
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/staffs/{staff_id}/restore" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/shifts

シフト一覧取得

シフト一覧を取得します。place_id, user_id でフィルタリングできます。認証済みで user_id を省略した場合は自分のシフト(PRIVATE含む)を返します。認証トークンがない場合はPUBLICのシフトのみ取得します。

Parameters

ParameterTypeDescription
start_date
REQUIRED
string (date-time)
end_date
REQUIRED
string (date-time)
user_id
string
place_id
string
offset
integer
limit
integer

Responses

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

Response Schema (200)

shiftsArray<object>required
idstringrequired

シフトID

instance_idstringrequired

繰り返し展開後のインスタンスID

start_atstring (date-time)required

開始日時

end_atstring (date-time)required

終了日時

rrulestring

繰り返しルール(iCalendar RRULE)。null は単発

visibilityunknownrequired

公開レベル

notesstringrequired

備考

timezonestringrequired

タイムゾーン

staffunknownrequired

スタッフ情報

placeunknownrequired

場所情報

shift_statusstringrequired

シフトステータス

deleted_atstring (date-time)

削除日時

totalinteger (int32)required
has_morebooleanrequired
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/shifts"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/shifts", {
  method: "GET",
});

const data = await response.json();
post

/api/v1/shifts

シフト作成

新しいシフトを作成します(認証必須)

Parameters

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

Request Body

staff_idstringrequired

スタッフID

start_atstring (date-time)required

開始日時

end_atstring (date-time)required

終了日時

visibilityunknownrequired

公開レベル

notesstringrequired

備考

rrulestring

繰り返しルール(iCalendar RRULE)。省略時は単発

timezonestring

タイムゾーン

Responses

201The request has succeeded and a new resource has been created as a result.
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (201)

idstringrequired

作成されたシフトID

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

/api/v1/shifts/calendar

カレンダー日付取得

指定期間内でシフトが存在する日付の一覧を返します。カレンダーグリッドのドット表示用の軽量エンドポイントです。認証済みの場合は可視性ルールに基づき日付を返します。

Parameters

ParameterTypeDescription
start_date
REQUIRED
string (date-time)
end_date
REQUIRED
string (date-time)
user_id
string
place_id
string
timezone
string

Responses

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

Response Schema (200)

datesArray<string>required

シフトが存在する日付の一覧(YYYY-MM-DD形式、ソート済み)

string
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/shifts/calendar"
Response200 OK
{
  "dates": [
    "string"
  ]
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/shifts/calendar", {
  method: "GET",
});

const data = await response.json();
get

/api/v1/shifts/{shift_id}

シフト1件取得

指定されたIDのシフト情報を取得します。公開レベルに応じてアクセス制御されます(認証オプション)

Parameters

ParameterTypeDescription
shift_id
REQUIRED
string

Responses

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

Response Schema (200)

shiftobjectrequired
idstringrequired

シフトID

instance_idstringrequired

繰り返し展開後のインスタンスID

start_atstring (date-time)required

開始日時

end_atstring (date-time)required

終了日時

rrulestring

繰り返しルール(iCalendar RRULE)。null は単発

visibilityunknownrequired

公開レベル

notesstringrequired

備考

timezonestringrequired

タイムゾーン

staffunknownrequired

スタッフ情報

placeunknownrequired

場所情報

shift_statusstringrequired

シフトステータス

deleted_atstring (date-time)

削除日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/shifts/{shift_id}"
Response200 OK
{
  "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"
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/shifts/{shift_id}", {
  method: "GET",
});

const data = await response.json();
patch

/api/v1/shifts/{shift_id}

シフト更新

指定されたIDのシフトを更新します(認証必須、作成者のみ)。過去のシフト(end_at < NOW())は編集不可です。

Parameters

ParameterTypeDescription
shift_id
REQUIRED
string

Request Body

start_atstring (date-time)

開始日時(nullで更新しない)

end_atstring (date-time)

終了日時(nullで更新しない)

visibilityunknown

公開レベル(nullで更新しない)

notesstring

備考

rrulestring

繰り返しルール(iCalendar RRULE)(nullで更新しない)

from_occurrence_datestring

この日以降を変更する場合の起点日(YYYY-MM-DD)。繰り返しシフトのみ有効。指定時は元の繰り返しを打ち切り、新規シフトをこの日以降に作成

timezonestring

タイムゾーン

Responses

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

/api/v1/shifts/{shift_id}

シフト削除

指定されたIDのシフトを削除します(ソフトデリート、認証必須、作成者のみ)

Parameters

ParameterTypeDescription
shift_id
REQUIRED
string
from_occurrence_date
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "https://dev.api.revost.app/api/v1/shifts/{shift_id}" \
  -H "Authorization: Bearer <token>"
Node.js
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();
delete

/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}

シフト例外解除

例外を解除します。該当日は再び RRULE に従って表示されます(認証必須、作成者のみ)

Parameters

ParameterTypeDescription
shift_id
REQUIRED
string
occurrence_date
REQUIRED
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
403403 Forbidden エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "https://dev.api.revost.app/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}" \
  -H "Authorization: Bearer <token>"
Node.js
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();
put

/api/v1/shifts/{shift_id}/exceptions/{occurrence_date}

シフト例外追加/更新

繰り返しシフトの特定日のキャンセルまたは変更を登録・更新します(認証必須、作成者のみ)。単発シフトには例外を追加できません。

Parameters

ParameterTypeDescription
shift_id
REQUIRED
string
occurrence_date
REQUIRED
string

Request Body

exception_typeunknownrequired

例外の種類

start_atstring (date-time)

変更後の開始日時(MODIFIED の場合必須)

end_atstring (date-time)

変更後の終了日時(MODIFIED の場合必須)

notesstring

変更後の備考(MODIFIED の場合)

Responses

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

post

/api/v1/users/{user_id}/follow

フォローする

指定されたユーザーをフォローします(認証必須)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/users/{user_id}/follow" \
  -H "Authorization: Bearer <token>"
Node.js
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();
delete

/api/v1/users/{user_id}/follow

フォロー解除

指定されたユーザーのフォローを解除します(認証必須)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string

Responses

204204 No Content レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X DELETE "https://dev.api.revost.app/api/v1/users/{user_id}/follow" \
  -H "Authorization: Bearer <token>"
Node.js
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();
get

/api/v1/users/{user_id}/follow-status

フォロー状態を確認

指定されたユーザーをフォローしているかどうかを確認します(認証必須)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string

Responses

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

Response Schema (200)

is_followingbooleanrequired

フォローしているかどうか

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/follow-status" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "is_following": true
}
Node.js
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();
get

/api/v1/users/{user_id}/followers

フォロワー一覧を取得

指定されたユーザーをフォローしているユーザー一覧を取得します(認証不要、公開情報、カーソルページネーション)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

usersArray<object>required

ユーザー一覧

idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

account_statusunknownrequired

アカウント状態

following_countinteger (int32)

フォロー中の数

followers_countinteger (int32)

フォロワーの数

next_cursorstring

次ページカーソル

has_nextbooleanrequired

次ページがあるかどうか

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/followers"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/followers", {
  method: "GET",
});

const data = await response.json();
get

/api/v1/users/{user_id}/following

フォロー中一覧を取得

指定されたユーザーがフォローしているユーザー一覧を取得します(認証不要、公開情報、カーソルページネーション)

Parameters

ParameterTypeDescription
user_id
REQUIRED
string
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

usersArray<object>required

ユーザー一覧

idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

account_statusunknownrequired

アカウント状態

following_countinteger (int32)

フォロー中の数

followers_countinteger (int32)

フォロワーの数

next_cursorstring

次ページカーソル

has_nextbooleanrequired

次ページがあるかどうか

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/users/{user_id}/following"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/users/{user_id}/following", {
  method: "GET",
});

const data = await response.json();

ShiftVisibilityAllowlist

get

/api/v1/shift-visibility-allowlist

シフト閲覧許可リスト一覧取得

自分がシフトの限定公開対象として登録したユーザー一覧を取得します(認証必須)

Responses

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

Response Schema (200)

shift_visibility_allowlistArray<object>required
idstringrequired

ユーザーID

usernamestringrequired

ユーザー名

display_namestringrequired

表示名

profile_image_urlstring (uri)required

プロフィール画像URL

biostringrequired

自己紹介文

short_messagestringrequired

一言メッセージ

account_statusunknownrequired

アカウント状態

following_countinteger (int32)

フォロー中の数

followers_countinteger (int32)

フォロワーの数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/shift-visibility-allowlist" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
    }
  ]
}
Node.js
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();
post

/api/v1/shift-visibility-allowlist

シフト閲覧許可リストに追加

シフトの限定公開対象として追加します(認証必須)。自分自身を追加することはできません。

Request Body

user_idsArray<string>required

シフト閲覧許可リストに追加するユーザーIDのリスト(最大100件)

string

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
  ]
}'
Node.js
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();
delete

/api/v1/shift-visibility-allowlist

シフト閲覧許可リストから削除

指定されたユーザーIDをシフト閲覧許可リストから削除します(認証必須)。複数のユーザーを一度に削除できます。

Request Body

user_idsArray<string>required

削除対象のユーザーIDのリスト(最大100件)

string

Responses

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

get

/api/v1/invitations

自分の招待コード取得

自分の招待コードを取得します(認証必須)

Responses

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

Response Schema (200)

invitationobjectrequired
idstringrequired

招待ID

codestringrequired

招待コード

inviterunknownrequired

招待者情報

max_usesinteger (int32)required

最大使用回数

usage_countinteger (int32)required

現在の使用回数

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/invitations" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "invitation": {
    "id": "string",
    "code": "string",
    "inviter": null,
    "max_uses": 0,
    "usage_count": 0,
    "created_at": "2024-01-01T00:00:00Z"
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/invitations", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/invitations

自分の招待コードを発行

自分の招待コードを発行します(認証必須、1人1つまで)

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/invitations" \
  -H "Authorization: Bearer <token>"
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/invitations", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/invitations/eligibility

招待コード利用可否チェック

認証ユーザーが招待コードを利用できるか確認します(認証必須)

Responses

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

Response Schema (200)

statusstringrequired

招待コード利用可否ステータス

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/invitations/eligibility" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "status": "available"
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/invitations/eligibility", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/invitations/use

招待コードを使用

招待コードを使用します(認証必須、アカウント作成から72時間以内のみ有効)

Request Body

codestringrequired

招待コード

device_idstringrequired

デバイスID

Responses

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

get

/api/v1/coin/balance

コイン残高取得

認証ユーザーのコイン残高を取得します

Responses

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

Response Schema (200)

balanceobjectrequired
balance_coininteger (int64)required

コイン残高

debt_coininteger (int64)required

未返済の債務コイン数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/coin/balance" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "balance": {
    "balance_coin": 0,
    "debt_coin": 0
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/coin/balance", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/coin/transactions

コイン取引履歴一覧

認証ユーザーのコイン取引履歴を新しい順で取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
type
stringコイン取引タイプ

Responses

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

Response Schema (200)

transactionsArray<object>required

コイン取引一覧(新しい順)

idstringrequired

取引ID

amount_coininteger (int64)required

取引コイン数(増加は正、減少は負)

typeunknownrequired

取引タイプ

source_typeunknownrequired

発生元

balance_after_coininteger (int64)required

取引後残高

reference_typestring

参照種別

reference_idstring

参照ID

created_atstring (date-time)required

作成日時

next_cursorstring

次ページ取得用カーソル

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/coin/transactions" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
}
Node.js
const response = await fetch("https://dev.api.revost.app/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 エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

transactionobjectrequired
idstringrequired

取引ID

amount_coininteger (int64)required

取引コイン数(増加は正、減少は負)

typeunknownrequired

取引タイプ

source_typeunknownrequired

発生元

balance_after_coininteger (int64)required

取引後残高

reference_typestring

参照種別

reference_idstring

参照ID

created_atstring (date-time)required

作成日時

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

get

/api/v1/payment-intents

PaymentIntent 一覧

認証ユーザーの起動時回収対象 PaymentIntent を取得します。pending / verification_pending / grant_pending など、アプリが新規購入を作らず回収・待機すべき状態を返します

Parameters

ParameterTypeDescription
scope
string取得範囲。recoverable は起動時回収・復帰時回収で扱う未完了 intent を返します
status
string後方互換用。旧クライアントの status=pending 指定でも recoverable 一覧を返します
limit
integer (int32)
cursor
string

Responses

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

Response Schema (200)

payment_intentsArray<object>required

PaymentIntent 一覧(新しい順)

idstringrequired

PaymentIntent ID

platformunknownrequired

プラットフォーム

iap_product_idstring

Revost の IAP 商品マスタ ID。古い intent では null の場合がある

store_product_idstringrequired

Apple / Google ストア側の商品 ID

store_correlation_idstringrequired

Store 購入に渡した照合 ID。起動時回収や webhook 照合で PurchaseIntent を特定する

statusstringrequired

ステータス

created_atstring (date-time)required

作成日時

completed_atstring (date-time)required

完了日時。未完了の場合は null

next_cursorstring

次ページ取得用カーソル

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

const data = await response.json();
post

/api/v1/payment-intents

PaymentIntent 作成

IAP の決済開始状態を PaymentIntent として新規作成します

Parameters

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

Request Body

iap_product_idstringrequired

Revost の IAP 商品マスタ ID

platformunknownrequired

プラットフォーム

Responses

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

Response Schema (201)

payment_intent_idstringrequired

PaymentIntent ID

store_product_idstringrequired

Apple / Google ストア側の商品 ID

store_correlation_idstringrequired

Store 購入に渡す照合 ID。Apple appAccountToken / Google obfuscatedExternalAccountId に入れる

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

/api/v1/payment-intents/{payment_intent_id}

PaymentIntent 詳細

認証ユーザーの指定 PaymentIntent の状態を取得します

Parameters

ParameterTypeDescription
payment_intent_id
REQUIRED
string

Responses

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

Response Schema (200)

payment_intentobjectrequired
idstringrequired

PaymentIntent ID

platformunknownrequired

プラットフォーム

iap_product_idstring

Revost の IAP 商品マスタ ID。古い intent では null の場合がある

store_product_idstringrequired

Apple / Google ストア側の商品 ID

store_correlation_idstringrequired

Store 購入に渡した照合 ID。起動時回収や webhook 照合で PurchaseIntent を特定する

statusstringrequired

ステータス

created_atstring (date-time)required

作成日時

completed_atstring (date-time)required

完了日時。未完了の場合は null

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/payment-intents/{payment_intent_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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();
post

/api/v1/payment-intents/{payment_intent_id}/cancel

PaymentIntent キャンセル

pending 状態の PaymentIntent をキャンセルします

Parameters

ParameterTypeDescription
payment_intent_id
REQUIRED
string

Request Body

reasonstring

失敗理由(user_cancelled / purchase_failed 等)

Responses

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

/api/v1/payment-intents/{payment_intent_id}/verify

PaymentIntent 検証受付(非同期)

IAP レシート検証依頼を受け付け、検証とコイン付与は internal task で非同期処理します。Google の場合は PurchaseStatus.pending な購入も送信可能で、BE が purchaseState を判定して store_pending / store_canceled / purchased に分岐します

Parameters

ParameterTypeDescription
payment_intent_id
REQUIRED
string

Request Body

receiptstringrequired

レシート(Apple: JWS 文字列 / Google: purchaseToken と storeProductId を含む JSON 文字列)。Google の場合は PurchaseStatus.pending(コンビニ払い等)でも送信可能。BE が purchaseState を判定して store_pending に遷移する

entrypointstring

検証入口。未指定時は通常購入として扱う

Responses

202202 Accepted レスポンス(ボディ付き)
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
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"
}'
Node.js
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

post

/api/v1/purchases/restore

購入の復元

ストアから取得した未完了購入のレシートを一括検証し、未付与分のコインをアトミックに付与します。既に付与済みの購入は冪等にスキップされます。

Parameters

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

Request Body

platformunknownrequired

プラットフォーム

entrypointstring

復元入口。未指定時は手動復元として扱う

receiptsArray<object>required

ストアから取得した未完了購入のレシート一覧

client_restore_item_idstring

App側で復元レシートとレスポンスを照合するためのID。未指定時はBackendで生成する

receiptstringrequired

レシート(Apple: JWS 文字列 / Google: purchaseToken+storeProductId を含む JSON 文字列)

Responses

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

Response Schema (200)

restore_request_idstringrequired

復元ボタン1回分のBackend側ID

restoredArray<object>required

レシートごとの処理結果

restore_item_idstringrequired

Backend側の復元アイテムID

client_restore_item_idstringrequired

App側で送った復元アイテムID

statusunknownrequired

ステータス

payment_idstring

決済ID(credited / already_owned のみ)

product_idstring

商品ID(検証成功時のみ)

coin_amountinteger (int64)

コイン数(credited / already_owned のみ)

total_credited_coininteger (int64)required

今回新規付与した合計コイン数

balance_coininteger (int64)required

更新後の残高

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

get

/api/v1/withdrawals

出金履歴一覧

認証ユーザーの出金履歴を新しい順で取得します

Parameters

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

Responses

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

Response Schema (200)

withdrawalsArray<object>required

出金履歴(新しい順)

idstringrequired

出金ID

year_monthstringrequired

対象年月(YYYY-MM)

amount_coininteger (int64)required

出金コイン数

rate_yen_per_coin_appliednumber (float)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)

支払日時

cancelled_atstring (date-time)

取消日時

next_cursorstring

次ページ取得用カーソル

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

const data = await response.json();
post

/api/v1/withdrawals

出金申請

認証ユーザーの出金申請を作成します

Parameters

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

Request Body

amount_coininteger (int64)required

出金申請コイン数 (100 〜 1,000,000)

Responses

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

Response Schema (201)

withdrawal_idstringrequired

出金ID

statusunknownrequired

申請ステータス

Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/withdrawals" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "amount_coin": 0
}'
Node.js
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();
get

/api/v1/withdrawals/availability

出金可能情報取得

認証ユーザーの出金可能コイン数と債務情報を取得します

Responses

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

Response Schema (200)

availabilityobjectrequired
withdrawable_coininteger (int64)required

現在出金可能なコイン数

has_debtbooleanrequired

債務有無

debt_amount_coininteger (int64)required

債務コイン数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/availability" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "availability": {
    "withdrawable_coin": 0,
    "has_debt": true,
    "debt_amount_coin": 0
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/availability", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/withdrawals/quote

出金見積取得

指定コイン数の出金見積(レート・手数料)を取得します

Parameters

ParameterTypeDescription
amount_coin
REQUIRED
integer (int32)

Responses

200200 OK レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
422422 Unprocessable Entity エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

quoteobjectrequired
amount_coininteger (int64)required

見積対象コイン数

rate_yen_per_coinnumber (float)required

適用レート(円/コイン)

gross_amount_yeninteger (int32)required

総額(円)

fee_amount_yeninteger (int32)required

手数料(円)

net_amount_yeninteger (int32)required

支払額(円)

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/quote" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "quote": {
    "amount_coin": 0,
    "rate_yen_per_coin": 0,
    "gross_amount_yen": 0,
    "fee_amount_yen": 0,
    "net_amount_yen": 0
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/withdrawals/quote", {
  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 エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

withdrawalobjectrequired
idstringrequired

出金ID

year_monthstringrequired

対象年月(YYYY-MM)

amount_coininteger (int64)required

出金コイン数

rate_yen_per_coin_appliednumber (float)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)

支払日時

cancelled_atstring (date-time)

取消日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/withdrawals/{withdrawal_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
  }
}
Node.js
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();
post

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

出金取り消し

pending 状態の出金申請を取り消します

Parameters

ParameterTypeDescription
withdrawal_id
REQUIRED
string

Responses

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

get

/api/v1/debt

債務サマリ取得

認証ユーザーの債務サマリを取得します

Responses

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

Response Schema (200)

debtobjectrequired
amount_coininteger (int64)required

債務残高(コイン)

has_debtbooleanrequired

債務有無

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/debt" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "debt": {
    "amount_coin": 0,
    "has_debt": true
  }
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/debt", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

/api/v1/debt/cases

債務案件一覧

認証ユーザーの債務案件一覧を新しい順で取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string
status
string債務案件ステータス

Responses

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

Response Schema (200)

debt_casesArray<object>required

債務案件一覧(新しい順)

idstringrequired

債務案件ID

reasonstringrequired

債務理由(refund / chargeback など)

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 "https://dev.api.revost.app/api/v1/debt/cases" \
  -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("https://dev.api.revost.app/api/v1/debt/cases", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/debt/repay

債務返済

認証ユーザーの既存コイン残高から、指定したコイン数を自主返済します

Parameters

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

Request Body

amount_coininteger (int64)required

返済するコイン数

Responses

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

/api/v1/debt/settlements

債務返済履歴一覧

認証ユーザーの債務返済履歴を新しい順で取得します

Parameters

ParameterTypeDescription
limit
integer (int32)
cursor
string

Responses

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

Response Schema (200)

debt_settlementsArray<object>required

返済履歴一覧(新しい順)

idstringrequired

返済イベントID

debt_case_idstringrequired

債務案件ID

amount_coininteger (int64)required

返済コイン数

created_atstring (date-time)required

作成日時

next_cursorstring

次ページ取得用カーソル

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/debt/settlements" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "debt_settlements": [
    {
      "id": "string",
      "debt_case_id": "string",
      "amount_coin": 0,
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Node.js
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

get

/api/v1/gifts

ギフト一覧取得

有効なギフト一覧を取得します(認証オプション)

Responses

200200 OK レスポンス
500500 Internal Server Error エラーレスポンス

Response Schema (200)

giftsArray<object>required
idstringrequired

ギフトID

namestringrequired

ギフト名

image_urlstring (uri)required

ギフト画像URL

base_coin_costinteger (int64)required

ベースコイン消費量

return_ratenumber (float)required

還元率(0.0〜1.0)(ランダム報酬型は null)

is_activebooleanrequired

有効か

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/gifts"
Response200 OK
{
  "gifts": [
    {
      "id": "string",
      "name": "string",
      "image_url": "https://example.com",
      "base_coin_cost": 0,
      "return_rate": 0,
      "is_active": true
    }
  ]
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/gifts", {
  method: "GET",
});

const data = await response.json();
post

/api/v1/gifts

ギフト送信

指定したギフトを指定ユーザーに送信します(認証必須)

Parameters

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

Request Body

gift_idstringrequired

ギフトID

receiver_user_idstringrequired

受取者ユーザーID

Responses

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

Response Schema (201)

gift_transaction_idstringrequired

ギフト取引ID

spent_coin_amountinteger (int64)required

消費コイン数

balance_coininteger (int64)required

更新後の残高

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

get

/api/v1/gift-bag

ギフトバッグ一覧取得

自分のギフトバッグ内のアイテム一覧を取得します(認証必須)

Responses

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

Response Schema (200)

itemsArray<object>required
gift_idstringrequired

ギフトID

gift_namestringrequired

ギフト名

gift_image_urlstring (uri)required

ギフト画像URL

base_coin_costinteger (int64)required

ベースコイン消費量

return_ratenumber (float)required

還元率(0.0〜1.0)(ランダム報酬型は null)

total_remaining_qtyinteger (int32)required

残り個数合計

earliest_expires_atstring (date-time)required

最も早い有効期限

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

const data = await response.json();
post

/api/v1/gift-bag/send

バッグからギフト送信

ギフトバッグからギフトを指定ユーザーに送信します(コイン消費なし、認証必須)

Request Body

gift_idstringrequired

ギフトID

receiver_user_idstringrequired

受取者ユーザーID

Responses

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

Response Schema (201)

gift_transaction_idstringrequired

ギフト取引ID

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

get

/api/v1/gacha/pools

ガチャプール一覧取得

公開中(active)のガチャプール一覧を返します。

Responses

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

Response Schema (200)

poolsArray<object>required
pool_idstringrequired

プールID

pool_version_idstringrequired

プールバージョンID

namestringrequired

プール名

descriptionstringrequired

説明

coin_cost_per_pullinteger (int32)required

単発引きのコスト

batch_coin_costinteger (int32)required

連引きの総コスト

batch_pull_countinteger (int32)required

連引きの回数

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pools" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
    }
  ]
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/gacha/pools", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
get

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

ガチャプール詳細取得

指定したプールの公開中バージョンとアイテム一覧を返します。

Parameters

ParameterTypeDescription
pool_id
REQUIRED
string

Responses

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

Response Schema (200)

pool_idstringrequired

プールID

pool_version_idstringrequired

プールバージョンID

namestringrequired

プール名

descriptionstringrequired

説明

coin_cost_per_pullinteger (int32)required

単発引きのコスト

batch_coin_costinteger (int32)required

連引きの総コスト

batch_pull_countinteger (int32)required

連引きの回数

itemsArray<object>required

抽選アイテム一覧

item_idstringrequired

アイテムID

reward_typeunknownrequired

報酬種別

labelstringrequired

表示ラベル

weightinteger (int32)required

抽選重み

sort_orderinteger (int32)required

表示順

gift_idstringrequired

ギフトID(GIFT_BAG_ITEM 時)

gift_quantityinteger (int32)required

ギフト個数(GIFT_BAG_ITEM 時)

coin_amountinteger (int32)required

コイン報酬量(COIN 時)

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pools/{pool_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
    }
  ]
}
Node.js
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();
post

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

ガチャ連引き

プールに設定された batch_coin_cost で連引き(batch_pull_count 回)を実行します。Idempotency-Key ヘッダー対応。

Parameters

ParameterTypeDescription
pool_id
REQUIRED
string

Request Body

object

Responses

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

Response Schema (201)

gacha_batch_pull_idstringrequired

連引き親レコードID

total_coin_costinteger (int32)required

連引きの総コスト

pulled_atstring (date-time)required

連引きの抽選日時

pullsArray<object>required

子の抽選結果

gacha_pull_idstringrequired

抽選レコードID

reward_typeunknownrequired

報酬種別

gift_bag_item_idstringrequired

付与された GiftBagItem の ID(GIFT_BAG_ITEM 時のみ)

reward_coin_amountinteger (int32)required

付与されたコイン量(COIN 時のみ)

pulled_atstring (date-time)required

抽選日時

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

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

ガチャ 1 回引き

コインを 1 回分消費して抽選を実行します。Idempotency-Key ヘッダー対応。

Parameters

ParameterTypeDescription
pool_id
REQUIRED
string

Request Body

object

Responses

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

Response Schema (201)

gacha_pull_idstringrequired

抽選レコードID

reward_typeunknownrequired

報酬種別

gift_bag_item_idstringrequired

付与された GiftBagItem の ID(GIFT_BAG_ITEM 時のみ)

reward_coin_amountinteger (int32)required

付与されたコイン量(COIN 時のみ)

pulled_atstring (date-time)required

抽選日時

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

/api/v1/gacha/pulls

自分のガチャ抽選履歴一覧

認証ユーザーの抽選履歴を新しい順に取得します(最大 200 件)。

Parameters

ParameterTypeDescription
limit
integer (int32)

Responses

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

Response Schema (200)

pullsArray<object>required
gacha_pull_idstringrequired

抽選レコードID

pool_version_idstringrequired

プールバージョンID

batch_pull_idstringrequired

連引き親ID(連引きの場合のみ)

reward_typeunknownrequired

報酬種別

reward_coin_amountinteger (int32)required

付与されたコイン量(COIN 報酬のみ)

coin_cost_paidinteger (int32)required

支払ったコイン

pulled_atstring (date-time)required

抽選日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/gacha/pulls" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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"
    }
  ]
}
Node.js
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

post

/api/v1/devices

自分のデバイスIDを登録

自分のデバイスIDを登録します(認証必須)

Request Body

device_idstringrequired

デバイスID

Responses

201201 Created レスポンス
400400 Bad Request エラーレスポンス
401401 Unauthorized エラーレスポンス
409409 Conflict エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/devices" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "device_id": "string"
}'
Node.js
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

post

/api/v1/webhooks/apple

Apple通知受信

App Store Server Notification V2 を受信して処理します

Request Body

signedPayloadstringrequired

Apple App Store Server Notifications V2 の署名済みペイロード

Responses

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

Response Schema (200)

okbooleanrequired
Example Request
cURL
curl -X POST "https://dev.api.revost.app/api/v1/webhooks/apple" \
  -H "Content-Type: application/json" \
  -d '{
  "signedPayload": "string"
}'
Response200 OK
{
  "ok": true
}
Node.js
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();
post

/api/v1/webhooks/google

Google通知受信

Google Play RTDN を Pub/Sub push 経由で受信して処理します。Authorization ヘッダの OIDC JWT で認証します。

Parameters

ParameterTypeDescription
Authorization
REQUIRED
string

Request Body

messageobjectrequired
messageIdstring

Pub/Sub messageId

message_idstring

Pub/Sub message_id

datastringrequired

Base64の通知本体

Responses

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

get

/api/v1/chat-rooms

チャットルーム一覧取得

認証ユーザーが参加しているチャットルーム一覧を取得します。

Parameters

ParameterTypeDescription
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

chat_roomsArray<object>required
room_idstringrequired

ルームID

target_user_idstring

DIRECTルームの相手ユーザーID

display_namestringrequired

表示名

display_image_urlstring (uri)required

表示画像URL

last_message_previewstringrequired

最終メッセージプレビュー

last_message_atstring (date-time)

最終メッセージ時刻

unread_countinteger (int32)required

未読件数

last_message_typeunknown

最終メッセージ種別

next_cursorstring
has_nextbooleanrequired
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
const response = await fetch("https://dev.api.revost.app/api/v1/chat-rooms", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <token>"
  },
});

const data = await response.json();
post

/api/v1/chat-rooms/direct

ダイレクトルーム作成

相手ユーザー向けの 1 対 1 ルームを作成します。

Request Body

target_user_idstringrequired

Responses

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

Response Schema (201)

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

/api/v1/chat-rooms/lookup

チャットルーム検索(ID or 相手ユーザーID)

room_id または target_user_id を使って、チャットルームを 1 件取得します。

Parameters

ParameterTypeDescription
room_id
string
target_user_id
string

Responses

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

Response Schema (200)

chat_roomobjectrequired
room_idstringrequired

ルームID

target_user_idstring

DIRECTルームの相手ユーザーID

display_namestringrequired

表示名

display_image_urlstring (uri)required

表示画像URL

last_message_previewstringrequired

最終メッセージプレビュー

last_message_atstring (date-time)

最終メッセージ時刻

unread_countinteger (int32)required

未読件数

last_message_typeunknown

最終メッセージ種別

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/lookup" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
  }
}
Node.js
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();
get

/api/v1/chat-rooms/unread-summary

未読件数サマリ取得

認証ユーザーの未読チャットメッセージ数を 1 回で確認できます。

Responses

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

Response Schema (200)

total_unread_countinteger (int32)required
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/unread-summary" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "total_unread_count": 0
}
Node.js
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();
post

/api/v1/chat-rooms/{room_id}/bag-gift-messages

チャットでバッグギフト送信

バッグギフトを指定ルームに送信します。

Parameters

ParameterTypeDescription
room_id
REQUIRED
string

Request Body

gift_idstringrequired
receiver_user_idstringrequired
client_message_idstringrequired

クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。

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)

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

/api/v1/chat-rooms/{room_id}/gift-messages

チャットでギフト送信

ギフトを指定ルームに送信します。

Parameters

ParameterTypeDescription
room_id
REQUIRED
string

Request Body

gift_idstringrequired
receiver_user_idstringrequired
client_message_idstringrequired

クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。

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)

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

/api/v1/chat-rooms/{room_id}/messages

チャットメッセージ一覧取得

ルーム内のメッセージを時系列順で取得します。

Parameters

ParameterTypeDescription
room_id
REQUIRED
string
before
string
limit
integer (int32)

Responses

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

Response Schema (200)

messagesArray<object>required
idstringrequired

メッセージID

room_idstringrequired

ルームID

sender_userunknown

送信者

message_typeunknownrequired

種別

text_bodystring

本文

attachmentsArray<object>required

添付

idstringrequired

添付ID

media_typeunknownrequired

添付種別

urlstring (uri)required

URL

sort_orderinteger (int32)required

表示順

giftunknown

ギフト情報(message_type=GIFTのときのみ)

sent_atstring (date-time)required

送信日時

is_minebooleanrequired

自分のメッセージか

next_cursorstring
has_nextbooleanrequired
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/chat-rooms/{room_id}/messages" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
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();
post

/api/v1/chat-rooms/{room_id}/messages

チャットメッセージ送信

テキストメッセージを指定ルームに送信します。

Parameters

ParameterTypeDescription
room_id
REQUIRED
string

Request Body

message_typestringrequired

送信可能メッセージ種別

text_bodystring
client_message_idstringrequired

クライアント生成の冪等キー (UUID 等)。同一 sender で同じ値を送ると同一メッセージが返る。

attachmentsArray<object>
media_typestringrequired

チャット添付ファイル種別

urlstring (uri)required

Responses

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

Response Schema (201)

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

/api/v1/chat-rooms/{room_id}/read

既読更新

ルームのメッセージ既読状態を更新します。

Parameters

ParameterTypeDescription
room_id
REQUIRED
string

Request Body

last_read_message_idstringrequired

Responses

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

get

/api/v1/check-ins/

自分のチェックイン一覧

自分のチェックイン履歴を新しい順に取得する

Parameters

ParameterTypeDescription
limit
integer (int32)
offset
integer (int32)

Responses

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

Response Schema (200)

check_insArray<object>required
idstringrequired

CheckIn ID

place_idstringrequired

店舗 ID

place_namestringrequired

店舗名

place_addressstringrequired

店舗住所

distance_metersnumber (double)required

店舗からの距離 (メートル)

checked_in_atstring (date-time)required

チェックイン日時

timezonestringrequired

タイムゾーン

kindunknownrequired

チェックイン種別

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

const data = await response.json();
post

/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

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

Request Body

place_idstringrequired

チェックイン対象の店舗ID

latitudenumber (double)required

現在地の緯度

longitudenumber (double)required

現在地の経度

timezonestring

タイムゾーン

recipientsunknown

乾杯通知の宛先 (省略時は通知なしの従来フロー)

Responses

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

Response Schema (201)

check_in_idstringrequired

作成された CheckIn ID

bonus_coin_awardedinteger (int32)required

非推奨・互換性維持用。チェックインではコイン付与を行わないため常に 0

balance_coininteger (int32)required

非推奨・互換性維持用。チェックイン後の現在残高。残高確認は GET /coin/balance を利用してください。

notificationunknown

通知ファンアウトのサマリ (recipients 指定時のみ)

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

put

/api/v1/me/location

デバイスの位置情報を更新

デバイスの現在位置をサーバーへ送信する(5分間隔で呼び出される)

Request Body

device_idstringrequired
latnumber (double)required
lngnumber (double)required

Responses

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

get

/api/v1/me/cheers-received/

受信乾杯一覧

自分宛に届いた乾杯を新しい順に取得する。cursor ベースのページネーション。 - cursor: `{createdAt, checkInId}` を base64url(JSON) でエンコードした値 - limit: default 20, max 50 - 削除された送信者は `displayName='削除されたユーザー'`, `avatarUrl=null`

Parameters

ParameterTypeDescription
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

itemsArray<object>required

受信乾杯一覧 (新しい順)

checkInIdstringrequired

CheckIn ID

senderunknownrequired

送信者

placeunknownrequired

店舗

checkedInAtstring (date-time)required

乾杯日時 (ISO8601)

readAtstring (date-time)required

既読日時 (未読は null)

nextCursorstringrequired

次ページ cursor。次ページが無い場合 null

hasNextbooleanrequired

次ページの有無

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "items": [
    {
      "checkInId": "string",
      "sender": null,
      "place": null,
      "checkedInAt": "2024-01-01T00:00:00Z",
      "readAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string",
  "hasNext": true
}
Node.js
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();
patch

/api/v1/me/cheers-received/read

受信乾杯 一括既読

指定した CheckIn ID 群を既読にする。冪等。 - `recipient_user_id = authedUserId AND read_at IS NULL` を WHERE にバインドするため 他人の行 / 既読行 / 存在しない行は無視される。 - 空配列は 400 (Zod バリデーション)。

Request Body

checkInIdsArray<string>required

既読化する CheckIn ID (1..100)

string

Responses

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

/api/v1/me/cheers-received/unread-count

未読数取得

自分宛の未読乾杯数を返す。バッジ表示用の軽量エンドポイント。値は 9999 で clamp される。

Responses

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

Response Schema (200)

countinteger (int32)required

自分宛未読件数 (0..9999 で clamp)

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/unread-count" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "count": 0
}
Node.js
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();
get

/api/v1/me/cheers-received/{check_in_id}

受信乾杯 単一取得

`check_in_id` で自分宛に届いた乾杯 1 件を取得する。詳細画面で使用する。 判定は CheckInRecipient(受信者行)ベース: - 自分宛の受信乾杯がある → 200 - 自分宛の受信乾杯が無い(該当 CheckIn に受信者行が無い/CheckIn 自体不存在) → 404 - 該当 CheckIn に他人宛の受信者行がある → 403

Parameters

ParameterTypeDescription
check_in_id
REQUIRED
string

Responses

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

Response Schema (200)

checkInIdstringrequired

CheckIn ID

senderunknownrequired

送信者

placeunknownrequired

店舗

checkedInAtstring (date-time)required

乾杯日時 (ISO8601)

readAtstring (date-time)required

既読日時 (未読は null)

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/cheers-received/{check_in_id}" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "checkInId": "string",
  "sender": null,
  "place": null,
  "checkedInAt": "2024-01-01T00:00:00Z",
  "readAt": "2024-01-01T00:00:00Z"
}
Node.js
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

delete

/api/v1/me/fcm-tokens

FCMトークン削除

ログアウト時にFCMトークンを削除します

Request Body

tokenstringrequired

FCMトークン

Responses

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

/api/v1/me/fcm-tokens

FCMトークン登録

FCMトークンを登録・更新します

Request Body

tokenstringrequired

FCMトークン

device_idstringrequired

デバイスID

platformunknown

プラットフォーム (IOS | ANDROID)

Responses

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

/api/v1/me/notification-settings

通知設定取得

自分の通知設定一覧を取得します

Responses

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

Response Schema (200)

settingsArray<object>required

通知設定一覧

categoryunknownrequired

通知カテゴリ

enabledbooleanrequired

有効/無効

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/notification-settings" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "settings": [
    {
      "category": null,
      "enabled": true
    }
  ]
}
Node.js
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();
put

/api/v1/me/notification-settings/{category}

通知設定更新

カテゴリごとの通知ON/OFFを更新します

Parameters

ParameterTypeDescription
category
REQUIRED
string

Request Body

enabledbooleanrequired

有効/無効

Responses

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

/api/v1/me/notifications

通知履歴取得

自分の通知履歴を取得します(ページネーション対応)

Parameters

ParameterTypeDescription
cursor
string
limit
integer (int32)

Responses

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

Response Schema (200)

notificationsArray<object>required

通知一覧

idstringrequired

通知ID

categoryunknownrequired

カテゴリ

titlestringrequired

タイトル

bodystringrequired

本文

dataobject

追加データ

object
pathstring

アプリ内遷移パス

read_atstring (date-time)

既読日時

sent_atstring (date-time)

送信日時

created_atstring (date-time)required

作成日時

next_cursorstring

次ページカーソル

has_nextbooleanrequired

次ページがあるかどうか

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/notifications" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "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
}
Node.js
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

get

/api/v1/iap-products

アクティブなIAP商品一覧取得

アプリで購入可能なアクティブIAP商品一覧を取得します(認証必須)

Responses

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

Response Schema (200)

iap_productsArray<object>required
idstringrequired

IAP商品ID

platformstringrequired

購入プラットフォーム

store_product_idstringrequired

ストア商品ID

product_typestringrequired

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

coin_amountinteger (int64)required

付与コイン数

created_atstring (date-time)required

作成日時

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/iap-products" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "iap_products": [
    {
      "id": "string",
      "platform": "string",
      "store_product_id": "string",
      "product_type": "string",
      "coin_amount": 0,
      "created_at": "2024-01-01T00:00:00Z"
    }
  ]
}
Node.js
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

get

/api/v1/media/{media_id}

メディア取得

指定メディアの署名付きURLへリダイレクトします

Parameters

ParameterTypeDescription
media_id
REQUIRED
string

Responses

302302 Found リダイレクトレスポンス
401401 Unauthorized エラーレスポンス
404404 Not Found エラーレスポンス
500500 Internal Server Error エラーレスポンス
Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/media/{media_id}" \
  -H "Authorization: Bearer <token>"
Node.js
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

get

/api/v1/me/stats-visibility-settings

統計表示設定取得

自分の統計表示設定一覧を取得します

Responses

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

Response Schema (200)

settingsArray<object>required

統計表示設定一覧

stat_typeunknownrequired

統計種別

is_visiblebooleanrequired

表示/非表示

Example Request
cURL
curl -X GET "https://dev.api.revost.app/api/v1/me/stats-visibility-settings" \
  -H "Authorization: Bearer <token>"
Response200 OK
{
  "settings": [
    {
      "stat_type": null,
      "is_visible": true
    }
  ]
}
Node.js
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();
put

/api/v1/me/stats-visibility-settings/{stat_type}

統計表示設定更新

統計種別ごとの表示ON/OFFを更新します

Parameters

ParameterTypeDescription
stat_type
REQUIRED
string

Request Body

is_visiblebooleanrequired

表示/非表示

Responses

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