Mazrica Sales Open API (v2)

Download OpenAPI specification:

v2 APIは段階的にリリース予定です

現在未掲載のエンドポイントは今後のフェーズで公開予定です。公開までの間は引き続きv1 APIをご利用ください。
旧APIリファレンス(v1)はこちら

Overview

Mazrica Sales のデータを操作するための公開 API (v2) です。本ドキュメントをご確認のうえご利用ください。API は随時拡張していきます。

Introduction

オンラインマニュアル: MazricaAPIを利用する – Mazrica

Endpoints

API のエンドポイントのベース URL は以下です。バージョンの v2 を含めてリクエストしてください。

https://api.mazrica.com/v2/{PATH_TO_REQUEST}

Authentication

認証は PAT(Personal Access Token, mzp_ プレフィックス)または TAT(Team Access Token, mzt_ プレフィックス)による Bearer 認証です。すべてのリクエストの Authorization ヘッダーに Bearer トークンを指定してください。

Authorization: Bearer mzp_xxxxxxxxxxxxxxxx
Content-Type: application/json

curl の例:

curl -X GET 'https://api.mazrica.com/v2/deals' \
  -H 'Authorization: Bearer mzp_xxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json'

トークン種別と権限

  • PAT(mzp_): 権限設定 を利用しているドメインでは、トークンを発行したユーザーの権限が適用されます。閲覧・操作できる範囲はそのユーザーのロールに従い、権限外のデータは取得・操作できません。一覧・検索では権限のあるデータのみがヒットし、権限不足でも 403 ではなくスコープ内の結果(該当なしの場合は空)を返します。権限設定 を利用していないドメインでは制限はありません。
  • TAT(mzt_): ユーザー権限による絞り込みはなく、ドメイン内のデータを制限なく操作できます。

Requests Limit

レート制限を超えた場合は 429 Too Many Requests を返します。日次の上限は UTC 0 時境界でリセットされます。

トークン種別 集計単位 秒間上限 日次上限
PAT (mzp_) ユーザー単位(同一ユーザーの複数 PAT と、MCP 連携経由の利用を合算) 5 req/sec 50,000
TAT (mzt_) ドメイン単位(同一ドメインの複数 TAT を合算) 5 req/sec 200,000

Sort

一覧取得(GET)

一覧を返す API は sort クエリパラメータで並び順を指定できます。キーの前に - を付けると降順になります。指定できるキーと既定の並び順はエンドポイントごとに異なるため、各エンドポイントの sort パラメータの説明を参照してください。

  • 例: GET /v2/customers?sort=createdAt(作成日時の昇順)、GET /v2/customers?sort=-updatedAt(更新日時の降順)

ユーザー(Users)

実行ユーザー情報の取得

  • アクセストークンで実行しているユーザー自身の情報を取得します
  • permissions には、そのユーザーが持つ権限の識別子が入ります
  • 実行ユーザーを特定できない認証(チームアクセストークン等)では 403 になります
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "domainId": 0,
  • "profile": {
    },
  • "permissions": [
    ]
}

ユーザー情報リスト取得

  • ユーザー情報のリスト取得
  • 一度に取得できる件数は100件
  • page を指定することで続きを取得(v1同様のページ方式)
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

deleted
integer
Default: 0
Enum: 0 1
  • 0 削除ユーザーは取得されません
  • 1 削除ユーザーも含めて取得します
email
string

指定したEメールアドレスのユーザーのみ取得します

Responses

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "totalCount": 0,
  • "page": 0
}

ユーザーグループ(UserGroups)

ユーザーグループ情報リスト取得

ユーザーグループ一覧をv1同様のページ方式で取得します。

  • レスポンスは v1同様の userGroups キー ({ userGroups, totalCount, page })
  • userId を指定すると、そのユーザーが所属するグループのみ返す
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

userId
integer

ユーザーID

Responses

Response samples

Content type
application/json
{
  • "userGroups": [
    ],
  • "totalCount": 0,
  • "page": 0
}

ユーザーグループ情報更新

ユーザーグループの属性を更新します。

  • 指定したフィールドのみ更新します(部分更新)
  • グループ名は必須で、255文字以内かつ同一組織内で重複しない値を指定してください
Authorizations:
bearer_auth
path Parameters
id
required
integer

ユーザーグループID

Request Body schema: application/json
name
string <= 255 characters

ユーザーグループ名

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "orderNum": 0
}

ユーザーグループメンバー追加

ユーザーグループにメンバー(ユーザー)を1人追加します。

  • 認証: PAT (mzp_xxx) または TAT (mzt_xxx) の Bearer トークン
  • PAT の場合、トークン所有ユーザーにメンバー管理(member_settings)のプロファイル権限が必要です
  • 既存メンバーは維持し、指定ユーザーを追加します(追加であり置換ではありません)
  • 既にメンバーの場合も冪等に成功します
  • userId を省略した場合はメンバーを追加せず 200 を返します
  • 対象ユーザーが既に別のグループに所属している場合は 400 を返します
Authorizations:
bearer_auth
path Parameters
userGroupId
required
integer

ユーザーグループID

Request Body schema: application/json
required
userId
integer

指定したユーザーグループに追加するユーザのID

userId指定なし->何も追加されず200を返却

Responses

Request samples

Content type
application/json
{
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "orderNum": 0,
  • "users": [
    ]
}

ユーザーグループメンバー除外

ユーザーグループから指定メンバー(ユーザー)を除外します。

  • 認証: PAT (mzp_xxx) または TAT (mzt_xxx) の Bearer トークン
  • PAT の場合、トークン所有ユーザーにメンバー管理(member_settings)のプロファイル権限が必要です
  • パス末尾の {userId} は除外するユーザーのID
  • ユーザーグループまたは対象ユーザーが存在しない(別ドメイン含む)場合は 404 を返します
  • この操作でユーザー自体が削除されることはありません
Authorizations:
bearer_auth
path Parameters
userGroupId
required
integer

ユーザーグループID

userId
required
integer

ユーザーID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

ユーザーグループメンバー一括更新

ユーザーグループのメンバーを userIds で完全置換します(追加ではありません)。

  • 認証: PAT (mzp_xxx) または TAT (mzt_xxx) の Bearer トークン
  • PAT の場合、トークン所有ユーザーにメンバー管理(member_settings)のプロファイル権限が必要です
  • userIds に含まれない既存メンバーは除外されます。空配列 [] を指定すると全メンバーを除外します
  • userIds を省略した場合はメンバーを変更せず 200 を返します
Authorizations:
bearer_auth
path Parameters
userGroupId
required
integer

ユーザーグループID

Request Body schema: application/json
required
userIds
Array of integers or null

ユーザーID(複数指定)

  • userIds を指定しない場合、ユーザーグループのメンバーは更新されません
  • userIds: [] を指定した場合、グループの所属ユーザーをすべて除外します

Responses

Request samples

Content type
application/json
{
  • "userIds": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "orderNum": 0,
  • "users": [
    ]
}

ロール(Roles)

ロール情報リスト取得

  • ロール情報のリスト取得
  • 一度に取得できる件数は100件
  • page を指定することで続きを取得(v1同様のページ方式)
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

Responses

Response samples

Content type
application/json
{
  • "roles": [
    ],
  • "totalCount": 0,
  • "page": 0
}

取引先設定(CustomerSetting)

取引先設定

取引先詳細項目の定義の一覧を取得します。

  • ページングはありません。ドメイン内の全ての取引先詳細項目を並び順(orderNum)の昇順で返します
  • 選択肢(customItemOptions)は itemType が single_select / multi_select の項目のみ値が設定されます
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "customerCustomItems": [
    ]
}

取引先詳細項目一括登録・更新・削除

取引先詳細項目の定義を一括で登録・更新・削除します(同期実行)。

  • リクエストボディは取引先詳細項目の配列です
  • id を指定すると更新、省略すると登録になります。delete に true を指定すると削除します
  • 選択肢(customItemOptions)も同じく id の指定と delete で登録・更新・削除を切り替えます
  • 成功時は操作後のドメイン内の全ての取引先詳細項目(customerCustomItems)と、リクエストの要素ごとの処理結果(results)を返します
  • 保存は配列の要素ごとに行われるため、途中の要素で失敗した場合はそれより前の要素の保存結果が残ります
  • 項目数・選択肢数の上限超過などの事前チェックに引っかかった場合は、1件も保存せずに errors を返します
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
Request Body schema: application/json
required
Array
id
integer or null

取引先詳細項目ID。既存アイテムの更新時に指定します。省略した場合は新規登録として扱われます。

itemKey
string or null

API項目キー

itemType
required
string

取引先詳細項目タイプ。text, date, number, decimal_number, url, single_select, multi_select, user のいずれかになります。既に登録されている項目のタイプは変更できません(指定しても無視されます)。

name
required
string

取引先詳細項目名

orderNum
integer

並び順

delete
boolean or null

trueを指定すると該当項目を削除します。idと併せて指定してください。

Array of objects or null (CustomerSettingBulkRequestItemOption)

取引先詳細選択項目リスト。itemType が single_select または multi_select の場合に指定します。並び順は配列の順序になります。

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "customerCustomItems": [
    ],
  • "results": [
    ]
}

アクション設定(ActionSetting)

アクション設定

アクション詳細項目の定義を取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • 選択肢(actionCustomItemOptions)は単一選択・複数選択タイプの項目のみが持ちます
  • ドメインでアクション詳細項目が利用可能になっていない場合は 403 になります
  • ドメインでラベルタイプが利用可能になっていない場合、ラベルタイプの項目は含まれません
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "actionCustomItems": [
    ]
}

アクション詳細項目登録

アクション詳細項目を登録します。

  • 成功時は登録したアクション詳細項目を素のオブジェクトで返します
  • before に既存の項目キーを渡すと、その項目の直前に挿入されます
  • 選択肢(actionCustomItemOptions)は single_select / multi_select の場合に指定します
  • ドメインでアクション詳細項目が利用可能になっていない場合は 403 になります
  • ドメインでラベルタイプが利用可能になっていない場合、itemType に label は指定できません
  • PAT 認証の場合は管理者設定の保存権限が必要です(TAT 認証では権限判定を行いません)
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます
Authorizations:
bearer_auth
Request Body schema: application/json
required
name
required
string

項目名。ドメイン内で一意

itemKey
string

項目キー。ドメイン内で一意。省略した場合は自動で採番されます

