BillingGroup
請求グループのAPIリファレンスは以下の通りです。

Create

請求グループの作成
Role actions
  • ModifyBillingGroup
Request
1
POST /billinggroup HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
4
5
{request body}
Copied!
以下に{request body}のリクエストペイロードの例を示します。
{request body}
1
{
2
"billinggroup_id":"Billing1",
3
"billinggroup_name":"Billing1",
4
"company_name":"Billing1 company",
5
"phone":"03‐1234‐5678",
6
"postal":"12345",
7
"address":"123 street",
8
"billing_title":"billing title",
9
"personal":"personal name",
10
"remarks":"test automation",
11
"inv_aggregate":false,
12
"language":"ja",
13
"invoices": {
14
"aws": {
15
"calc_type":"account",
16
"currency":"jpy",
17
"discount_calc_logic":"usageamount",
18
"discount_rate":0,
19
"discount_target_usage":"cloudpaywithfee",
20
"substitution_fee":"percent",
21
"substitution_fee_calc_target":"nondiscount",
22
"substitution_fee_calc_type":"allsum",
23
"substitution_fee_target_usage":"cloudpaywithfee",
24
"substitution_fix":0,
25
"substitution_rate":0,
26
"support_amount_target":"allusage",
27
"support_fee":"fix",
28
"support_fee_calc_target":"nondiscount",
29
"support_fix":0,
30
"support_rate":0,
31
"tax_rate":0
32
}
33
}
34
}
Copied!
{request body} description
Field
Type
Required
Validation
Description
billinggroup_id
string
Yes
-
Billing group ID
billinggroup_name
string
Yes
-
Billimg group name
company_name
string
Yes
-
Company name
phone
string
No
-
Tel
postal
string
No
-
Postal
address
string
No
-
Address
billing_title
string
No
-
Invoice title
personal
string
No
-
Personal name
remarks
string
No
-
Memo
inv_aggregate
boolean
Yes
-
Displaying invoice in bulk or by vendor
project_id
string
No
-
Project id
invoice_template_id
string
No
-
Invoice template id
invoices
[object]
No
-
Invoice setting
language
string
No
サポート: ja, en
Display invoice language setting
invoices object description
Field
Type
Required
Validation
Description
calc_type
string
Yes
- account - tag
Invoice calculation type
currency
string
Yes
- jpy - usd
Currency
discount_calc_logic
string
Yes
- usageamount
-
discount_rate
double
Yes
0.00 ~ 1.00
-
discount_target_usage
string
Yes
- cloudpaywithfee - cloudpayonly
-
substitution_fee
string
Yes
- percent - fix - automatic - usagetable
-
substitution_fee_calc_target
string
Yes
- nondiscount - discounted
-
substitution_fee_calc_type
string
Yes
- allsum - account
-
substitution_fee_target_usage
string
Yes
- cloudpaywithfee - cloudpayonly
-
substitution_fix
double
Yes
00 ~ 1000000
-
substitution_rate
double
Yes
0.00 ~ 1.00
-
support_amount_target
string
Yes
- allusage
-
support_fee
string
Yes
- fix - percent - aws_developer - aws_business - aws_enterprise
-
support_fee_calc_target
string
Yes
- nondiscount - discounted
-
support_fix
double
Yes
0.00 ~ 1000000
-
support_rate
double
Yes
0.00 ~ 1.00
-
tax_rate
double
Yes
0.00 ~ 0.10
Tax
Response
1
HTTP 200
2
3
{
4
"status":"success",
5
"company_id":"RomwoEjdjhws",
6
"billinggroup_id":"Billing1"
7
}
Copied!
Pythonでのサンプル
1
import requests
2
import json
3
4
def get_token():
5
# Note: you can see details https://docs.alphaus.cloud/v/api-reference/authentication
6
# Assign generated values for client_id and client_secret
7
params={
8
"grant_type": "client_credentials",
9
"client_id": "{client_id}",
10
"client_secret": "{client_secret}",
11
"scope": "openid",
12
}
13
try:
14
response = requests.post(
15
url="https://login.alphaus.cloud/ripple/access_token",
16
headers={
17
},
18
params=params,
19
files=params,
20
)
21
except requests.exceptions.RequestException:
22
print('HTTP Request failed')
23
24
r = response.json()
25
return r['access_token'], r["token_type"]
26
27
def send_request(type, token):
28
# Authorization header
29
auth = type + " " + token
30
try:
31
response = requests.post(
32
url="https://api.alphaus.cloud/m/ripple/billinggroup",
33
headers={
34
"Content-Type": "application/json;",
35
"Authorization": auth
36
},
37
data=json.dumps({
38
"display_cost": "true_unblended_cost",
39
"phone": None,
40
"billinggroup_id": "BG-SAMPLE-01",
41
"billinggroup_name": "BG-SAMPLE-01",
42
"inv_aggregate": True,
43
"personal": None,
44
"exchange_rate_type": None,
45
"company_name": "BG-SAMPLE-01",
46
"postal": None,
47
"address": None,
48
"billing_title": None,
49
"remarks": None
50
})
51
)
52
print('Response HTTP Status Code: {status_code}'.format(
53
status_code=response.status_code))
54
print('Response HTTP Response Body: {content}'.format(
55
content=response.content))
56
except requests.exceptions.RequestException:
57
print('HTTP Request failed')
58
59
access_token, token_type = get_token()
60
send_request(token_type, access_token)
Copied!

