esmDevelopers
JSプラグイン
esm API
JSプラグイン
esm API
  • 顧客(customer)

顧客(customer)

顧客に関する情報の登録・更新・取得・削除ができます。

レコードのidの取得にはSearch APIが使用できます。

顧客取得

必要な権限

顧客参照

Request

URL

https://gateway-esm.softbrain.com/sheet-fs/{tenant}/pub/esms/v1/sheet/customer/{id}

HTTP Method

GET

Parameter

Path Parameter
No.パラメータ必須タイプデフォルト値説明
1tenant○string-テナントID
2id○string-対象レコードID

顧客登録

必要な権限

顧客登録

Request

URL

https://gateway-esm.softbrain.com/sheet-fs/{tenant}/pub/esms/v1/sheet/customer

HTTP Method

POST

Parameter

Path Parameter
No.パラメータ必須タイプデフォルト値説明
1tenant○string-テナントID
Request Body
No.プロパティ名必須項目名タイプ備考
1customers.customer.customer_type顧客タイプstring顧客タイプマスタの選択肢名。マスタの選択肢取得方法
2customers.customer.customer_logo顧客ロゴobject
- fileidファイルIDstring事前にcmsにアップロードしたfileIdを指定
3customers.customer.customer_name顧客名
4customers.customer.customer_name_other顧客名(かな)string
5customers.customer.existing_flg存続フラグstring"存続", "倒産"のいずれか
6customers.customer.address住所object
- zipcode郵便番号string
- country国string
- street番地string
- building建物string
7customers.customer.tel_no電話番号string
8customers.customer.urlURLstring
9customers.customer.relational_business_card_info顧客コンタクト先array(object)
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.id
顧客コンタクト先IDnumber新規登録の場合はnull, 更新の場合は値指定
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.contact_master
コンタクト先stringコンタクト先マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.relational_businesscard
紐づき名刺IDnumberテキスト名刺に値を設定する場合は、項目自体不要
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.remarks
備考string
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.text_business_card_name
テキスト名刺string紐づき名刺IDに値を設定する場合は、項目自体不要
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.position
立ち位置string立ち位置マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.motivation
意向string意向マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.counter
窓口booleantrueと指定できるものは一つのみ
10customers.customer.relational_parent_customer紐づき親顧客number
11customers.customer.relational_trading_product紐づき取引商品array(number)
12customers.customer.relational_milestone顧客シナリオarray(number)
13customers.customer.business_type業種(選択)array(string)ユーザー設定の選択肢名
14customers.customer.memo詳細内容string
15customers.customer.charge_employee
@customers.charge_employee.main_charge
主担当者IDnumber社員IDを指定。
16customers.customer.charge_employee
@customers.charge_employee.target_employee
@employees.employee.id
自社担当者である社員IDarray(number)社員IDを指定。主担当者も含む。
17customers.customer.charge_department
@customers.charge_department.main_charge
主担当部署IDnumber部署IDを指定。
18customers.customer.charge_department
@customers.charge_department.target_department
@employees.department.id
自社担当部署である部署IDarray(number)部署IDを指定。主担当部署も含む。
19customers.customer.charge_group
@customers.charge_group.main_charge
主担当グループIDnumberグループIDを指定。
20customers.customer.charge_group
@customers.charge_group.target_group
@employees.group.id
自社担当グループであるグループIDarray(number)グループIDを指定。主担当グループも含む。
21拡張項目の項目名は、システムで設定するitem_idを設定する。item_idの確認方法拡張項目any()拡張項目を追加する際、アイテムタイプ別定義のページを参照する