itemType
required
string
Enum: "text" "date" "single_select" "multi_select" "url" "decimal_number" "label"

アクション詳細項目タイプ。

  • text: テキスト
  • date: 日付
  • single_select: 単一選択
  • multi_select: 複数選択
  • url: URL
  • decimal_number: 数値(小数点あり)
  • label: ラベル

label はドメインでラベルタイプが利用可能な場合のみ指定できます。

before
string

指定した項目キーの手前に項目を追加します。省略した場合は末尾に追加されます

Array of objects (ActionCustomItemOptionInput)

選択肢一覧。itemType が single_select / multi_select の場合に指定します

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "itemKey": "string",
  • "itemType": "text",
  • "before": "string",
  • "actionCustomItemOptions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "itemType": "string",
  • "itemKey": "string",
  • "actionCustomItemOptions": [
    ]
}

アクション詳細項目更新

アクション詳細項目を更新します。

  • 指定したキーのみ更新されます
  • 項目タイプ(itemType)は変更できません
  • 項目キーを変更する場合は newItemKey を指定します
  • 選択肢は value で既存の選択肢を特定します。newValue で選択値自体を変更し、delete に true を指定すると削除します。value が既存の選択肢と一致しない場合は新しい選択肢として追加されます
  • 選択肢は actionCustomItemOptions で指定した順に並び替えられます
Authorizations:
bearer_auth
path Parameters
item_key
required
string

項目キー

Request Body schema: application/json
required
name
string

項目名

newItemKey
string

新しい項目キー。項目キーを変更した場合、元の項目キーの値を前提とした処理が動作しなくなる可能性があります。

Array of objects (ActionCustomItemOptionUpdateParam)

選択肢一覧。 この一覧で指定した通りの並び順で登録されます。

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "newItemKey": "string",
  • "actionCustomItemOptions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "itemType": "string",
  • "itemKey": "string",
  • "actionCustomItemOptions": [
    ]
}

アクション詳細項目削除

アクション詳細項目を削除します。

  • 選択肢と、アクションに登録済みのアクション詳細も同時に削除されます
Authorizations:
bearer_auth
path Parameters
item_key
required
string

項目キー

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

アクション詳細項目ラベルリスト

ラベル型のアクション詳細項目に登録されているラベルの一覧を取得します。

  • 指定したキーのアクション詳細項目が存在しない場合は 404 を返します
  • page / limit によるページングに対応しています
Authorizations:
bearer_auth
path Parameters
actionCustomItemKey
required
string

アクション詳細の項目キー。パス内の {actionCustomItemKey} に指定します。

query Parameters
searchWord
string

指定した文字列と部分一致するラベルを検索します。

sort
string

並び順。- プレフィックスで降順。デフォルトはラベル昇順 ソート可能 name

page
integer

ページ番号(1始まり)。未指定時は1ページ目

limit
integer

取得件数(1〜1000、デフォルト100)

Responses

Response samples

Content type
application/json
{
  • "actionCustomItemKey": "string",
  • "totalCount": 0,
  • "page": 0,
  • "labels": [
    ]
}

取引先(Customers)

取引先情報リスト

取引先一覧をカーソルページネーション形式で取得します。

  • レスポンスは v1同様の customers キー ({ customers, hasMore, nextCursor, totalCount })
  • v1 GET /api/v1/customers と互換のあるデータを、v2 形式で提供します
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

searchWord
string

指定した文字列と取引先名が部分一致する取引先を検索します。

updatedAtFrom
string <date-time>

更新日時による検索範囲(開始)

  • ex) 2018-04-01T10:30:00
updatedAtTo
string <date-time>

更新日時による検索範囲(終了)

  • ex) 2018-04-01T10:30:00
sort
string
Default: "-updated_at"
Enum: "updated_at" "-updated_at" "created_at" "-created_at" "updatedAt" "-updatedAt" "createdAt" "-createdAt"

並び順 ソート可能 updatedAt、createdAt

itemKeyAsPropertyKey
string
Enum: "true" "false"

true の場合 customerCustoms を item_key をキーにしたオブジェクト形式で返す

Responses

Response samples

Content type
application/json
{
  • "customers": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

取引先情報登録

取引先を登録します。

  • 入力値の型不正は 400 BAD_REQUEST、バリデーション失敗は 400 VALIDATION_FAILED
Authorizations:
bearer_auth
Request Body schema: application/json
required
name
required
string

取引先名

address
string or null

住所

telNo
string or null

電話番号

webUrl
string or null

URL

employee
integer or null

従業員数

capital
integer or null

資本金

closingMonth
integer or null

決算月(1〜12)

establishYear
integer or null

設立年(西暦)。未指定の場合、取引先のWebサイトURLからMazrica登録企業が一意に特定できたときは、その企業の設立年が設定されます。

industryId
integer or null

業種ID。指定したIDに対応する業種名がレスポンスの industry.name に設定されます。取引先のWebサイトURLからMazrica登録企業が一意に特定できた場合、業種は特定された企業の主要業種で置き換えられます(特定された企業に主要業種が登録されていない場合は未設定になります)。業種IDの一覧が必要な場合はサポートへお問い合わせください。

ownerRoleId
integer or null

所有ロールID

parentId
integer or null

親取引先ID

companyNum
string or null

企業番号。TargetタブをSales上に表示するための条件として利用されます。画面に表示される項目ではありません。

Array of objects (CustomerCustomCreateParam)

取引先詳細項目。項目は customerCustomItemId か itemKey で特定する

Array of objects (CustomObjectAssociationParam)

関連付けカスタムオブジェクト

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "telNo": "string",
  • "webUrl": "string",
  • "employee": 0,
  • "capital": 0,
  • "closingMonth": 0,
  • "establishYear": 0,
  • "industryId": 0,
  • "ownerRoleId": 0,
  • "parentId": 0,
  • "companyNum": "string",
  • "customerCustoms": [
    ],
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "companyNum": "string",
  • "establishYear": 0,
  • "industry": {
    },
  • "address": "string",
  • "telNo": "string",
  • "webUrl": "string",
  • "employee": 0,
  • "capital": 0,
  • "company": {
    },
  • "closingMonth": 0,
  • "ownerRole": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "customerCustoms": [
    ]
}

取引先情報検索

取引先情報を検索します。v1 POST /api/v1/customers/search と同形式の compositeFilter を受け付けます。

  • ページングは page に代えてカーソル形式 (limit / cursor / nextCursor / hasMore)。totalCount は維持
  • レスポンスのトップキーは customers(v1 互換)
  • 検索は検索インデックスで実行されます。filter / sort に指定できる標準項目は検索インデックス収録のものに限られ、それ以外は 400 になります
  • customerCustoms は軽量形(compact)で常に返します

filter / sort に指定できる標準項目

  • filter: id / name / address / telNo / memo / webUrl / industryId / capital / employee / establishYear / closingMonth / ownerRoleId / createdAt / updatedAt
  • sort: 上記のうち webUrl を除いたもの。省略時は updatedAt 降順(id 昇順タイブレーク)
  • companyNum は検索インデックスに収録していないため、filter / sort のいずれに指定しても 400 になります(v1 と同じ挙動)
  • 項目名は他のパラメータと同じ camelCase で指定できます(snake_case でも受け付けます)
Authorizations:
bearer_auth
Request Body schema: application/json
required
required
object (CustomerSearchFilter)

絞り込み条件

  • compositeFilter と valueFilter を合わせて最大300個まで指定できます(最上位の compositeFilter は件数に含まれません)。
object (CustomerSearchSort)

並び替え条件。省略時は updated_at 降順(id 昇順タイブレーク)。

limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

itemKeyAsPropertyKey
string
Enum: "true" "false"

true の場合 customerCustoms を item_key をキーにしたオブジェクト形式で返す

Responses

Request samples

Content type
application/json
{
  • "filter": {
    },
  • "sort": {
    },
  • "limit": 100,
  • "cursor": "string",
  • "itemKeyAsPropertyKey": "true"
}

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "nextCursor": "string",
  • "hasMore": true,
  • "customers": [
    ]
}

取引先情報

取引先情報を取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • include_related_objects=1 を指定するとカスタムオブジェクト連携情報(customObjects)を含みます
Authorizations:
bearer_auth
path Parameters
id
required
integer

取引先ID

query Parameters
itemKeyAsPropertyKey
string
Enum: "true" "false"

true の場合 customerCustoms を item_key をキーにしたオブジェクト形式で返す

include_related_objects
integer
Default: 0

1 を指定すると、関連付けオブジェクトの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "companyNum": "string",
  • "establishYear": 0,
  • "industry": {
    },
  • "address": "string",
  • "telNo": "string",
  • "webUrl": "string",
  • "employee": 0,
  • "closingMonth": 0,
  • "capital": 0,
  • "company": {
    },
  • "ownerRole": {
    },
  • "customerCustoms": [
    ],
  • "customObjects": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

取引先情報更新

  • 取引先情報を更新します。リクエストに含まれた項目のみ更新されます(部分更新)。
  • 業種は industryId によるIDの直接指定に加え、{ "industry": { "id": 1 } } 形式でも指定できます。
  • industryId / establishYear は null を指定すると未設定になります。一方 companyNum は null や空文字を指定しても既存値は削除されません。
Authorizations:
bearer_auth
path Parameters
id
required
integer

取引先ID

Request Body schema: application/json
required
name
string

取引先名

address
string or null

住所

telNo
string or null

電話番号

webUrl
string or null

URL

employee
integer or null

従業員数

capital
integer or null

資本金

closingMonth
integer or null

決算月(1〜12)

establishYear
integer or null

設立年(西暦)。null を指定すると未設定になります。

industryId
integer or null

業種ID。指定したIDに対応する業種名がレスポンスの industry.name に設定されます。null を指定すると未設定になります。業種IDの一覧が必要な場合はサポートへお問い合わせください。

object or null

業種。industryId の代わりに { "id": 1 } 形式でも指定できます。オブジェクトで指定した場合は industryId より優先されます(null を指定した場合は industryId の値が使われます)。id を含まないオブジェクト({} など)を指定した場合は、industryId を併記していても業種は未設定になります。

ownerRoleId
integer or null

所有ロールID

companyNum
string or null

企業番号。TargetタブをSales上に表示するための条件として利用されます。画面に表示される項目ではありません。null や空文字を指定しても既存値は削除されません。

Array of objects