List

請求グループリストの取得
Role actions
  • ReadBillingGroup
  • ModifyBillingGroup
Request
1
GET /billinggroup HTTP1.1
2
Authorization: Bearer {token}
Copied!
Response
1
HTTP 200
2
3
[
4
{
5
"company_id":"RomwoEjdjhws",
6
"billinggroup_id":"Billing1",
7
"billinggroup_name":"Billing1",
8
"name":"Billing1 Company",
9
"invoices":{
10
"aws": {
11
"calc_type":"account",
12
"currency":"jpy",
13
"discount_calc_logic":"usageamount",
14
"discount_rate":0,
15
"discount_target_usage":"cloudpaywithfee",
16
"substitution_fee":"percent",
17
"substitution_fee_calc_target":"nondiscount",
18
"substitution_fee_calc_type":"allsum",
19
"substitution_fee_target_usage":"cloudpaywithfee",
20
"substitution_fix":0,
21
"substitution_rate":0,
22
"support_amount_target":"allusage",
23
"support_fee":"fix",
24
"support_fee_calc_target":"nondiscount",
25
"support_fix":0,
26
"support_rate":0,
27
"tax_rate":0
28
}
29
"azure": {
30
"calc_type":"account",
31
"currency":"jpy",
32
"discount_calc_logic":"usageamount",
33
"discount_rate":0,
34
"discount_target_usage":"cloudpaywithfee",
35
"substitution_fee":"percent",
36
"substitution_fee_calc_target":"nondiscount",
37
"substitution_fee_calc_type":"allsum",
38
"substitution_fee_target_usage":"cloudpaywithfee",
39
"substitution_fix":0,
40
"substitution_rate":0,
41
"support_amount_target":"allusage",
42
"support_fee":"fix",
43
"support_fee_calc_target":"nondiscount",
44
"support_fix":0,
45
"support_rate":0,
46
"tax_rate":0
47
}
48
},
49
"contact":"personal name",
50
"address":"123 street",
51
"postal":"12345",
52
"phone":"03‐1234‐5678",
53
"title":null,
54
"req_generate":null,
55
"remarks":null,
56
"inv_aggregate":null,
57
"project_id":null,
58
"project_code":null,
59
"project_label":null,
60
"project_currency":null,
61
"language":"ja",
62
"qrcode":false,
63
"invoice_template_id":null,
64
"custom_fields":null,
65
"untagged_groups":null,
66
"account":[],
67
"tag":[]
68
},
69
...
70
]
Copied!

List details

請求グループ詳細の取得
Role actions
  • ReadBillingGroup
  • ModifyBillingGroup