Example

    {
  "customers.customer.customer_type": "法人",
  "customers.customer.customer_logo": {
    "fileid": "cd234bbefe27496fa67be84bbd403de8"
  },
  "customers.customer.customer_name": "ソフトブレーン株式会社",
  "customers.customer.customer_name_other": "ソフトブレーン",
  "customers.customer.existing_flg": "存続",
  "customers.customer.address": {
    "street": "東京都中央区銀座6-18-2",
    "country": "JPN",
    "zipcode": "03-6779-98",
    "building": "野村不動産銀座ビル 11階"
  },
  "customers.customer.tel_no": "0917385793",
  "customers.customer.url": "https://www.softbrain.co.jp/",
  "customers.customer.relational_business_card_info": [
    {
      "customers.customer.relational_business_card_info@business_cards.business_card_info.id": 123,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.contact_master": "キーマン",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.remarks": "メモ",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.text_business_card_name": null,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.position": "決裁者",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.motivation": "前向き",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.relational_businesscard": 123
    }
  ],
  "customers.customer.relational_parent_customer": 123,
  "customers.customer.relational_trading_product": [
    123
  ],
  "customers.customer.relational_milestone": [
    123
  ],
  "customers.customer.business_type": [
    "一般対応"
  ],
  "customers.customer.memo": "メモ",
  "customers.customer.charge_employee@customers.charge_employee.main_charge": 123,
  "customers.customer.charge_employee@customers.charge_employee.target_employee@employees.employee.id": [
    123,
    456
  ],
  "customers.customer.charge_department@customers.charge_department.main_charge": 123,
  "customers.customer.charge_department@customers.charge_department.target_department@employees.department.id": [
    123,
    456
  ],
  "customers.customer.charge_group@customers.charge_group.main_charge": 123,
  "customers.customer.charge_group@customers.charge_group.target_group@employees.group.id": [
    123,
    456
  ]
}

顧客更新

必要な権限

顧客変更

Request

URL

https://gateway-esm.softbrain.com/sheet-fs/{tenant}/pub/esms/v1/sheet/customer/{id}

HTTP Method

PUT

Parameter

Path Parameter
No.パラメータ必須タイプデフォルト値説明
1tenant○string-テナントID
2id○string-対象レコードID
Request Body
No.プロパティ名必須項目名タイプ備考
1customers.customer.customer_type顧客タイプstring顧客タイプマスタの選択肢名。マスタの選択肢取得方法
2customers.customer.customer_logo顧客ロゴobject事前にcmsにアップロードしたfileIdを指定
- fileidファイルIDstring
3customers.customer.customer_name顧客名
4customers.customer.customer_name_other顧客名(かな)string
5customers.customer.existing_flg存続フラグstring"存続", "倒産"のいずれか
6customers.customer.address住所object
- zipcode郵便番号string
- country国string
- street番地string
- building建物string
7customers.customer.tel_no電話番号string
8customers.customer.urlURLstring
9customers.customer.relational_business_card_info顧客コンタクト先array(object)
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.id
顧客コンタクト先IDnumber新規登録の場合はnull, 更新の場合は値指定
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.contact_master
コンタクト先stringコンタクト先マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.relational_businesscard
紐づき名刺IDnumberテキスト名刺に値を設定する場合は、項目自体不要
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.remarks
備考string
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.text_business_card_name
テキスト名刺string紐づき名刺IDに値を設定する場合は、項目自体不要
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.position
立ち位置string立ち位置マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.motivation
意向string意向マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.counter
窓口booleantrueと指定できるものは一つのみ
10customers.customer.relational_parent_customer紐づき親顧客number
11customers.customer.relational_trading_product紐づき取引商品array(number)
12customers.customer.relational_milestone顧客シナリオarray(number)
13customers.customer.business_type業種(選択)array(string)ユーザー設定の選択肢名
14customers.customer.memo詳細内容string
15customers.customer.charge_employee
@customers.charge_employee.main_charge
主担当者IDnumber社員IDを指定。
16customers.customer.charge_employee
@customers.charget_employee.target_employee
@employees.employee.id
自社担当者である社員IDarray(number)社員IDを指定。主担当者も含む。
17customers.customer.charge_department
@customers.charge_department.main_charge
主担当部署IDnumber部署IDを指定。
18customers.customer.charge_department
@customers.charge_department.target_department
@employees.department.id
自社担当部署である部署IDarray(number)部署IDを指定。主担当部署も含む。
19customers.customer.charge_group
@customers.charge_group.main_charge
主担当グループIDnumberグループIDを指定。
20customers.customer.charge_group
@customers.charge_group.target_group
@employees.group.id
自社担当グループであるグループIDarray(number)グループIDを指定。主担当グループも含む。
21拡張項目の項目名は、システムで設定するitem_idを設定する。item_idの確認方法拡張項目any()拡張項目を追加する際、アイテムタイプ別定義のページを参照する