取引先詳細項目

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "telNo": "string",
  • "webUrl": "string",
  • "employee": 0,
  • "capital": 0,
  • "closingMonth": 0,
  • "establishYear": 0,
  • "industryId": 0,
  • "industry": {
    },
  • "ownerRoleId": 0,
  • "companyNum": "string",
  • "customerCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "companyNum": "string",
  • "establishYear": 0,
  • "industry": {
    },
  • "address": "string",
  • "telNo": "string",
  • "webUrl": "string",
  • "employee": 0,
  • "capital": 0,
  • "company": {
    },
  • "closingMonth": 0,
  • "ownerRole": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "customerCustoms": [
    ]
}

取引先情報削除

指定した取引先を削除します。

  • 成功時はレスポンスボディなしで 200 を返す(v1同様)
  • 関連する案件・コンタクト・行動等の子レコードも同時に削除されます(物理削除のため復元できません)
Authorizations:
bearer_auth
path Parameters
id
required
integer

取引先ID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

取引先一括登録

取引先を一括登録します(v1同様の同期実行)。

  • 成功時は作成した取引先IDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)。
Authorizations:
bearer_auth
Request Body schema: application/json
required
required
Array of objects (CustomerBulkCreateItem) <= 1000 items

登録する取引先の配列

Responses

Request samples

Content type
application/json
{
  • "customers": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

取引先一括更新

取引先を一括更新します(v1同様の同期実行)。

  • 成功時は更新した取引先IDの配列を返します
  • 指定しなかった項目は更新されません
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
  • 同じ取引先IDを複数行に指定した場合は最後の行が採用されます
  • このAPIを使って更新した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)。
Authorizations:
bearer_auth
Request Body schema: application/json
required
required
Array of objects (CustomerBulkUpdateItem) <= 1000 items

更新する取引先の配列

Responses

Request samples

Content type
application/json
{
  • "customers": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

取引先アクション(CustomerActions)

取引先アクション情報リスト

指定した取引先に紐づくアクション一覧をカーソルページネーション形式で取得します。

  • レスポンスは v1 と同じエンベロープ({ totalCount, nextCursor, hasMore, actions })。v1 の page はカーソルページネーションに置き換え
  • v1 互換: customer_id に all を指定すると全取引先のアクションを対象とする
  • 指定したcustomer_idが存在しない場合は 404
  • 指定したcustomer_idへの参照権限がない場合は 403
  • 取引先アクション参照 権限が無い場合は 403 ではなく 200 + 空配列を返す
Authorizations:
bearer_auth
path Parameters
required
integer or string

取引先IDを指定してアクションを検索します。

取引先IDの代わりに、allと指定することで取引先IDを跨いだアクションの取得が可能です。

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

sort
string
Default: "-startDatetime"
Enum: "startDatetime" "-startDatetime" "start_datetime" "-start_datetime"

並び順 ソート可能 startDatetime

startDatetime
string <date-time>
Example: startDatetime=2018-04-01T10:30:00+09:00

開始日時

ex)

  • startDatetime=2019-01-01T09:00:00+09:00
  • endDatetime=2019-01-01T11:00:00+09:00

上記のように指定した場合、開始日時2019-01-01 09:00 から 終了日時2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

endDatetime
string <date-time>
Example: endDatetime=2018-04-01T10:30:00+09:00

終了日時

ex)

  • startDatetime=2019-01-01T09:00:00+09:00
  • endDatetime=2019-01-01T11:00:00+09:00

上記のように指定した場合、開始日時2019-01-01 09:00 から 終了日時2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

createdAtFrom
string <date-time>
Example: createdAtFrom=2018-04-01T10:30:00+09:00

登録日時開始時間

ex)

  • createdAtFrom=2019-01-01T09:00:00+09:00
  • createdAtTo=2019-01-01T11:00:00+09:00

上記のように指定した場合、登録日時が2019-01-01 09:00 から 2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

createdAtTo
string <date-time>
Example: createdAtTo=2018-04-01T10:30:00+09:00

登録日時終了時間

ex)

  • createdAtFrom=2019-01-01T09:00:00+09:00
  • createdAtTo=2019-01-01T11:00:00+09:00

上記のように指定した場合、登録日時が2019-01-01 09:00 から 2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

updatedAtFrom
string <date-time>
Example: updatedAtFrom=2018-04-01T10:30:00+09:00

最終更新日時開始時間

ex)

  • updatedAtFrom=2019-01-01T09:00:00+09:00
  • updatedAtTo=2019-01-01T11:00:00+09:00

上記のように指定した場合、最終更新日時が2019-01-01 09:00 から 2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

updatedAtTo
string <date-time>
Example: updatedAtTo=2018-04-01T10:30:00+09:00

最終更新日時終了時間

ex)

  • updatedAtFrom=2019-01-01T09:00:00+09:00
  • updatedAtTo=2019-01-01T11:00:00+09:00

上記のように指定した場合、最終更新日時が2019-01-01 09:00 から 2019-01-01 11:00(JST)のアクションを検索します。

日時は ISO 8601 形式でタイムゾーンを明示して指定してください(UTC: 2019-01-01T00:00:00Z または JST: 2019-01-01T09:00:00+09:00)。省略時はUTCとして解釈されます。

users[][id]
Array of integers

アクション担当者、その他の担当者を検索します。

GETパラメータで指定する場合、以下の形式で指定します。

?users[][id]=1&users[][id]=2

pattern
integer

アクションの種別

active
string
Enum: "true" "false"

true:予定 false:完了

Responses

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "nextCursor": "string",
  • "hasMore": true,
  • "actions": [
    ]
}

取引先アクション登録

取引先アクションを新規登録します。

  • pattern、startDatetime、endDatetime、creator は必須
  • 関連リソースID(creator / invitees / contacts)が存在しない・別ドメインの場合は 404
Authorizations:
bearer_auth
path Parameters
customer_id
required
integer

取引先ID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
required
object

アクション種別

startDatetime
required
string <date-time>

開始日時

endDatetime
required
string <date-time>

終了日時

required
object

アクション担当者ID

Array of objects

他の担当者

Array of objects

アクションコンタクト

preNote
string or null

アクションの事前メモ

result
string or null

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)。false で完了アクションとして登録します。

Array of objects

アクション詳細項目一覧

Responses

Request samples

Content type
application/json
{
  • "pattern": {
    },
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "invitees": [
    ],
  • "contacts": [
    ],
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "actionCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "string",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "customer": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

取引先アクション情報

  • アクション情報を取得
Authorizations:
bearer_auth
path Parameters
customer_id
required
integer

取引先ID

id
required
integer

アクションID

query Parameters
include_files
integer

1 を指定すると、添付ファイルの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "外部サービスなどから取り込んだ,\nアクションの実施結果",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "customer": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

取引先アクション情報更新

取引先アクションを更新します。

  • 指定したフィールドのみ更新します(部分更新)
  • invitees を指定した場合は全量置き換えになります
Authorizations:
bearer_auth
path Parameters
customer_id
required
integer

取引先ID

id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
object

アクション種別

startDatetime
string <date-time>

開始日時

endDatetime
string <date-time>

終了日時

object

アクション担当者ID

preNote
string or null

アクションの事前メモ

result
string or null

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)

Array of objects

他の担当者

Array of objects

アクションコンタクト

Array of objects

アクション詳細項目一覧

Responses

Request samples

Content type
application/json
{
  • "pattern": {
    },
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "invitees": [
    ],
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "string",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "customer": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

取引先アクション情報削除

  • アクション情報を削除
  • 削除成功時はレスポンスボディなし(200 OK)
Authorizations:
bearer_auth
path Parameters
customer_id
required
integer

取引先ID

id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

取引先アクション一括登録

取引先アクションを一括登録します。

  • 一度に登録可能な上限は1000件です
  • 1件でもエラーがある場合は全件登録されません
  • このAPIを使って登録した場合、監査ログは記録されません
Authorizations:
bearer_auth
query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 本エンドポイント(一括登録/更新)はそもそも通知を送信しないため、指定しても効果はありません。
  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱いで、400にはなりません。
Request Body schema: application/json
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "actions": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

案件設定(DealSetting)

案件タイプリスト

案件タイプの一覧を取得します。

  • ページングはありません(全件を配列で返します)
  • PAT の場合、権限設定を利用しているドメインでは閲覧権限のある案件タイプのみを返します
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

案件タイプ設定情報

案件タイプに紐づく設定情報(フェーズ・商品・契約確度・チャネル・最終/停止フェーズ理由・アクション目的・ 案件詳細項目・フェーズ毎の必須項目・取引先タイプ)を取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • PAT の場合、権限設定を利用しているドメインでは閲覧権限のない案件タイプは 403 になります
  • 商品内訳設定は返しません。商品内訳設定リスト(GET /v2/deal_product_detail_types)を利用してください
Authorizations:
bearer_auth
path Parameters
id
required
integer

案件タイプID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "phases": [
    ],
  • "products": [
    ],
  • "probabilities": [
    ],
  • "channels": [
    ],
  • "endPhaseReasons": [
    ],
  • "actionsPurposes": [
    ],
  • "dealCustomItems": [
    ],
  • "dealRequiredFields": [
    ],
  • "dealCustomerTypes": [
    ]
}

商品内訳設定(DealProductDetailTypes)

商品内訳設定リスト

商品内訳設定の一覧を取得します。

  • レスポンスは v1同様の dealProductDetailTypes キー({ totalCount, page, dealProductDetailTypes })
  • v1同様の page / limit によるページ方式(limit のデフォルトは100、最大1000)
  • dealProductDetailTypeCustom は詳細項目の item_key をキーにしたオブジェクトで、型に該当する値フィールドのみを返します
  • PAT は商品内訳設定の権限が必要です(TAT は権限チェックの対象外)
  • 閲覧権限による絞り込みはなく、ドメイン内の全件が対象です
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)。0以下の場合は100、1000を超える場合は1000として扱います

sort
string

並び順。キーの前に - を付けると降順。カンマ区切りで複数指定可 ソート可能 name、orderNum、price、createdAt、updatedAt、unitCost、grossProfitMargin(snake_case でも指定可) 省略時は id の昇順。指定した場合も末尾に id の昇順が付与されます。指定できないキーは無視されます

dealTypeId
Array of integers

案件タイプID。未指定時はドメイン全ての商品内訳設定を取得します。指定時は指定案件タイプで利用可能な商品内訳設定を取得します。dealTypeId[]=1&dealTypeId[]=2 のような形式で指定することで複数にも対応できます