Request
1
GET /billinggroup/{id}/resource HTTP1.1
2
Authorization: Bearer {token}
Copied!
リクエストパラーメータの{id}は請求グループ内部ID{company_id}です
Response
1
HTTP 200
2
3
{
4
"company_id":"RomwoEjdjhws",
5
"billinggroup_id":"Billing1",
6
"billinggroup_name":"Billing1",
7
"name":"Billing1 Company",
8
"invoices":{
9
"aws": {
10
"calc_type":"account",
11
"currency":"jpy",
12
"discount_calc_logic":"usageamount",
13
"discount_rate":0,
14
"discount_target_usage":"cloudpaywithfee",
15
"substitution_fee":"percent",
16
"substitution_fee_calc_target":"nondiscount",
17
"substitution_fee_calc_type":"allsum",
18
"substitution_fee_target_usage":"cloudpaywithfee",
19
"substitution_fix":0,
20
"substitution_rate":0,
21
"support_amount_target":"allusage",
22
"support_fee":"fix",
23
"support_fee_calc_target":"nondiscount",
24
"support_fix":0,
25
"support_rate":0,
26
"tax_rate":0
27
}
28
"azure": {
29
"calc_type":"account",
30
"currency":"jpy",
31
"discount_calc_logic":"usageamount",
32
"discount_rate":0,
33
"discount_target_usage":"cloudpaywithfee",
34
"substitution_fee":"percent",
35
"substitution_fee_calc_target":"nondiscount",
36
"substitution_fee_calc_type":"allsum",
37
"substitution_fee_target_usage":"cloudpaywithfee",
38
"substitution_fix":0,
39
"substitution_rate":0,
40
"support_amount_target":"allusage",
41
"support_fee":"fix",
42
"support_fee_calc_target":"nondiscount",
43
"support_fix":0,
44
"support_rate":0,
45
"tax_rate":0
46
}
47
},
48
"contact":"personal name",
49
"address":"123 street",
50
"postal":"12345",
51
"phone":"03‐1234‐5678",
52
"title":null,
53
"req_generate":null,
54
"remarks":null,
55
"inv_aggregate":null,
56
"project_id":null,
57
"project_code":null,
58
"project_label":null,
59
"project_currency":null,
60
"language":"ja",
61
"qrcode":false,
62
"invoice_template_id":null,
63
"custom_fields":null,
64
"untagged_groups":null,
65
"account":[],
66
"tag":[]
67
}
Copied!

Update

請求グループ情報の更新
Role actions
  • ModifyBillingGroup
Request
1
POST /billinggroup/{id} HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
4
5
{request body}
Copied!
以下に{request body}のリクエストペイロードの例を示します。
{request body}
1
{
2
"billinggroup_id":"Billing1",
3
"billinggroup_name":"Billing1",
4
"company_name":"Billing1 Company",
5
"phone":"03-123-4567",
6
"postal":"1243",
7
"address":"updateed address",
8
"billing_title":null,
9
"personal":"Personal name",
10
"remarks":"Some remarks data",
11
"inv_aggregate":false,
12
"project_id":"{created_project_id}",
13
"language": "ja"
14
}
Copied!
Field
Type
Required
Validation
Description
billinggroup_id
string
Yes
-
Billing group ID
billinggroup_name
string
Yes
長さ 1 ~ 100
Billing group Name
company_name
string
Yes
長さ 1 ~ 100
Company name
phone
string
No
長さ 12 ~ 16
Tel
postal
string
No
長さ 4 ~ 10
Postal
address
string
No
長さ 1 ~ 100
Address
billing_title
string
No
長さ 1 ~ 100
Invoice title
personal
string
No
長さ 1 ~ 100
Personal name
remarks
string
No
長さ 1 ~ 100
Memo
inv_aggregate
boolean
No
Displaying invoice in bulk or by vendor
project_id
string
No
Project id
language
string
No
サポート: ja, en
Display invoice language setting
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!

Update invoice setting

請求グループ請求書設定の更新
Role actions
  • ModifyBillingGroup