Example


{
  "customers.customer.customer_type": "法人",
  "customers.customer.customer_logo": {
    "fileid": "cd234bbefe27496fa67be84bbd403de8"
  },
  "customers.customer.customer_name": "ソフトブレーン株式会社",
  "customers.customer.customer_name_other": "メモ",
  "customers.customer.existing_flg": "存続",
  "customers.customer.address": {
    "street": "東京都中央区銀座6-18-2",
    "country": "JPN",
    "zipcode": "03-6779-98",
    "building": "野村不動産銀座ビル 11階"
  },
  "customers.customer.tel_no": "0917385793",
  "customers.customer.url": "https://www.softbrain.co.jp/",
  "customers.customer.relational_business_card_info": [
    {
      "customers.customer.relational_business_card_info@business_cards.business_card_info.id": 123,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.contact_master": "キーマン",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.remarks": "メモ",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.text_business_card_name": null,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.position": "決裁者",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.motivation": "前向き",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.relational_businesscard": 123
    }
  ],
  "customers.customer.relational_parent_customer": 123,
  "customers.customer.relational_trading_product": [
    123
  ],
  "customers.customer.relational_milestone": [
    123
  ],
  "customers.customer.business_type": [
    "一般対応"
  ],
  "customers.customer.memo": "a",
  "customers.customer.charge_employee@customers.charge_employee.main_charge": 123,
  "customers.customer.charge_employee@customers.charge_employee.target_employee@employees.employee.id": [
    123,
    456
  ],
  "customers.customer.charge_department@customers.charge_department.main_charge": 123,
  "customers.customer.charge_department@customers.charge_department.target_department@employees.department.id": [
    123,
    456
  ],
  "customers.customer.charge_group@customers.charge_group.main_charge": 123,
  "customers.customer.charge_group@customers.charge_group.target_group@employees.group.id": [
    123,
    456
  ]
}

顧客削除

必要な権限

顧客削除・顧客一括削除

Request

URL

https://gateway-esm.softbrain.com/sheet-fs/{tenant}/pub/esms/v1/sheet/customer/{id}

HTTP Method

DELETE

Parameter

Path Parameter
No.パラメータ必須タイプデフォルト値説明
1tenant○string-テナントID
2id○string-対象レコードID

Response

Response Body

Response Bodyはこちらの共通仕様に則っています。

No.プロパティ名項目名タイプ備考
1customers.customer.id顧客IDnumber
2customers.customer.customer_type顧客タイプstring顧客タイプマスタの選択肢名
3customers.customer.customer_logo顧客ロゴobject取得したfileIdを使って、cmsからファイルをダウンロード可能
- fileidファイルIDstring
- filenameファイル名string
4customers.customer.customer_name顧客名string
5customers.customer.customer_name_other顧客名(かな)string
6customers.customer.existing_flg存続フラグstring"存続", "倒産"のいずれか
7customers.customer.address住所object
- zipcode郵便番号string
- country国string
- street番地string
- building建物string
8customers.customer.tel_no電話番号string
9customers.customer.urlURLstring
10customers.customer.relational_business_card_info顧客コンタクト先array(object)
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.id
顧客コンタクト先IDnumber
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.contact_master
コンタクト先stringコンタクト先マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.relational_businesscard
紐づき名刺IDnumber
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.valid_contact_date
有効接触日string"yyyy/mm/dd"形式の日付
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.remarks
備考string
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.text_business_card_name
テキスト名刺string
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.position
立ち位置string立ち位置マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.motivation
意向string意向マスタの設定値
- customers.customer.relational_business_card_info
 @business_cards.business_card_info.counter