Responses

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "page": 0,
  • "dealProductDetailTypes": [
    ]
}

商品内訳設定カスタム項目リスト

商品内訳設定のカスタム項目(詳細項目)定義の一覧を取得します。

  • v1同様ページングはなく、ドメイン内の全件を orderNum、id の昇順で返します
  • レスポンスのルートキーは dealProductDetailTypeCustomItems(v2のレスポンスキーはすべて camelCase)
  • 選択肢(dealProductDetailTypeCustomItemOptions)は itemType が single_select / multi_select の項目のみ返します
  • PAT は商品内訳設定の権限が必要です(TAT は権限チェックの対象外)
  • 閲覧権限による絞り込みはなく、ドメイン内の全件が対象です
Authorizations:
bearer_auth
query Parameters
dealTypeId
Array of integers

案件タイプID。未指定時はドメイン全ての商品内訳設定カスタム項目を取得します。指定時は指定案件タイプで利用可能な商品内訳設定カスタム項目を取得します。dealTypeId[]=1&dealTypeId[]=2 のような形式で指定することで複数にも対応できます

Responses

Response samples

Content type
application/json
{
  • "dealProductDetailTypeCustomItems": [
    ]
}

商品内訳設定一括登録

商品内訳設定を一括登録します(同期実行)。

  • 成功時は作成した商品内訳設定IDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です
  • カスタム項目の値は value で渡し、項目タイプに応じた属性へ自動的に振り分けられます
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
Request Body schema: application/json
required
required
Array of objects (DealProductDetailTypeBulkCreateItem) <= 1000 items

登録する商品内訳設定の配列

Responses

Request samples