Request
1
POST /billinggroup/{id}/invoices HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
4
5
{request body}
Copied!
以下に{request body}のリクエストペイロードの例を示します。
{request body}
1
{
2
"invoices": {
3
"calc_type":"account",
4
"currency":"jpy",
5
"discount_calc_logic":"usageamount",
6
"discount_rate":0,
7
"discount_target_usage":"cloudpaywithfee",
8
"substitution_fee":"percent",
9
"substitution_fee_calc_target":"nondiscount",
10
"substitution_fee_calc_type":"allsum",
11
"substitution_fee_target_usage":"cloudpaywithfee",
12
"substitution_fix":0,
13
"substitution_rate":0,
14
"support_amount_target":"allusage",
15
"support_fee":"fix",
16
"support_fee_calc_target":"nondiscount",
17
"support_fix":0,
18
"support_rate":0,
19
"tax_rate":0.10
20
},
21
"vendor":"{vendor}"
22
}
Copied!
Field
Type
Required
Validation
Description
calc_type
string
Yes
account,tag
計算タイプ
currency
string
Yes
jpy,usd
通貨
discount_calc_logic
string
Yes
usageamount,allamount
値引き対象
discount_rate
double
Yes
0 ~ 1
値引率
discount_target_usage
string
Yes
cloudpayonly ,cloudpaywithfee
値引き計算方法
substitution_fee
string
Yes
percent, fix, automatic, usagetable
代行手数料請求方法
substitution_fee_calc_target
string
Yes
cloudpayonly, cloudpaywithfee
代行手数料計算対象
substitution_fee_calc_type
string
Yes
allsum, account
請求代行サービス計算方法
substitution_fee_target_usage
string
Yes
nondiscount, discounted
請求代行手数料対象
substitution_fix
double
Yes
0 ~ 1,000,000
代行手数料 固定
substitution_rate
double
Yes
0 ~ 1
代行手数料 (%)
support_amount_target
string
Yes
allusage, cloudpayonlywithfee
表示なし
support_fee
string
Yes
- aws percent, aws_developer, aws_business, aws_enterprise, fix - azure percent, fix
サポート料請求方法
support_fee_calc_target
string
Yes
cloudpayonly, cloudpaywithfee
サポート料計算対象
support_fix
double
Yes
0 ~ 1,000,000
サポート料 固定
support_rate
double
Yes
0 ~ 1
サポート料 %
tax_rate
double
Yes
0 ~ 0.08
消費税率 %
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!

Update free format

請求グループその他費用の追加・更新
Role actions
  • ModifyBillingGroup
Request
1
POST /billinggroup/{id}/freeformat/{vendor} HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
4
5
{request body}
Copied!
リクエストパラーメータの{id}は請求グループ内部ID{company_id}です。
以下に{request body}のリクエストペイロードの例を示します。
{request body}
1
{
2
"additional_items":[
3
{
4
"enabled":true,
5
"label":"testlabel",
6
"unit_cost":1,
7
"quantity":10000,
8
"total":10000
9
}
10
]
11
}
Copied!
additional_items object description
Field
Type
Required
Validation
Description
enabled
boolean
Yes
-
有効、無効
label
string
Yes
長さ 1 ~ 60
タイトル
unit_cost
double
Yes
-
単価
quantity
double
Yes
-
数量
total
double
Yes
-
金額
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!

Delete free format

請求グループその他費用の削除
Role actions
  • ModifyBillingGroup
Request
1
DELETE /billinggroup/{id}/freeformat/{vendor} HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
Copied!
リクエストパラーメータの{id}は請求グループ内部ID{company_id}です。
請求グループに追加されているその他費用を全て削除します。
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!

Update Invoice Template

請求グループ請求テンプレートの更新
Role actions
  • ModifyBillingGroup
Request
1
POST /billinggroup/{id}/invoicetemplate HTTP1.1
2
Authorization: Bearer {token}
3
Content-Type: application/json
4
5
{request body}
Copied!
リクエストパラーメータの{id}は請求グループ内部ID{company_id}です
以下に{request body}のリクエストペイロードの例を示します。
{request body}
1
{
2
"invoice_template_id": "abcdefg"
3
}
Copied!
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!

Delete

請求グループの削除
Role actions
  • ModifyBillingGroup
Request
1
DELETE /billinggroup/{id} HTTP1.1
2
Authorization: Bearer {token}
Copied!
Response
1
HTTP 200
2
3
{"status":"success"}
Copied!