窓口boolean
11customers.customer.relational_parent_customer紐づき親顧客number
12customers.customer.relational_trading_product紐づき取引商品array(number)
13customers.customer.relational_milestone顧客シナリオarray(number)
14customers.customer.business_type業種(選択)array(string)ユーザー設定の選択肢名
15customers.customer.memo詳細内容string
16customers.customer.charge_employee
@customers.charge_employee.main_charge
主担当者IDnumber
17customers.customer.charge_employee
@customers.charge_employee.target_employee
@employees.employee.id
自社担当者である社員IDarray(number)主担当者はこちらにも含まれる。
18customers.customer.charge_department
@customers.charge_department.main_charge
主担当部署IDnumber
19customers.customer.charge_department
@customers.charge_department.target_department
@employees.department.id
自社担当部署である部署IDarray(number)主担当部署はこちらにも含まれる。
20customers.customer.charge_group
@customers.charge_group.main_charge
主担当グループIDnumber
21customers.customer.charge_group
@customers.charge_group.target_group
@employees.group.id
自社担当グループであるグループIDarray(number)主担当グループはこちらにも含まれる。
22system_reg_date登録日string"yyyy/mm/dd hh:MM"形式 ※取得のみ
23system_reg_user登録ユーザnumber登録者ユーザID ※取得のみ
24system_reg_employee登録社員number登録社員ID ※取得のみ
25system_upd_date更新日string"yyyy/mm/dd hh:MM"形式 ※取得のみ
26system_upd_user最終更新ユーザnumber最終更新者ユーザID ※取得のみ
27system_upd_employee最終更新社員number最終更新者社員ID ※取得のみ
28拡張項目の項目名は、システムで設定するitem_idを設定する。item_idの確認方法拡張項目any()拡張項目を追加する際、アイテムタイプ別定義のページを参照する

Example


{
  "customers.customer.id": 123,
  "customers.customer.customer_type": "法人",
  "customers.customer.customer_logo": {
    "fileid": "cd234bbefe27496fa67be84bbd403de8",
    "filename": "file.jpg"
  },
  "customers.customer.customer_name": "ソフトブレーン株式会社",
  "customers.customer.customer_name_other": "メモ",
  "customers.customer.existing_flg": "存続",
  "customers.customer.address": {
    "street": "東京都中央区銀座6-18-2",
    "country": "JPN",
    "zipcode": "03-6779-98",
    "building": "野村不動産銀座ビル 11階"
  },
  "customers.customer.tel_no": "0917385793",
  "customers.customer.url": "https://www.softbrain.co.jp/",
  "customers.customer.relational_business_card_info": [
    {
      "customers.customer.relational_business_card_info@business_cards.business_card_info.id": 123,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.contact_master": "キーマン",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.remarks": "メモ",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.text_business_card_name": null,
      "customers.customer.relational_business_card_info@business_cards.business_card_info.position": "決裁者",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.motivation": "前向き",
      "customers.customer.relational_business_card_info@business_cards.business_card_info.relational_businesscard": 123
    }
  ],
  "customers.customer.relational_parent_customer": 123,
  "customers.customer.relational_trading_product": [
    123
  ],
  "customers.customer.relational_milestone": [
    123
  ],
  "customers.customer.business_type": [
    "一般対応"
  ],
  "customers.customer.memo": "a",
  "customers.customer.charge_employee@customers.charge_employee.main_charge": 123,
  "customers.customer.charge_employee@customers.charge_employee.target_employee@employees.employee.id": [
    123
  ],
  "customers.customer.charge_department@customers.charge_department.main_charge": 123,
  "customers.customer.charge_department@customers.charge_department.target_department@employees.department.id": [
    123
  ],
  "customers.customer.charge_group@customers.charge_group.main_charge": 123,
  "customers.customer.charge_group@customers.charge_group.target_group@employees.group.id": [
    123
  ],
  "system_reg_date": "2024/01/01 00:00",
  "system_reg_user": 123,
  "system_reg_employee": 456,
  "system_upd_date": "2024/01/02 00:00",
  "system_upd_user": 123,
  "system_upd_employee": 456
}