Content type
application/json
{
  • "dealProductDetailTypes": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

商品内訳設定一括更新

商品内訳設定を一括更新します(同期実行)。

  • 成功時はレスポンスボディを返しません(200のみ)
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です
  • 指定したキーのみ更新されます
  • 案件で使用中、または数式項目から参照中の案件タイプの紐付けは解除できません
  • このAPIを使って更新した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
Request Body schema: application/json
required
required
Array of objects (DealProductDetailTypeBulkUpdateItem) <= 1000 items

更新する商品内訳設定の配列

Responses

Request samples

Content type
application/json
{
  • "dealProductDetailTypes": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "error": "Bad Request",
  • "messages": [
    ]
}

案件(Deals)

案件情報リスト

案件一覧をカーソルページネーション形式で取得します

  • レスポンスは v1 と同じ deals キーの配列を含む構造 ({ deals, hasMore, nextCursor, totalCount })
  • 10,000 件超のデータでもカーソル経由で順次取得可能
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

searchWord
string

指定した文字列と取引先名、または案件名が部分一致する案件を検索します。

dealTypeId
integer

案件タイプID

sort
string

並び順。- プレフィックスで降順。省略時は更新日時の降順。 ソート可能 updatedAt、createdAt

updatedAtFrom
string <date-time>
Example: updatedAtFrom=2018-04-01T10:30:00+09:00

更新日時による検索範囲(開始)。タイムゾーンを明示すること(省略時はUTCとして解釈される)

updatedAtTo
string <date-time>
Example: updatedAtTo=2018-04-01T10:30:00+09:00

更新日時による検索範囲指定(終了)。タイムゾーンを明示すること(省略時はUTCとして解釈される)

itemKeyAsPropertyKey
string
Enum: "true" "false"

true を指定した場合、詳細項目のレスポンス形式が itemKey(API項目キー) をプロパティキーとしたオブジェクトになります

Responses

Response samples

Content type
application/json
{
  • "deals": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

案件情報登録

案件を登録します。

  • 関連リソース(customer / dealType / phase / product / probability / channel / user)は { "id": N } 形式で指定
  • 関連リソースIDが存在しない/別ドメインの場合は 404
  • 入力値の型不正は 400 Bad Request、バリデーション失敗は 400 Validation Failed
Authorizations:
bearer_auth
query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
itemKeyAsPropertyKey
string
Enum: "true" "false"

true を指定した場合、詳細項目のレスポンス形式が itemKey(API項目キー) をプロパティキーとしたオブジェクトになります

Request Body schema: application/json
required
name
required
string

案件名

amount
integer or null

契約金額

expectedContractDate
required
string <date>

契約予定日。YYYY-MM-DD

reason
string or null

最終停止理由。フェーズが進行中以外のときに endPhaseReasonIds とどちらか必須

required
object

取引先

required
object

案件タイプ |- 一括登録の場合はURLパラメータで案件タイプが指定されるため不要

required
object

フェーズ

required
object

商品

required
object

契約確度

required
object

チャネル

required
object

ユーザー

endPhaseReasonIds
Array of integers

最終停止理由ID 配列。フェーズが進行中以外のときに reason とどちらか必須

Array of objects (DealCustomCreateParam)

案件詳細項目。の登録値の配列。項目は dealCustomItemId か itemKey で特定する

Array of objects (DealProductDetailCreateParam)

商品内訳。の配列

Array of objects (DealCustomerCreateParam)

関連取引先。の配列

Array of objects (CustomObjectAssociationParam)

関連付けカスタムオブジェクト

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "amount": 0,
  • "expectedContractDate": "2019-08-24",
  • "reason": "string",
  • "customer": {
    },
  • "dealType": {
    },
  • "phase": {
    },
  • "product": {
    },
  • "probability": {
    },
  • "channel": {
    },
  • "user": {
    },
  • "endPhaseReasonIds": [
    ],
  • "dealCustoms": [
    ],
  • "dealProductDetails": [
    ],
  • "dealCustomers": [
    ],
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "amount": 0,
  • "closingLeadtime": 0,
  • "fromEmail": true,
  • "memo": "string",
  • "expectedContractDate": "2019-08-24",
  • "reason": "string",
  • "totalCost": "string",
  • "totalProfit": "string",
  • "dealType": {
    },
  • "customer": {
    },
  • "phase": {
    },
  • "product": {
    },
  • "probability": {
    },
  • "channel": {
    },
  • "user": {
    },
  • "endPhaseReasons": [
    ],
  • "phaseStayDays": [
    ],
  • "dealProductDetails": [
    ],
  • "dealCustomerTypes": [
    ],
  • "dealCustoms": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

案件情報検索

案件情報を検索します。

  • レスポンスはカーソルページネーション形式 ({ deals, hasMore, nextCursor, totalCount })
  • dealCustoms は常時返却(compactCustoms=true相当で型別フィールドのみ。noCustoms/compactCustomsのクライアント指定は不可)
  • 検索は検索インデックスで実行されます。filter / sort に指定できる標準項目は検索インデックス収録のものに限られ、それ以外は 400 になります
  • 並び順は request body の sort で指定できます(例: name / updated_at / created_at)。省略時は updated_at 降順(id 昇順タイブレーク)
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

Request Body schema: application/json
required
required
object (DealSearchFilter)

絞り込み条件

  • compositeFilter と valueFilter を合わせて最大300個まで指定できます(最上位の compositeFilter は件数に含まれません)。
object (DealSearchSort)

並び替え条件。省略時は updated_at 降順(id 昇順タイブレーク)。 項目値が NULL のレコードは、昇順では先頭・降順では末尾に並びます。

Responses

Request samples

Content type
application/json
{
  • "filter": {
    },
  • "sort": {
    }
}

Response samples

Content type
application/json
{
  • "deals": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

案件情報

案件詳細を取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • include_related_objects=1 を指定すると関連カスタムオブジェクト情報(customObjects)を含みます
Authorizations:
bearer_auth
path Parameters
id
required
integer

案件ID

query Parameters
itemKeyAsPropertyKey
string
Enum: "true" "false"

true を指定した場合、詳細項目のレスポンス形式が itemKey(API項目キー) をプロパティキーとしたオブジェクトになります

include_related_objects
integer
Default: 0

1 を指定すると、関連付けオブジェクトの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "amount": 0,
  • "closingLeadtime": 0,
  • "fromEmail": true,
  • "memo": "string",
  • "expectedContractDate": "2019-08-24",
  • "reason": "string",
  • "totalCost": "string",
  • "totalProfit": "string",
  • "dealType": {
    },
  • "customer": {
    },
  • "phase": {
    },
  • "product": {
    },
  • "probability": {
    },
  • "channel": {
    },
  • "user": {
    },
  • "endPhaseReasons": [
    ],
  • "phaseStayDays": [
    ],
  • "dealProductDetails": [
    ],
  • "dealCustomerTypes": [
    ],
  • "dealCustoms": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

案件情報更新

案件を部分更新(PATCH)します。

  • リクエストに含めたキーのみ更新する(部分更新)
  • 関連リソース(customer / phase / product / probability / channel / user)は { "id": N } 形式で指定
  • 対象案件 / 関連リソースIDが存在しない・別ドメインの場合は 404 NOT_FOUND
  • 入力値の型不正は 400 BAD_REQUEST、バリデーション失敗は 400 VALIDATION_FAILED
Authorizations:
bearer_auth
path Parameters
id
required
integer

案件ID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
itemKeyAsPropertyKey
string
Enum: "true" "false"

true を指定した場合、詳細項目のレスポンス形式が itemKey(API項目キー) をプロパティキーとしたオブジェクトになります

Request Body schema: application/json
required
name
string

案件名

amount
integer or null

契約金額

expectedContractDate
string <date>

契約予定日。YYYY-MM-DD

reason
string or null

最終停止理由。フェーズが進行中以外のときに endPhaseReasonIds とどちらか必須

object

取引先

object

フェーズ

object

商品

object

契約確度

object

チャネル

object

ユーザー

endPhaseReasonIds
Array of integers

最終停止理由ID 配列。フェーズが進行中以外のときに reason とどちらか必須

Array of objects (DealCustomUpdateParam)

案件詳細項目。の更新値の配列。項目は id / dealCustomItemId / itemKey で特定する。value に空値(null / 空文字 / 空配列)を指定すると値を削除する(value を含めない要素は変更しない)。ただし複数選択のラベルタイプは null で変更なし、空配列で削除

Array of objects (DealProductDetailUpdateParam)

商品内訳。id 指定で更新、deleted で削除、id なしで追加

Array of objects (DealCustomerUpdateParam)

関連取引先。delete で解除

Array of objects (CustomObjectAssociationParam)

関連付けカスタムオブジェクト

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "amount": 0,
  • "expectedContractDate": "2019-08-24",
  • "reason": "string",
  • "customer": {
    },
  • "phase": {
    },
  • "product": {
    },
  • "probability": {
    },
  • "channel": {
    },
  • "user": {
    },
  • "endPhaseReasonIds": [
    ],
  • "dealCustoms": [
    ],
  • "dealProductDetails": [
    ],
  • "dealCustomers": [
    ],
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "amount": 0,
  • "closingLeadtime": 0,
  • "fromEmail": true,
  • "memo": "string",
  • "expectedContractDate": "2019-08-24",
  • "reason": "string",
  • "totalCost": "string",
  • "totalProfit": "string",
  • "dealType": {
    },
  • "customer": {
    },
  • "phase": {
    },
  • "product": {
    },
  • "probability": {
    },
  • "channel": {
    },
  • "user": {
    },
  • "endPhaseReasons": [
    ],
  • "phaseStayDays": [
    ],
  • "dealProductDetails": [
    ],
  • "dealCustomerTypes": [
    ],
  • "dealCustoms": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

案件情報削除

指定した案件を削除します。

  • 成功時はレスポンスボディなしで 200 を返す(v1同様。204は返さない)
Authorizations:
bearer_auth
path Parameters
id
required
integer

案件ID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

案件一括登録

案件を一括登録します(v1同様の同期実行)。

  • 案件タイプはパスパラメータ dealTypeId で指定します
  • 成功時は作成した案件IDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
Authorizations:
bearer_auth
path Parameters
dealTypeId
required
integer

案件タイプID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 本エンドポイント(一括登録/更新)はそもそも通知を送信しないため、指定しても効果はありません。
  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱いで、400にはなりません。
Request Body schema: application/json
required
required
Array of objects (DealBulkCreateItem)

登録する案件の配列(最大1000件)

Responses

Request samples

Content type
application/json
{
  • "deals": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

案件一括更新

案件を一括更新します(v1同様の同期実行)。

  • 案件タイプはパスパラメータ dealTypeId で指定します
  • 各案件は id で既存レコードを特定し、送信したフィールドのみ更新します(部分更新)
  • 成功時は更新した案件(deals)とスキップした案件(skippedDeals)を返します
  • 案件ロック中(受注・失注フェーズ)の案件のロック対象項目を更新しようとした場合、その案件はスキップされ skippedDeals に含まれます(PAT のみ対象・TAT はロック無視)
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
Authorizations:
bearer_auth
path Parameters
dealTypeId
required
integer

案件タイプID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 本エンドポイント(一括登録/更新)はそもそも通知を送信しないため、指定しても効果はありません。
  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱いで、400にはなりません。
Request Body schema: application/json
required
required
Array of objects (DealBulkUpdateItem)

更新する案件の配列(最大1000件)

Responses

Request samples

Content type
application/json
{
  • "deals": [
    ]
}

Response samples

Content type
application/json
{
  • "deals": [
    ],
  • "skippedDeals": [
    ]
}

案件コンタクト(DealsContacts)

案件コンタクトリスト

指定した案件に紐づくコンタクト一覧をv1同様のページ方式で取得します。

  • レスポンスは v1同様の contacts キー ({ contacts, totalCount, page })
Authorizations:
bearer_auth
path Parameters
deal_id
required
integer

案件ID

query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

Responses

Response samples

Content type
application/json
{
  • "contacts": [
    ],
  • "totalCount": 0,
  • "page": 0
}

案件コンタクト情報登録

Authorizations:
bearer_auth
path Parameters
deal_id
required
integer

案件ID

contact_id
required
integer

コンタクトID

Responses

Response samples

Content type
application/json
{
  • "error": "Validation Failed",
  • "errors": {
    },
  • "messages": [
    ]
}

案件コンタクト情報削除

指定した案件からコンタクトの紐付けを削除します。

  • 成功時はレスポンスボディなしで 200 を返す(v1同様。204は返さない)
  • コンタクト自体は削除されず、案件との紐付けのみ削除される
Authorizations:
bearer_auth
path Parameters
deal_id
required
integer

案件ID

contact_id
required
integer

コンタクトID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

案件アクション(Actions)

案件アクション情報リスト

案件アクション一覧をカーソルページネーション形式で取得します。

  • レスポンスは v1 と同じ actions キーの配列を含む構造({ actions, hasMore, nextCursor, totalCount })
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

sort
string
Default: "-startDatetime"
Enum: "startDatetime" "-startDatetime" "start_datetime" "-start_datetime"

並び順 ソート可能 startDatetime (- プレフィックスで降順。デフォルトは -startDatetime)

startDatetime
string <date-time>

開始日時

endDatetime
string <date-time>

終了日時

createdAtFrom
string <date-time>

登録日時開始時間

createdAtTo
string <date-time>

登録日時終了時間

updatedAtFrom
string <date-time>

最終更新日時開始時間

updatedAtTo
string <date-time>

最終更新日時終了時間

users[][id]
Array of integers

担当者IDによる絞り込み(複数指定可)

purpose
integer

アクションの目的

active
string
Enum: "true" "false"

true:予定 false:完了

dealId
integer

案件IDを指定して検索します

Responses

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

案件アクション登録

案件アクションを新規登録します。

  • purpose、startDatetime、endDatetime、creator、deal は必須
Authorizations:
bearer_auth
query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
required
object

アクションの目的

startDatetime
required
string <date-time>

開始日時

endDatetime
required
string <date-time>

終了日時

required
object

アクション担当者ID

required
object

案件ID

Array of objects

他の担当者

Array of objects

アクションコンタクト

preNote
string or null

アクションの事前メモ

result
string or null

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)

Array of objects

アクション詳細項目一覧

Responses

Request samples

Content type
application/json
{
  • "purpose": {
    },
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "deal": {
    },
  • "invitees": [
    ],
  • "contacts": [
    ],
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "actionCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "string",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "deal": {
    },
  • "purpose": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

案件アクション情報

案件アクション詳細を取得します。

  • レスポンスはリソースオブジェクトを素で返します(dataラップなし)
  • include_files=1 を指定するとファイル添付情報(files)を含みます
Authorizations:
bearer_auth
path Parameters
id
required
integer

アクションID

query Parameters
include_files
string
Default: "0"
Enum: "0" "1"

1 を指定すると、添付ファイルの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "外部サービスなどから取り込んだ,\nアクションの実施結果",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "deal": {
    },
  • "purpose": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

案件アクション情報更新

案件アクションを更新します。

  • 指定したフィールドのみ更新します(部分更新)
  • invitees を指定した場合は全量置き換えになります
Authorizations:
bearer_auth
path Parameters
id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
object

アクションの目的

startDatetime
string <date-time>

開始日時

endDatetime
string <date-time>

終了日時

object

アクション担当者ID

preNote
string or null

アクションの事前メモ

result
string or null

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)

Array of objects

他の担当者

Array of objects

アクションコンタクト

Array of objects

アクション詳細項目一覧

Responses

Request samples

Content type
application/json
{
  • "purpose": {
    },
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "creator": {
    },
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "invitees": [
    ],
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "string",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "deal": {
    },
  • "purpose": {
    },
  • "contacts": [
    ],
  • "actionCustoms": [
    ]
}

案件アクション情報削除

案件アクションを削除します。

  • 削除成功時はレスポンスボディなしで200を返す(v1同様。204は返さない)
Authorizations:
bearer_auth
path Parameters
id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

案件アクション一括登録

案件アクションを一括登録します(v1同様の同期実行)。

  • 成功時は作成したアクションIDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
Authorizations:
bearer_auth
query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 本エンドポイント(一括登録/更新)はそもそも通知を送信しないため、指定しても効果はありません。
  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱いで、400にはなりません。
Request Body schema: application/json
dealTypeId
required
integer

案件タイプID

required
Array of objects

登録するアクションの配列

Responses

Request samples

Content type
application/json
{
  • "dealTypeId": 0,
  • "actions": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

コンタクト設定(ContactSetting)

コンタクト設定

コンタクト詳細項目の定義の一覧を取得します。

  • ページングはありません。ドメイン内の全てのコンタクト詳細項目を orderNum、id の昇順で返します
  • ドメインの設定で無効になっているタイプ(user / label)の項目は返しません
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "contactCustomItems": [
    ]
}

コンタクト(Contacts)

コンタクト情報リスト

コンタクト一覧をカーソルページネーション形式で取得します。

  • レスポンスは v1 同様に contacts キーの配列 ({ contacts, hasMore, nextCursor, totalCount })
  • v1 GET /api/v1/contacts と互換のあるフィルタを、v2 形式で提供します
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

searchWord
string

指定した文字列と取引先名、コンタクト名、またはメールアドレスが部分一致するコンタクトを検索します。

updatedAtFrom
string <date-time>
Example: updatedAtFrom=2018-04-01T10:30:00

更新日時による検索範囲(開始)

  • ex) 2018-04-01T10:30:00
updatedAtTo
string <date-time>
Example: updatedAtTo=2018-04-01T10:30:00

更新日時による検索範囲(終了)

  • ex) 2018-04-01T10:30:00
phoneNumber
string
Example: phoneNumber=03-1111-2222

固定電話番号、携帯電話番号による検索
ハイフン 市外局番 検索可能

  • ex) 03-1111-2222
  • ex) 0311112222
  • ex) 04992(0)1111
  • ex) 049920局1111
sort
string
Default: "-updated_at"
Enum: "updated_at" "-updated_at" "created_at" "-created_at" "updatedAt" "-updatedAt" "createdAt" "-createdAt"

並び順 ソート可能 updatedAt、createdAt (- プレフィックスで降順。デフォルトは -updated_at)

itemKeyAsPropertyKey
string
Enum: "true" "false"

true の場合 contactCustoms を item_key をキーにしたオブジェクト形式で返す

Responses

Response samples

