請求管理更新_API
概要
請求情報の更新をする API です。
未入金状態のデータしか基本的には更新できません。
状態変更=未入金から入金済みの更新のみ、全データ更新できます。
エンドポイント
| メソッド |
URI |
Headers |
| PUT |
/api/claim |
Default |
リクエストパラメーター
| パラメーター名 |
型 |
内容 |
特記 |
| id |
int |
請求情報 ID |
|
| status |
int |
請求状態 |
1:未入金 2:入金済み |
| remarks |
text |
備考 |
|
| basic_charge_unit_price |
string |
基本料金単価 |
|
| pay_per_use_price |
string |
従量課金単価 |
|
{
'id' :1,
'status' :2
'remarks' :'特例処置',
'basic_charge_unit_price' :30000,
'pay_per_use_price' :1000,
}
レスポンス
成功時
| パラメーター名 |
型 |
内容 |
特記 |
| id |
int |
請求情報 ID |
|
{
"result" : true,
"errors" : "",
"data" : {
'id' : 1,
},
}
{primary} 未入金状態のデータしか基本的には更新できません。状態変更のみ全データ更新できます。
失敗時
ステータスコード:200
| パラメーター名 |
型 |
内容 |
特記 |
| result |
boolean |
リクエスト結果 |
|
| error |
string |
連想配列 / パラメータと key を同一にするように |
|
| status |
int |
not null / int |
|
| remarks |
text |
|
|
| 'basic_charge_unit_price' |
int |
notnull / int / 6桁まで |
|
| 'pay_per_use_price' |
int |
notnull / int / 6桁まで |
|
{
"result" : false,
"errors" : {
'error' : ['更新できないデータです。'],
'status' : '必須項目です|数値で入力してください',
'basic_charge_unit_price' : '必須項目です。|数値で入力してください|6桁以下で入力してください',
'pay_per_use_price' : '必須項目です。|数値で入力してください|6桁以下で入力してください',
},
"data" : "",
}
データストア
organization_payments
| 物理名 |
フィールド名 |
型 |
備考 |
| remarks |
remarks |
text |
|
| basic_charge_unit_price |
basic_charge_unit_price |
string |
|
| pay_per_use_price |
pay_per_use_price |
string |
|
| status |
status |
int |
1:未入金 2:入金済み |
バリデーション
| 画面項目名 |
フィールド名 |
チェック内容 |
備考 |
| 請求状態 |
status |
required |
|
|
digits:1 |
1:未入金 2:入金済み |
| 備考 |
remarks |
required |
|
|
string |
|
|
max:@todo文字数制限があるかも |
| 基本料金単価 |
basic_charge_unit_price |
required |
※1 |
| 従量課金単価 |
pay_per_use_price |
required |
※2 ※1と※2から"amount"を計算する。 |
RUN