SAVS Open API (1.0.0)

Download OpenAPI specification:

SAVS (Smart Access Vehicle Service) Open APIリファレンス

本ドキュメントは、外部連携を目的としたSAVSの公開APIリファレンスです。
現在は乗客用アプリの開発に必要となる基本機能(必要最小限のAPIセット)に絞って公開しています。
提供するエンドポイントや機能については、今後段階的に拡大・更新していく予定です。

接続とセキュリティ

本APIはバックエンドサーバー間(Server-to-Server)の通信専用です。

  • ネットワーク制限 (IP Whitelisting)

    • セキュリティ確保のため、接続元IPアドレスの制限が必須です。
    • 未登録のIPアドレスからのアクセスは、認証トークンが正しくても拒否されます。
  • 認証方式 (Static Bearer Token)

    • 未来シェアより発行された 固定APIトークン を使用します。
    • 標準的なBearer認証ヘッダーを使用してください。
    • ヘッダー形式: Authorization: Bearer <savs_live_token_string>

共通レスポンス

  • 503 Service Unavailable
    • 計画メンテナンスやサーバー再起動などの一時停止時に限り返却されます。
    • 平常時のアプリケーションエラーを表すものではありません。

Demand

配車リクエストの作成・検索・操作

配車リクエスト作成

新規の配車リクエストを作成します。

Authorizations:
BearerAuth
Request Body schema: application/json
required

配車リクエスト情報

userId
required
integer

配車をリクエストするユーザーのID

required
object (Location)

乗車場所

required
object (Location)

降車場所

required
Array of objects (PassengerCount)

乗車人数の内訳

shareable
required
boolean

乗合を許容するかどうか

pickupTime
string or null <date-time>

希望乗車日時(指定がない場合は即時配車)

Responses

Request samples

Content type
application/json
{
  • "userId": 1,
  • "pickupLocation": {
    },
  • "dropoffLocation": {
    },
  • "passengers": [
    ],
  • "shareable": true,
  • "pickupTime": "2025-12-27T10:30:00Z"
}

Response samples

Content type
application/json
{
  • "demandId": 3,
  • "userId": 1,
  • "vehicle": {
    },
  • "pickupLocation": {
    },
  • "dropoffLocation": {
    },
  • "shareable": true,
  • "status": "ASSIGNED",
  • "estimatedPickupTime": "2025-12-27T10:45:00Z",
  • "estimatedDropoffTime": "2025-12-27T11:00:00Z",
  • "createdAt": "2025-12-27T10:00:00Z",
  • "updatedAt": "2025-12-27T10:15:00Z"
}

デマンド検索 (一覧取得)

条件を指定してデマンドを検索します。

  • 特定ユーザーの履歴取得: userId を指定
  • 現在の稼働状況確認: status=assigned,assigning... を指定
Authorizations:
BearerAuth
query Parameters
userId
integer

ユーザーIDで絞り込み

status
string

ステータスによる絞り込み(カンマ区切り)。 例: assigned,assgning

limit
integer [ 1 .. 100 ]
Default: 20

取得件数 (ページネーション)

offset
integer >= 0
Default: 0

取得開始位置 (ページネーション)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

デマンド詳細取得

Authorizations:
BearerAuth
path Parameters
demandId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "demandId": 3,
  • "userId": 1,
  • "vehicle": {
    },
  • "pickupLocation": {
    },
  • "dropoffLocation": {
    },
  • "shareable": true,
  • "status": "ASSIGNED",
  • "estimatedPickupTime": "2025-12-27T10:45:00Z",
  • "estimatedDropoffTime": "2025-12-27T11:00:00Z",
  • "createdAt": "2025-12-27T10:00:00Z",
  • "updatedAt": "2025-12-27T10:15:00Z"
}

デマンドの承認

承認待ちのデマンドを承認します。

Authorizations:
BearerAuth
path Parameters
demandId
required
integer <int64>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 404,
  • "detail": "string",
  • "instance": "string"
}

デマンドの確定後キャンセル

デマンドを確定後にキャンセルします。

Authorizations:
BearerAuth
path Parameters
demandId
required
integer <int64>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 404,
  • "detail": "string",
  • "instance": "string"
}

デマンドの確定前キャンセル

デマンドを確定前にキャンセルします。

Authorizations:
BearerAuth
path Parameters
demandId
required
integer <int64>

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 404,
  • "detail": "string",
  • "instance": "string"
}

Vehicle

車両情報の参照

車両一覧取得

指定した座標周辺の車両情報を取得します。

Authorizations:
BearerAuth
query Parameters
lat
required
number <double>

中心点の緯度 (WGS84)

lng
required
number <double>

中心点の経度 (WGS84)

radius
integer
Default: 1000

検索半径 (メートル)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

User

ユーザー情報の管理

ユーザー登録

ユーザーを新規作成します。

Authorizations:
BearerAuth
Request Body schema: application/json
required

登録するユーザーの情報

name
required
string

ユーザーの氏名

email
required
string <email>

メールアドレス

tel
required
string^\+[1-9]\d{1,14}$

国際電話番号 (E.164形式) プラス記号(+)と国番号から始まり、ハイフンやスペースは含めないでください。

Responses

Request samples

Content type
application/json
{
  • "name": "未来 太郎",
  • "email": "taro.mirai@example.com",
  • "tel": "+819012345678"
}

Response samples

Content type
application/json
{
  • "userId": 1,
  • "name": "未来 太郎",
  • "email": "taro.mirai@example.com",
  • "tel": "+819012345678"
}

ユーザー詳細取得

Authorizations:
BearerAuth
path Parameters
userId
required
integer

Responses

Response samples

Content type
application/json
{
  • "userId": 1,
  • "name": "未来 太郎",
  • "email": "taro.mirai@example.com",
  • "tel": "+819012345678"
}

ユーザー情報更新

指定されたユーザーの情報を部分更新します。 変更したい項目のみをリクエストボディに含めてください。

Authorizations:
BearerAuth
path Parameters
userId
required
integer
Request Body schema: application/json
required

更新するユーザーの情報(変更項目のみ)

name
string

ユーザーの氏名

email
string <email>

メールアドレス

tel
string^\+[1-9]\d{1,14}$

国際電話番号 (E.164形式) プラス記号(+)と国番号から始まり、ハイフンやスペースは含めないでください。

Responses

Request samples

Content type
application/json
{
  • "name": "未来 太郎 (更新)",
  • "email": "new.taro.mirai@example.com",
  • "tel": "+818098765432"
}

Response samples

Content type
application/json
{
  • "userId": 1,
  • "name": "未来 太郎",
  • "email": "taro.mirai@example.com",
  • "tel": "+819012345678"
}