Content type
application/json
{
  • "contacts": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

コンタクト情報登録

  • コンタクト情報を新規に登録します
  • 登録後のコンタクト情報をレスポンスとして返します
  • PAT 認証の場合のみ権限判定が実行されます
  • レスポンスは contactCustoms を常時含みます(compactCustoms相当。v2はnoCustoms/compactCustoms指定不可)
Authorizations:
bearer_auth
Request Body schema: application/json
required
name
required
string

コンタクト名

email
string or null

メールアドレス

tel
string or null

電話番号

mobileTel
string or null

携帯電話番号

address
string or null

住所

dept
string or null

部署

position
string or null

役職

memo
string or null

メモ

object or null

取引先

Array of objects

コンタクト詳細項目

Array of objects

ライフサイクルステージ

Array of objects

関連付けカスタムオブジェクト

  • 一度に登録可能な上限は1000件です

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "tel": "string",
  • "mobileTel": "string",
  • "address": "string",
  • "dept": "string",
  • "position": "string",
  • "memo": "string",
  • "customer": {
    },
  • "contactCustoms": [
    ],
  • "lifecycleStages": [
    ],
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "tel": "string",
  • "mobileTel": "string",
  • "address": "string",
  • "dept": "string",
  • "position": "string",
  • "memo": "string",
  • "marketoLeadScore": 0,
  • "customer": {
    },
  • "contactCustoms": [
    ],
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00"
}

コンタクト情報検索

コンタクト情報を検索します。

  • field の reference (参照先関連オブジェクト) として以下を指定できます。
    • customer (取引先)
  • レスポンスはカーソルページネーション形式 ({ contacts, hasMore, nextCursor, totalCount })
  • contactCustoms は常時返却(compactCustoms=true相当で型別フィールドのみ。noCustoms/compactCustomsのクライアント指定は不可)
  • 検索は検索インデックスで実行されます。filter / sort に指定できる標準項目は検索インデックス収録のもの(各スキーマの説明を参照)に限られ、それ以外は 400 になります
  • 並び順は request body の sort で指定できます(例: name / updated_at / created_at)。省略時は updated_at 降順(id 昇順タイブレーク)
Authorizations:
bearer_auth
query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

Request Body schema: application/json
required
required
object (ContactSearchFilter)

絞り込み条件

  • compositeFilter と valueFilter を合わせて最大300個まで指定できます(最上位の compositeFilter は件数に含まれません)。
object (ContactSearchSort)

並び替え条件。省略時は updated_at 降順(id 昇順タイブレーク)。 項目値が NULL のレコードは、昇順では先頭・降順では末尾に並びます。

Responses

Request samples

Content type
application/json
{
  • "filter": {
    },
  • "sort": {
    }
}

Response samples

Content type
application/json
{
  • "contacts": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

コンタクト情報

コンタクト詳細を取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • include_related_objects=1 を指定するとカスタムオブジェクト連携情報(customObjects)を含みます
Authorizations:
bearer_auth
path Parameters
id
required
integer

コンタクトID

query Parameters
itemKeyAsPropertyKey
string
Enum: "true" "false"

true の場合 contactCustoms を item_key をキーにしたオブジェクト形式で返す

include_related_objects
integer
Default: 0

1 を指定すると、関連付けオブジェクトの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "tel": "string",
  • "mobileTel": "string",
  • "address": "string",
  • "dept": "string",
  • "position": "string",
  • "memo": "string",
  • "marketoLeadScore": 0,
  • "customer": {
    },
  • "lifecycleStages": [
    ],
  • "contactCustoms": [
    ],
  • "customObjects": [
    ],
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00"
}

コンタクト情報更新

  • コンタクト情報を更新
  • PAT 認証の場合のみ権限判定が実行されます
  • レスポンスは contactCustoms を常時含みます(compactCustoms相当。v2はnoCustoms/compactCustoms指定不可)
  • 指定した属性のみ更新されます(部分更新)
  • レスポンスは v1 同様にリソースオブジェクトを素で返します(data ラップなし)。contactCustoms(詳細項目)も常時含めて返却します
Authorizations:
bearer_auth
path Parameters
id
required
integer

コンタクトID

Request Body schema: application/json
name
string

コンタクト名

email
string or null

メールアドレス

tel
string or null

電話番号

mobileTel
string or null

携帯電話番号

address
string or null

住所

dept
string or null

部署

position
string or null

役職

memo
string or null

メモ

object or null

取引先

Array of objects

コンタクト詳細項目

Array of objects

ライフサイクルステージ

Array of objects

関連付けカスタムオブジェクト

  • 一度に登録可能な上限は1000件です

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "tel": "string",
  • "mobileTel": "string",
  • "address": "string",
  • "dept": "string",
  • "position": "string",
  • "memo": "string",
  • "customer": {
    },
  • "contactCustoms": [
    ],
  • "lifecycleStages": [
    ],
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "email": "string",
  • "tel": "string",
  • "mobileTel": "string",
  • "address": "string",
  • "dept": "string",
  • "position": "string",
  • "memo": "string",
  • "marketoLeadScore": 0,
  • "customer": {
    },
  • "contactCustoms": [
    ],
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00"
}

コンタクト情報削除

  • コンタクト情報を削除
  • PAT 認証時のみ権限判定が実行されます
  • 関連する詳細項目・アクション・案件紐付けも同時に削除されます(物理削除のため復元できません)
Authorizations:
bearer_auth
path Parameters
id
required
integer

コンタクトID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

コンタクトアクション(ContactActions)

コンタクトアクション情報リスト

指定したコンタクトに紐づくアクション一覧をカーソルページネーション形式で取得します。

  • レスポンスは v1 と同じ actions キーの配列を含む構造({ actions, hasMore, nextCursor, totalCount })
  • dataType 未指定時はコンタクトアクション(1)・案件アクション(0)の両方を返します
  • v1 互換: contact_id に all を指定すると全コンタクトのアクションを対象とします
Authorizations:
bearer_auth
path Parameters
required
integer or string

コンタクトIDを指定してアクションを検索します。

コンタクトIDの代わりに、allと指定することでコンタクトIDを跨いだアクションの取得が可能です。 この場合、アクションに紐づくコンタクトのうち1件(コンタクトID昇順の先頭)が contact に返ります。

query Parameters
limit
integer [ 1 .. 1000 ]
Default: 100

取得件数(1〜1000、デフォルト100)

cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

sort
string
Default: "-startDatetime"
Enum: "startDatetime" "-startDatetime" "start_datetime" "-start_datetime"

並び順 ソート可能 startDatetime (- プレフィックスで降順。デフォルトは -startDatetime)

dataType
integer
Enum: 0 1

アクション種別での絞り込み(0:案件アクション / 1:コンタクトアクション)。未指定時は両方

startDatetime
string <date-time>
Example: startDatetime=2018-04-01T10:30:00+09:00

開始日時。タイムゾーンを明示すること(省略時はUTCとして解釈される)

endDatetime
string <date-time>
Example: endDatetime=2018-04-01T10:30:00+09:00

終了日時。タイムゾーンを明示すること(省略時はUTCとして解釈される)

createdAtFrom
string <date-time>
Example: createdAtFrom=2018-04-01T10:30:00+09:00

登録日時開始時間。タイムゾーンを明示すること(省略時はUTCとして解釈される)

createdAtTo
string <date-time>
Example: createdAtTo=2018-04-01T10:30:00+09:00

登録日時終了時間。タイムゾーンを明示すること(省略時はUTCとして解釈される)

updatedAtFrom
string <date-time>
Example: updatedAtFrom=2018-04-01T10:30:00+09:00

最終更新日時開始時間。タイムゾーンを明示すること(省略時はUTCとして解釈される)

updatedAtTo
string <date-time>
Example: updatedAtTo=2018-04-01T10:30:00+09:00

最終更新日時終了時間。タイムゾーンを明示すること(省略時はUTCとして解釈される)

users[][id]
Array of integers

担当者IDによる絞り込み(複数指定可)

pattern
integer

アクションの種別

active
string
Enum: "true" "false"

true:予定 false:完了

Responses

Response samples

Content type
application/json
{
  • "actions": [
    ],
  • "hasMore": true,
  • "nextCursor": "string",
  • "totalCount": 0
}

コンタクトアクション登録

コンタクトアクションを登録します。

  • pattern / startDatetime / endDatetime / creator は必須です
  • レスポンスには actionCustoms(アクション詳細)を常に含めます
  • 日時は JST (+09:00) で返します
Authorizations:
bearer_auth
path Parameters
contact_id
required
integer

コンタクトID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
required
startDatetime
required
string <date-time>

開始日時

endDatetime
required
string <date-time>

終了日時

required
object

アクション担当者ID

Array of objects

他の担当者

preNote
string

アクションの事前メモ

result
string

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)

required
object

アクション種別

Array of objects

アクション詳細項目一覧

Array of objects

アクションに紐づける他のコンタクト

Responses

Request samples

Content type
application/json
{
  • "startDatetime": "2018-04-01T10:30:00+09:00",
  • "endDatetime": "2018-04-01T10:30:00+09:00",
  • "creator": {
    },
  • "invitees": [
    ],
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "pattern": {
    },
  • "actionCustoms": [
    ],
  • "contacts": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "dataType": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "外部サービスなどから取り込んだ,\nアクションの実施結果",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "contact": {
    },
  • "deal": {
    },
  • "actionCustoms": [
    ]
}

コンタクトアクション情報

コンタクトアクション詳細を取得します。

  • レスポンスはリソースオブジェクトを素で返します(dataラップなし)
  • include_files=1 を指定するとファイル添付情報(files)を含みます
Authorizations:
bearer_auth
path Parameters
contact_id
required
integer

コンタクトID

id
required
integer

アクションID

query Parameters
include_files
string
Default: "0"
Enum: "0" "1"

1 を指定すると、添付ファイルの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "id": 0,
  • "dataType": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "外部サービスなどから取り込んだ,\nアクションの実施結果",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "contact": {
    },
  • "deal": {
    },
  • "actionCustoms": [
    ]
}

コンタクトアクション情報更新

コンタクトアクション情報を更新します。

  • 指定したフィールドのみ更新します(部分更新)
  • 更新後のレスポンスには actionCustoms(アクション詳細)を常に含めます
Authorizations:
bearer_auth
path Parameters
contact_id
required
integer

コンタクトID

id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。
Request Body schema: application/json
startDatetime
string <date-time>

開始日時

endDatetime
string <date-time>

終了日時

object

アクション担当者ID

Array of objects

他の担当者

preNote
string

アクションの事前メモ

result
string

アクションの実施結果

active
boolean

アクションの状態(true=未完了、false=完了)

object

アクション種別

Array of objects

アクション詳細項目一覧

Responses

Request samples

