カスタム項目登録更新
/api/v1.0/custom_field/bulk_upsert
複数のカスタム項目を登録または更新します
アウトライン
リクエスト
- Path:
/api/v1.0/custom_field/bulk_upsert - Preferred HTTP method:
POST - Accepted content types:
application/json - Encode:
UTF-8
Parameters
| 名前 | 概要 | 桁数 | 種別 | 必須 |
|---|---|---|---|---|
| user_id | ユーザー ID | 100 | メール形式 | 必須 |
| access_key | アクセスキー | 100 | 半角英数 | 必須 |
| custom_field | カスタム項目に属するパラメータ | array |
custom_field (request)
下記のような項目のオブジェクトを持つリスト
| 名前 | 概要 | 桁数 | 種別 | 必須 |
|---|---|---|---|---|
| number | カスタム項目番号 ※登録後は変更できません |
18 | 数値 | (更新時)^1 |
| code | カスタム項目コード ※登録後は変更できません |
20 | 半角英数+記号 | (更新時)^1 |
| name | カスタム項目名 | 60 | 文字列 | (登録時) |
| target | カスタム項目設定対象 2 : 請求情報・商品 |
1 | 数値 | (登録時) |
| type | カスタム項目種別 1: テキストボックス |
1 | 数値 | (登録時) |
| required | カスタム項目必須 0: 任意 1: 必須 ※追加省略時、0で登録される |
1 | 数値 | |
| description | カスタム項目説明 ※追加省略時、nullで登録される |
200 | 文字列 |
レスポンス
- Type:
application/json - Encode:
UTF-8
Fields
| 名前 | 概要 | 型 |
|---|---|---|
| user_id | ユーザー ID | string |
| custom_field | カスタム項目に属するパラメータ | array |
custom_field (response)
下記のような項目のオブジェクトを持つリスト
| 名前 | 概要 | 型 |
|---|---|---|
| error_code | エラーコード ※正常時はnull |
int |
| error_message | エラーメッセージ ※正常時はnull |
string |
| number | カスタム項目番号 | int |
| code | カスタム項目コード | string |
| name | カスタム項目名 | string |
| target | カスタム項目設定対象 2 : 請求情報・商品 |
int |
| type | カスタム項目種別 1: テキストボックス |
int |
| required | カスタム項目必須 0: 任意 1: 必須 |
int |
| description | カスタム項目説明 | string |
使用例
リクエスト例
{
"user_id": "sample@robotpayment.co.jp",
"access_key": "xxxxxxxxxxxxxxxx",
"custom_field": [
{
"number": "",
"code": "sample_code",
"name": "カスタム項目名1",
"target": 2,
"type": 1,
"required": 1,
"description": "カスタム項目説明"
}
]
}
レスポンス例
{
"user_id": "sample@robotpayment.co.jp",
"custom_field": [
{
"error_code": null,
"error_message": null,
"number": 10,
"code": "sample_code",
"name": "カスタム項目名1",
"target": 2,
"type": 1,
"required": 1,
"description": "カスタム項目説明"
}
]
}
エラー
個別エラー
| エラーコード | 内容 |
|---|---|
| 4801 | リクエストパラメータにカスタム項目情報が存在しません |
| 4802 | カスタム項目番号が不正 |
| 4803 | カスタム項目コードが不正 |
| 4804 | カスタム項目名が不正 |
| 4805 | カスタム項目設定対象が不正 |
| 4806 | カスタム項目種別が不正 |
| 4807 | カスタム項目必須が不正 |
| 4808 | カスタム項目説明が不正 |
| 4809 | カスタム項目番号とカスタム項目コードは同時に指定できません |
| 4810 | 更新対象のカスタム項目情報が存在しません |
| 4811 | リクエスト件数が上限を超えています。 |
| 4812 | カスタム項目登録上限数を超えてます |
| 4813 | カスタム項目情報にはarrayを指定してください |
| 4814 | カスタム項目情報の登録更新に失敗 |