Pricing API
SaaSus Pricing API Schema (1.0.0)
SaaSus Pricing API Schema
プライシングユニットの一覧を取得
料金のベースとなる最小の計測単位を取得します。 「固定ユニット」(type=fixed)は基本料金などの月額固定料金の単位、 「使用量ユニット」(type=usage)はユーザ数課金などの1単位あたりごとに料金が発生する単位、 「段階ユニット」(type=tiered)は携帯電話の段階的パケット料金のように利用量の段階ごとに一定の料金の単位、 「段階的使用量ユニット」(type=tiered_usage)はボリュームディスカウントのように利用量に応じて1単位あたりの料金が変化していく単位、となります。
Authorizations:
Bearer
Responses
Response samples
- 200
- 500
Content type
application/json
{- "units": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "metering_unit_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "recurring_interval": "month",
- "used": false,
- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "fixed",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
]
}
プライシングユニットを作成
プライシングユニットを作成します。
Authorizations:
Bearer
Request Body schema: application/json
upper_count required | integer 上限値 |
metering_unit_name required | string 計測ユニット名 |
aggregate_usage | string (AggregateUsage) Enum: "sum" "max" 使用量の集計方法 sum: 期間内の使用量の合計 max: 期間内の使用量の最大値 |
name required | string 名前 |
display_name required | string 表示名 |
description required | string 説明 |
type required | string (UnitType) 計測単位の種別 fixed: 固定ユニット usage: 使用量ユニット tiered: 段階ユニット tiered_usage: 段階的使用量ユニット |
currency required | string (Currency) Enum: "JPY" "USD" 計測単位の通貨 |
required | Array of objects (従量課金情報) |
Responses
Request samples
- Payload
Content type
application/json
Example
{- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "tiered_usage",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
Response samples
- 201
- 500
Content type
application/json
Example
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "metering_unit_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "recurring_interval": "month",
- "used": false,
- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "tiered_usage",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
プライシングユニットを取得
プライシングユニットを取得します。
Authorizations:
Bearer
path Parameters
pricing_unit_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 ユニットID |
Responses
Response samples
- 200
- 500
Content type
application/json
Example
{- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "metering_unit_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "recurring_interval": "month",
- "used": false,
- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "tiered_usage",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
プライシングユニットを更新
プライシン グユニット情報を更新します。
Authorizations:
Bearer
path Parameters
pricing_unit_id required | string (Uuid) Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775 ユニットID |
Request Body schema: application/json
upper_count required | integer 上限値 |
metering_unit_name required | string 計測ユニット名 |
aggregate_usage | string (AggregateUsage) Enum: "sum" "max" 使用量の集計方法 sum: 期間内の使用量の合計 max: 期間内の使用量の最大値 |
name required | string 名前 |
display_name required | string 表示名 |
description required | string 説明 |
type required | string (UnitType) 計測単位の種別 fixed: 固定ユニット usage: 使用量ユニット tiered: 段階ユニット tiered_usage: 段階 的使用量ユニット |
currency required | string (Currency) Enum: "JPY" "USD" 計測単位の通貨 |
required | Array of objects (従量課金情報) |
Responses
Request samples
- Payload
Content type
application/json
Example
{- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "tiered_usage",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
Response samples
- 500
Content type
application/json
{- "type": "string",
- "message": "string"
}
プライシング機能メニュー一覧を取得
機能メニュー一覧を取得します。計測単位を複数まとめて、1つの機能メニューとして定義します。ここで定義した機能メニューを複数合わせ1つの料金プランとします。
Authorizations:
Bearer
Responses
Response samples
- 200
- 500
Content type
application/json
{- "pricing_menus": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "name": "Ten Users Menu",
- "display_name": "10ユーザーメニュー",
- "description": "Can use 10 users.",
- "used": false,
- "units": [
- {
- "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "metering_unit_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
- "recurring_interval": "month",
- "used": false,
- "upper_count": 100,
- "metering_unit_name": "test_unit",
- "aggregate_usage": "sum",
- "name": "storage_unit",
- "display_name": "ストレージユニット",
- "description": "KB unit for storage usage",
- "type": "fixed",
- "currency": "JPY",
- "tiers": [
- {
- "up_to": 5,
- "unit_amount": 1000,
- "flat_amount": 500,
- "inf": true
}
]
}
]
}
]
}