Content type
application/json
{
  • "startDatetime": "2018-04-01T10:30:00+09:00",
  • "endDatetime": "2018-04-01T10:30:00+09:00",
  • "creator": {
    },
  • "invitees": [
    ],
  • "preNote": "string",
  • "result": "string",
  • "active": true,
  • "pattern": {
    },
  • "actionCustoms": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "dataType": 0,
  • "startDatetime": "2019-08-24T14:15:22Z",
  • "endDatetime": "2019-08-24T14:15:22Z",
  • "active": true,
  • "syncCalendar": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "preNote": "string",
  • "result": "string",
  • "extraResult": "外部サービスなどから取り込んだ,\nアクションの実施結果",
  • "pattern": {
    },
  • "creator": {
    },
  • "invitees": [
    ],
  • "contact": {
    },
  • "deal": {
    },
  • "actionCustoms": [
    ]
}

コンタクトアクション情報削除

コンタクトアクションを削除します。

  • 削除成功時はレスポンスボディなしで 200 を返す(v1同様。204は返さない)
Authorizations:
bearer_auth
path Parameters
contact_id
required
integer

コンタクトID

id
required
integer

アクションID

query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱い(通知設定に従う)で、400にはなりません。

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

コンタクトアクション一括登録

コンタクトアクションを一括登録します。

  • v1 と同様に同期実行し、作成されたアクションIDの配列を返します。
  • 1リクエストあたりの上限は1000件です。
  • 1件でもエラーがある場合は全件ロールバックします。
Authorizations:
bearer_auth
query Parameters
skipNotice
string
Enum: "true" "false"

true を指定すると、このAPIコールに起因する通知(ベル通知・メール・プッシュ通知)を送信しません。 個人の通知設定で通知ONの場合でも、本パラメータが優先されます。

  • 本エンドポイント(一括登録/更新)はそもそも通知を送信しないため、指定しても効果はありません。
  • 後方互換のため 1 も true として扱います。
  • false および不正値は未指定と同じ扱いで、400にはなりません。
Request Body schema: application/json
required
Array of objects <= 1000 items

登録するコンタクトアクション一覧

Responses

Request samples

Content type
application/json
{
  • "actions": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

ライフサイクルステージ設定(LifecycleStageSetting)

ライフサイクルステージ設定

ライフサイクルステージ種別と、それに紐づくライフサイクルステージの一覧を取得します。

  • ライフサイクルステージをご契約されていないお客様の場合は空のリストを返します
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "lifecycleStageTypes": [
    ]
}

カスタムオブジェクト設定(CustomObjectSetting)

カスタムオブジェクト定義情報リスト

カスタムオブジェクト定義の一覧を取得します。

  • レスポンスは v1同様の customObjectDefs キー({ totalCount, page, customObjectDefs })
  • v1同様の page によるページ方式(1ページあたり100件固定。取得件数の指定はできません)
  • 一覧は項目定義(customObjectItemDefs)を含みません。項目定義はカスタムオブジェクト定義情報(GET /v2/custom_object_defs/{key})で取得してください
  • PAT の場合、権限設定を利用しているドメインでは閲覧権限のないカスタムオブジェクト定義は一覧に含まれません
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

searchWord
string

名前が部分一致するカスタムオブジェクト定義を検索します

Responses

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "page": 0,
  • "customObjectDefs": [
    ]
}

カスタムオブジェクト定義情報登録

カスタムオブジェクト定義を登録します。

  • 定義・項目定義・選択肢定義を1リクエストでまとめて登録できます
  • レスポンスは登録した定義を単件取得と同じ形で返します
  • 項目定義の並び順はリクエストの順序になります
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
Request Body schema: application/json
required
name
required
string

カスタムオブジェクト名

enableBi
boolean

BIのデータソースとして使用するかどうか

key
string

カスタムオブジェクト定義キー。省略時は自動採番されます

Array of objects (CustomObjectItemDefInput)

項目定義一覧

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "enableBi": true,
  • "key": "string",
  • "customObjectItemDefs": [
    ]
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "name": "string",
  • "enableBi": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "customObjectItemDefs": [
    ]
}

カスタムオブジェクト定義情報

カスタムオブジェクト定義の情報を項目定義とあわせて取得します。

  • レスポンスはリソースオブジェクトを素で返します
  • 選択肢(customObjectOptionDefs)は単一選択・複数選択タイプの項目のみが持ちます
  • PAT の場合、権限設定を利用しているドメインでは閲覧権限のないカスタムオブジェクト定義は 403 になります
Authorizations:
bearer_auth
path Parameters
key
required
string

カスタムオブジェクト定義キー

Responses

Response samples

Content type
application/json
{
  • "key": "string",
  • "name": "string",
  • "enableBi": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "customObjectItemDefs": [
    ]
}

カスタムオブジェクト定義情報更新

カスタムオブジェクト定義を更新します。

  • 定義そのものの更新に加えて、項目定義・選択肢定義の追加・更新・削除を1リクエストで行えます
  • 項目定義は key で既存を特定します。既存に無い key を指定すると新規追加になり itemType が必要です
  • キーを変更する場合は newKey を指定します
  • 削除する場合は delete に true を指定してください
  • 選択肢の必須・登録上限・文字数は、指定した差分を適用した更新後の状態で判定します
  • このAPIを使って更新した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
path Parameters
key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
required
name
string

カスタムオブジェクト名

enableBi
boolean

BIのデータソースとして使用するかどうか

newKey
string

新しい定義キーを指定します

Array of objects (CustomObjectItemDefUpdateInput)

項目定義一覧

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "enableBi": true,
  • "newKey": "string",
  • "customObjectItemDefs": [
    ]
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "name": "string",
  • "enableBi": true,
  • "createdAt": "2018-04-01T10:30:00+09:00",
  • "updatedAt": "2018-04-01T10:30:00+09:00",
  • "customObjectItemDefs": [
    ]
}

カスタムオブジェクト定義情報削除

カスタムオブジェクト定義を削除します。

  • 成功時はレスポンスボディを返しません(200のみ)
  • 項目定義・選択肢定義も一緒に削除されます
  • 登録済みのカスタムオブジェクトがある定義を削除すると、そのカスタムオブジェクトも削除されます
  • このAPIを使って削除した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)
Authorizations:
bearer_auth
path Parameters
key
required
string

カスタムオブジェクト定義キー

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

カスタムオブジェクト項目登録

カスタムオブジェクト定義に項目を1件登録します。

  • レスポンスは登録した項目をリソースオブジェクトとして素で返します
  • before を指定すると、その項目キーの手前に挿入します(省略時は末尾に追加)
  • 単一選択・複数選択タイプでは customObjectOptionDefs の指定が必須です
  • ドメインごとの項目登録上限に達している場合は 400 になります
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
required
name
required
string

項目名

itemType
required
string

text: 文字列タイプ

  • text: 文字列タイプ
  • date: 日付タイプ
  • number: 整数タイプ
  • decimal_number: 小数タイプ
  • single_select: 単一選択タイプ
  • multi_select: 複数選択タイプ
key
string

項目キー。省略した場合は自動で設定されます

before
string

指定した項目キーの手前に項目を追加します

Array of objects

選択肢定義一覧。単一選択・複数選択タイプでは必須です

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "itemType": "string",
  • "key": "string",
  • "before": "string",
  • "customObjectOptionDefs": [
    ]
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "name": "string",
  • "itemType": "string",
  • "customObjectOptionDefs": [
    ]
}

カスタムオブジェクト項目更新

カスタムオブジェクト定義の項目を1件更新します。

  • レスポンスは更新した項目をリソースオブジェクトとして素で返します
  • 指定しなかった項目・選択肢は変更されません
  • 項目タイプは登録後に変更できないため、リクエストに含めても無視されます
  • 選択肢は key で対象を指定します。存在しない key を指定した場合、または key を省略した場合は選択肢を追加します
  • 存在しない key に delete を指定した場合は、追加も削除もされません
  • customObjectOptionDefs を指定すると、指定した並び順で選択肢の表示順を採番し直します
  • 既存の選択肢名を入れ替える指定(A→B、B→A)は選択肢名が重複するため 400 になります
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

key
required
string

項目キー

Request Body schema: application/json
required
name
string

項目名

newKey
string

新しい項目キーを指定します

Array of objects

選択肢定義一覧。指定した選択肢のみを更新します

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "newKey": "string",
  • "customObjectOptionDefs": [
    ]
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "name": "string",
  • "itemType": "string",
  • "customObjectOptionDefs": [
    ]
}

カスタムオブジェクト項目削除

カスタムオブジェクト定義の項目を削除します。

  • 成功時はレスポンスボディなしで 200 を返します
  • 単一選択・複数選択タイプの項目を削除すると、その選択肢もあわせて削除されます
  • 削除した項目に登録されていたカスタムオブジェクトの値も削除されます
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

key
required
string

項目キー

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

カスタムオブジェクト(CustomObjects)

カスタムオブジェクト情報リスト

カスタムオブジェクトの一覧をカーソルページネーション形式で取得します。

  • 1回あたりの取得件数は100件固定です(limit は指定できません)
  • cursor は 1回目のリクエストと同じ絞り込み条件・sort とあわせて指定してください(異なる場合は 400 を返します)
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

query Parameters
カスタムオブジェクト項目キー
string

カスタムオブジェクト項目定義の「項目キー」を検索キーとして指定します。

検索条件に指定できるのは下記の項目タイプです。

  • 文字列タイプ(text)
  • 整数タイプ(number)
  • 小数タイプ(decimal_number)
  • 日付タイプ(date)

ただし下記の制御用パラメータと同名の項目キーは、検索条件には指定できません。

  • createdAtFrom、createdAtTo
  • updatedAtFrom、updatedAtTo
  • sort、cursor

例)カスタムオブジェクト「商品」の定義が以下だった場合

項目名 項目キー 項目タイプ
商品コード productCode number
商品名 productName text
  • 商品コード=123
  • 商品名=サンプル商品

という検索条件を指定する場合、以下のようにクエリパラメータを設定します。

/v2/custom_object_defs/products/custom_objects
  ?productCode=123
  &productName=サンプル商品
cursor
string

次ページ取得用カーソル。前回レスポンスの nextCursor をそのまま指定する。1ページ目と異なる sort を指定してcursorを使い回すと400が返る

createdAtFrom
string <date-time>

作成日時による検索範囲(開始)

createdAtTo
string <date-time>

作成日時による検索範囲指定(終了)

updatedAtFrom
string <date-time>

更新日時による検索範囲(開始)

updatedAtTo
string <date-time>

更新日時による検索範囲指定(終了)

sort
string
Enum: "createdAt" "updatedAt"

並び順 ソート可能 updatedAt、createdAt(昇順固定)

Responses

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "hasMore": true,
  • "nextCursor": "string",
  • "customObjects": [
    ]
}

カスタムオブジェクト情報登録

カスタムオブジェクトを登録します。

  • deals / customers / contacts で案件・取引先・コンタクトへの関連付けを同時に登録できます(1オブジェクトあたり最大1000件)
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
required
カスタムオブジェクト項目
any

カスタムオブジェクト項目定義の「項目キー」をJSONのプロパティキーとして指定します。

項目タイプごとに以下の値を設定してください。

  • 文字列タイプ(text)
    • type: string
  • 日付タイプ(date)
    • type: string
    • ISO 8601形式文字列
    • ex) 2023-04-22T00:02:03+09:00
  • 整数タイプ(number)
    • type: integer
  • 小数タイプ(decimal_number)
    • type: string
  • URLタイプ(url)
    • type: string
  • 単一選択タイプ(single_select)
    • type: string
    • 選択肢キー
  • 複数選択タイプ(multi_select)
    • type: Array of string
    • 選択肢キーの配列
  • ユーザータイプ(user)
    • type: Array of integer
    • ユーザーIDの配列

例)カスタムオブジェクト「商品」の定義が以下だった場合

項目名 項目キー 項目タイプ
商品コード productCode number
商品名 productName text
  • 商品コード=123
  • 商品名=サンプル商品

というデータを追加するリクエストペイロードは以下になります。

  {
    "productCode": 123,
    "productName": "サンプル商品"
  }
Array of objects

関連付け案件

Array of objects

関連付け取引先

Array of objects

関連付けコンタクト

Responses

Request samples

Content type
application/json
{
  • "カスタムオブジェクト項目": null,
  • "deals": [
    ],
  • "customers": [
    ],
  • "contacts": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "textKey": "string",
  • "dateKey": "2019-08-24T14:15:22Z",
  • "numberKey": 0,
  • "decimalKey": "string",
  • "urlKey": "string",
  • "singleKey": {
    },
  • "multiKey": [
    ],
  • "userKey": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

カスタムオブジェクト情報

指定したカスタムオブジェクトを取得します。

  • include_related_objects=1 を指定すると、関連付けオブジェクトの情報を含めて返します
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

id
required
integer

カスタムオブジェクトID

query Parameters
include_related_objects
integer

1 を指定すると、関連付けオブジェクトの情報を含めて返します。

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "textKey": "string",
  • "dateKey": "2019-08-24T14:15:22Z",
  • "numberKey": 0,
  • "decimalKey": "string",
  • "urlKey": "string",
  • "singleKey": {
    },
  • "multiKey": [
    ],
  • "userKey": [
    ],
  • "deals": [
    ],
  • "customers": [
    ],
  • "contacts": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

カスタムオブジェクト情報更新

カスタムオブジェクトを更新します。リクエストに含まれた項目のみ更新されます(部分更新)。

  • null または空文字を指定すると項目値を削除します
  • 関連付け(deals / customers / contacts)は { "id": N } で追加、{ "id": N, "delete": true } で解除します
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

id
required
integer

カスタムオブジェクトID

Request Body schema: application/json
required
カスタムオブジェクト項目
any

カスタムオブジェクト項目定義の「項目キー」をJSONのプロパティキーとして指定します。

項目タイプごとに以下の値を設定してください。

  • 文字列タイプ(text)
    • type: string
  • 日付タイプ(date)
    • type: string
    • ISO 8601形式文字列
    • ex) 2023-04-22T00:02:03+09:00
  • 整数タイプ(number)
    • type: integer
  • 小数タイプ(decimal_number)
    • type: string
  • URLタイプ(url)
    • type: string
  • 単一選択タイプ(single_select)
    • type: string
    • 選択肢キー
  • 複数選択タイプ(multi_select)
    • type: Array of string
    • 選択肢キーの配列
  • ユーザータイプ(user)
    • type: Array of integer
    • ユーザーIDの配列

例)カスタムオブジェクト「商品」の定義が以下だった場合

項目名 項目キー 項目タイプ
商品コード productCode number
商品名 productName text
  • 商品コード=123
  • 商品名=サンプル商品

というデータを追加するリクエストペイロードは以下になります。

  {
    "productCode": 123,
    "productName": "サンプル商品"
  }

Responses

Request samples

Content type
application/json
{
  • "カスタムオブジェクト項目": null
}

Response samples

Content type
application/json
{ }

カスタムオブジェクト情報削除

指定したカスタムオブジェクトを削除します。

  • 成功時はレスポンスボディなしで 200 を返す(v1同様)
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

id
required
integer

カスタムオブジェクトID

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

カスタムオブジェクト情報一括登録

カスタムオブジェクトを一括登録します(v1同様の同期実行)。

  • 成功時は作成したカスタムオブジェクトIDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
  • このAPIを使って登録した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)。
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
required
required
Array of objects (CustomObjectBulkCreateItem) <= 1000 items

登録するカスタムオブジェクトの配列。各要素はカスタムオブジェクト項目定義のキーをプロパティとして指定

Responses

Request samples

Content type
application/json
{
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

カスタムオブジェクト情報一括更新

カスタムオブジェクトを一括更新します(v1同様の同期実行)。

  • 成功時は更新したカスタムオブジェクトIDの配列を返します
  • 処理はall-or-nothingで、1件でも失敗すると全件ロールバックされます
  • 1リクエストあたりの上限は 1000 件です。
  • 同じIDが複数回指定された場合、最後の行の値が採用されます。
  • このAPIを使って更新した場合、PAT認証時のみ監査ログが記録されます(TAT認証時は記録されません)。
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
required
required
Array of objects (CustomObjectBulkUpdateItem) <= 1000 items

更新するカスタムオブジェクトの配列。各要素は更新対象の id と、カスタムオブジェクト項目定義のキーをプロパティとして指定

Responses

Request samples

Content type
application/json
{
  • "customObjects": [
    ]
}

Response samples

Content type
application/json
[
  • 0
]

カスタムオブジェクト情報一括削除(条件指定)

条件に一致するカスタムオブジェクトを一括削除します。

  • 成功時はレスポンスボディなしで 200 を返す
  • 条件を1つも指定しない場合、その定義のカスタムオブジェクトを全件削除します
  • ID を指定して削除する場合は POST /v2/custom_object_defs/{custom_object_def_key}/custom_objects/bulk_delete を使用してください
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

query Parameters
createdAtFrom
string <date-time>

作成日時による検索範囲(開始)

createdAtTo
string <date-time>

作成日時による検索範囲指定(終了)

updatedAtFrom
string <date-time>

更新日時による検索範囲(開始)

updatedAtTo
string <date-time>

更新日時による検索範囲指定(終了)

Responses

Response samples

Content type
application/json
{
  • "error": "The access token is invalid."
}

カスタムオブジェクト情報一括削除(ID指定)

リクエストボディで指定したIDのカスタムオブジェクトを一括削除します。

  • 成功時はレスポンスボディなしで 200 を返す
  • customObjectIds が空配列・未指定の場合は1件も削除しません
  • 日時範囲などの条件を指定して削除する場合は DELETE /v2/custom_object_defs/{custom_object_def_key}/custom_objects/bulk を使用してください
Authorizations:
bearer_auth
path Parameters
custom_object_def_key
required
string

カスタムオブジェクト定義キー

Request Body schema: application/json
customObjectIds
Array of integers <= 1000 items

カスタムオブジェクトIDのリスト。最大1000件

Responses

Request samples

Content type
application/json
{
  • "customObjectIds": [
    ]
}

Response samples

Content type
application/json
{
  • "error": "Bad Request",
  • "messages": [
    ]
}

オブジェクト名称(ObjectLabels)

オブジェクト名称取得

  • 基本オブジェクト(取引先・案件・コンタクト・アクション)の名称を取得します
  • label は実際に表示されている名称です。名称が変更されていない場合は defaultLabel と同じ値を返します
  • defaultLabel はシステム標準の名称です
Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "customer": {
    },
  • "deal": {
    },
  • "contact": {
    },
  • "action": {
    }
}

オブジェクト名称更新

  • 基本オブジェクト(取引先・案件・コンタクト・アクション)の名称を変更します
  • リクエストに含めたオブジェクトのみ更新し、含めないオブジェクトは変更しません
  • null を指定するとシステム標準の名称に戻します
  • 名称は10文字以内・改行不可で、4オブジェクト間で重複できません
  • 未知のオブジェクト種別、および文字列でもnullでもない値は400で拒否します
  • レスポンスは GET /v2/object_labels と同一形式の、更新後の名称です
  • 個人トークン(PAT)で実行する場合は「管理者設定」権限が必要です
Authorizations:
bearer_auth
Request Body schema: application/json
required
customer
string or null <= 10 characters

取引先に設定する名称(10文字以内・改行不可)。null でシステム標準の名称に戻す

deal
string or null <= 10 characters

案件に設定する名称(10文字以内・改行不可)。null でシステム標準の名称に戻す

contact
string or null <= 10 characters

コンタクトに設定する名称(10文字以内・改行不可)。null でシステム標準の名称に戻す

action
string or null <= 10 characters

アクションに設定する名称(10文字以内・改行不可)。null でシステム標準の名称に戻す

Responses

Request samples

Content type
application/json
{
  • "customer": "string",
  • "deal": "string",
  • "contact": "string",
  • "action": "string"
}

Response samples

Content type
application/json
{
  • "customer": {
    },
  • "deal": {
    },
  • "contact": {
    },
  • "action": {
    }
}

監査ログ(Audits)

監査ログ取得

監査ログの一覧をv1同様のページ方式で取得します。

  • 操作日時(time)の昇順で返します
  • 一度に取得できる件数は1000件で、page を指定して続きを取得します
Authorizations:
bearer_auth
query Parameters
page
integer >= 1
Default: 1

ページ番号(1始まり)。未指定時は1ページ目

startTime
string <date-time>

開始日時。例 2025-04-01T00:00:00+09:00。タイムゾーンを省略した場合は日本時間として解釈します。日時として解釈できない値は無視されます

endTime
string <date-time>

終了日時。例 2025-04-30T23:59:59+09:00。タイムゾーンを省略した場合は日本時間として解釈します。日時として解釈できない値は無視されます

Responses

Response samples

Content type
application/json
{
  • "totalCount": 0,
  • "page": 0,
  • "audits": [
    ]
}