POST/contacts
顧客/取引先の連絡先を登録する。
Authorization URL - https://auth.worksmobile.com/oauth2/v2.0/authorize
Token URL - https://auth.worksmobile.com/oauth2/v2.0/token
Refresh URL - https://auth.worksmobile.com/oauth2/v2.0/token
contact
Header | type | Description |
---|---|---|
Authorization | string | Bearer {token} required |
Content-Type | string | application/json required example : application/json |
Property | Type | Description |
---|---|---|
permission | object (permission) | アクセス権限モデル required |
contactName | object (contactName) | 氏名モデル required |
emails | array (ContactEmail) | メールアドレスリスト minItems : 0 maxItems : 100 |
telephones | array (ContactTelephone) | 電話番号リスト minItems : 0 maxItems : 100 |
organizations | array (ContactOrganization) | 会社/所属リスト minItems : 0 maxItems : 100 |
events | array (ContactEvent) | 誕生日/記念日リスト minItems : 0 maxItems : 100 |
locations | array (ContactLocation) | 住所リスト minItems : 0 maxItems : 100 |
messengers | array (ContactMessenger) | SNSリスト minItems : 0 maxItems : 100 |
websites | array (ContactWebsite) | Web サイトリスト minItems : 0 maxItems : 100 |
memo | string | メモ maxLength : 4000 |
contactTagIds | array (string) | 連絡先タグリスト minItems : 0 |
Property | Type | Description |
---|---|---|
accessibleRange | string | アクセス許可範囲
required Allowed values : ALL, MEMBER |
masterUserId | string | 連絡先の管理者ユーザーID。
|
isCoEditing | boolean | 共同編集フラグ
default : true |
accessibleMembers | array (ContactAccessibleMember) | アクセス許可ユーザーリスト
minItems : 0 maxItems : 500 uniqueItems : true |
Property | Type | Description |
---|---|---|
id | string | アクセス許可ユーザーID(ユーザーID、組織ID、グループID) required |
type | string | アクセス許可ユーザータイプ
required Allowed values : USER, ORGUNIT, GROUP |
Property | Type | Description |
---|---|---|
firstName | string | 名 maxLength : 100 nullable : true |
lastName | string | 姓 maxLength : 100 nullable : true |
phoneticFirstName | string | フリガナ 名 maxLength : 100 nullable : true |
phoneticLastName | string | フリガナ 姓 maxLength : 100 nullable : true |
nickName | string | ニックネーム maxLength : 100 nullable : true |
prefix | string | 敬称。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
suffix | string | 呼称。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
middleName | string | ミドルネーム。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表メールアドレスフラグ。
required |
string | メールアドレス required maxLength : 256 |
Property | Type | Description |
---|---|---|
primary | boolean | 代表電話フラグ。
required |
telephone | string | 電話番号 required pattern : [0-9\+\-*#PTpt()\u3000 ]+ |
type | string | 電話番号タイプ
default : CUSTOM Allowed values : CELLPHONE, WORK, HOME, WORK_FAX, HOME_FAX, OTHER, CUSTOM |
customType | string | カスタム電話番号タイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表会社フラグ。
required |
name | string | 会社名 maxLength : 100 |
department | string | 部署名 maxLength : 100 |
title | string | 役職名 maxLength : 100 |
Property | Type | Description |
---|---|---|
primary | boolean | 代表イベントフラグ。
required |
date | string | 日付(YYYY-MM-DD) required |
type | string | イベントタイプ
default : CUSTOM Allowed values : BIRTHDAY, ANNIVERSARY, OTHER, CUSTOM |
customType | string | カスタムイベントタイプ
maxLength : 100 nullable : true |
dayType | string | 日付形式
default : SOLAR Allowed values : SOLAR, LUNAR |
Property | Type | Description |
---|---|---|
primary | boolean | 代表住所フラグ。
required |
address | string | 住所 required maxLength : 100 |
type | string | 住所タイプ
default : CUSTOM Allowed values : WORK, HOME, OTHER, CUSTOM |
zipCode | string | 郵便番号 maxLength : 100 |
customType | string | カスタム住所タイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表SNSフラグ。
required |
id | string | SNS ID required maxLength : 100 |
type | string | SNSタイプ
default : CUSTOM Allowed values : FACEBOOK, LINE, TWITTER, CUSTOM |
customType | string | カスタムSNSタイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表Webサイトフラグ。
required |
url | string | WebサイトURL required maxLength : 100 |
example
1{
2 "contactTagIds": [
3 "ctag2a81-94b6-4642-6903-03aa7977da91",
4 "3512644d-a731-4602-6912-031febc8bce2"
5 ],
6 "permission": {
7 "masterUserId": "userf7da-f82c-4284-13e7-030f3b4c756x",
8 "isCoEditing": true,
9 "accessibleRange": "ALL"
10 },
11 "createdTime": "2021-08-10T11:05:41+09:00",
12 "modifiedTime": "2021-08-10T11:09:37+09:00",
13 "contactName": {
14 "lastName": "ワークス",
15 "firstName": "太郎",
16 "nickName": "Works"
17 },
18 "emails": [
19 {
20 "email": "example1@example.com",
21 "primary": true
22 },
23 {
24 "email": "example2@example.com",
25 "primary": false
26 }
27 ],
28 "telephones": [
29 {
30 "type": "CELLPHONE",
31 "telephone": "0000-0001",
32 "primary": true
33 },
34 {
35 "type": "HOME",
36 "telephone": "0000-0002",
37 "primary": false
38 }
39 ],
40 "organizations": [
41 {
42 "name": "exmample company name",
43 "department": "department",
44 "title": "title",
45 "primary": true
46 }
47 ],
48 "locations": [
49 {
50 "address": "example1 address",
51 "zipCode": "00001",
52 "type": "WORK",
53 "primary": true
54 },
55 {
56 "address": "example2 address",
57 "zipCode": "00002",
58 "type": "HOME",
59 "primary": false
60 }
61 ],
62 "events": [
63 {
64 "date": "2021-01-09",
65 "dayType": "SOLAR",
66 "type": "BIRTHDAY",
67 "primary": true
68 },
69 {
70 "date": "2021-08-09",
71 "dayType": "SOLAR",
72 "type": "ANNIVERSARY",
73 "primary": false
74 }
75 ],
76 "messengers": [
77 {
78 "id": "example1",
79 "type": "LINE",
80 "primary": true
81 },
82 {
83 "id": "example2",
84 "type": "CUSTOM",
85 "customType": "Worksmobile",
86 "primary": false
87 }
88 ],
89 "websites": [
90 {
91 "url": "https://example1.com",
92 "primary": true
93 },
94 {
95 "url": "https://example2.com",
96 "primary": false
97 }
98 ],
99 "memo": "memo"
100}
OK
Property | Type | Description |
---|---|---|
contactId | string | 連絡先ID readOnly : true |
permission | object (permission) | アクセス権限モデル required |
contactName | object (contactName) | 氏名モデル required |
linkedExternalUser | object (linkedExternalUser) | 外部ユーザーモデル readOnly : true |
emails | array (ContactEmail) | メールアドレスリスト minItems : 0 maxItems : 100 |
telephones | array (ContactTelephone) | 電話番号リスト minItems : 0 maxItems : 100 |
organizations | array (ContactOrganization) | 会社/所属リスト minItems : 0 maxItems : 100 |
events | array (ContactEvent) | 誕生日/記念日リスト minItems : 0 maxItems : 100 |
locations | array (ContactLocation) | 住所リスト minItems : 0 maxItems : 100 |
messengers | array (ContactMessenger) | SNSリスト minItems : 0 maxItems : 100 |
websites | array (ContactWebsite) | Web サイトリスト minItems : 0 maxItems : 100 |
memo | string | メモ maxLength : 4000 |
contactTagIds | array (string) | 連絡先タグリスト minItems : 0 |
createdTime | string | 登録日時 (YYYY-MM-DDThh:mm:ssTZD) readOnly : true |
modifiedTime | string | 更新日時 (YYYY-MM-DDThh:mm:ssTZD) readOnly : true |
Property | Type | Description |
---|---|---|
accessibleRange | string | アクセス許可範囲
required Allowed values : ALL, MEMBER |
masterUserId | string | 連絡先の管理者ユーザーID。
|
isCoEditing | boolean | 共同編集フラグ
default : true |
accessibleMembers | array (ContactAccessibleMember) | アクセス許可ユーザーリスト
minItems : 0 maxItems : 500 uniqueItems : true |
Property | Type | Description |
---|---|---|
id | string | アクセス許可ユーザーID(ユーザーID、組織ID、グループID) required |
type | string | アクセス許可ユーザータイプ
required Allowed values : USER, ORGUNIT, GROUP |
Property | Type | Description |
---|---|---|
firstName | string | 名 maxLength : 100 nullable : true |
lastName | string | 姓 maxLength : 100 nullable : true |
phoneticFirstName | string | フリガナ 名 maxLength : 100 nullable : true |
phoneticLastName | string | フリガナ 姓 maxLength : 100 nullable : true |
nickName | string | ニックネーム maxLength : 100 nullable : true |
prefix | string | 敬称。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
suffix | string | 呼称。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
middleName | string | ミドルネーム。「連絡先の取得」のみ表示される。 maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
id | string | 外部ユーザーID |
type | string | 外部ユーザータイプ
Allowed values : LINE, WORKS readOnly : true |
buddyUserIds | array (string) | 外部ユーザーを連絡先に追加したユーザーIDリスト |
Property | Type | Description |
---|---|---|
primary | boolean | 代表メールアドレスフラグ。
required |
string | メールアドレス required maxLength : 256 |
Property | Type | Description |
---|---|---|
primary | boolean | 代表電話フラグ。
required |
telephone | string | 電話番号 required pattern : [0-9\+\-*#PTpt()\u3000 ]+ |
type | string | 電話番号タイプ
default : CUSTOM Allowed values : CELLPHONE, WORK, HOME, WORK_FAX, HOME_FAX, OTHER, CUSTOM |
customType | string | カスタム電話番号タイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表会社フラグ。
required |
name | string | 会社名 maxLength : 100 |
department | string | 部署名 maxLength : 100 |
title | string | 役職名 maxLength : 100 |
Property | Type | Description |
---|---|---|
primary | boolean | 代表イベントフラグ。
required |
date | string | 日付(YYYY-MM-DD) required |
type | string | イベントタイプ
default : CUSTOM Allowed values : BIRTHDAY, ANNIVERSARY, OTHER, CUSTOM |
customType | string | カスタムイベントタイプ
maxLength : 100 nullable : true |
dayType | string | 日付形式
default : SOLAR Allowed values : SOLAR, LUNAR |
Property | Type | Description |
---|---|---|
primary | boolean | 代表住所フラグ。
required |
address | string | 住所 required maxLength : 100 |
type | string | 住所タイプ
default : CUSTOM Allowed values : WORK, HOME, OTHER, CUSTOM |
zipCode | string | 郵便番号 maxLength : 100 |
customType | string | カスタム住所タイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表SNSフラグ。
required |
id | string | SNS ID required maxLength : 100 |
type | string | SNSタイプ
default : CUSTOM Allowed values : FACEBOOK, LINE, TWITTER, CUSTOM |
customType | string | カスタムSNSタイプ
maxLength : 100 nullable : true |
Property | Type | Description |
---|---|---|
primary | boolean | 代表Webサイトフラグ。
required |
url | string | WebサイトURL required maxLength : 100 |
example
1{
2 "contactId": "contact2-a56d-44a4-5304-033e16fca8d1",
3 "contactTagIds": [
4 "ctag2a81-94b6-4642-6903-03aa7977da91",
5 "3512644d-a731-4602-6912-031febc8bce2"
6 ],
7 "permission": {
8 "masterUserId": "userf7da-f82c-4284-13e7-030f3b4c756x",
9 "isCoEditing": true,
10 "accessibleRange": "ALL",
11 "accessibleMembers": []
12 },
13 "createdTime": "2021-08-10T11:05:41+09:00",
14 "modifiedTime": "2021-08-10T11:09:37+09:00",
15 "contactName": {
16 "lastName": "ワークス",
17 "firstName": "太郎",
18 "nickName": "Works",
19 "phoneticFirstName": null,
20 "phoneticLastName": null,
21 "prefix": null,
22 "suffix": null,
23 "middleName": null
24 },
25 "linkedExternalUser": {
26 "id": "works75b-5b29-4048-4bf5-0336e504a395",
27 "type": "WORKS",
28 "buddyUserIds": [
29 "userf7da-f82c-4284-13e7-030f3b4c756x"
30 ]
31 },
32 "emails": [
33 {
34 "email": "example1@example.com",
35 "primary": true
36 },
37 {
38 "email": "example2@example.com",
39 "primary": false
40 }
41 ],
42 "telephones": [
43 {
44 "type": "CELLPHONE",
45 "telephone": "0000-0001",
46 "primary": true,
47 "customType": null
48 },
49 {
50 "type": "HOME",
51 "telephone": "0000-0002",
52 "primary": false,
53 "customType": null
54 }
55 ],
56 "organizations": [
57 {
58 "name": "exmample company name",
59 "department": "department",
60 "title": "title",
61 "primary": true
62 }
63 ],
64 "locations": [
65 {
66 "address": "example1 address",
67 "zipCode": "00001",
68 "type": "WORK",
69 "primary": true,
70 "customType": null
71 },
72 {
73 "address": "example2 address",
74 "zipCode": "00002",
75 "type": "HOME",
76 "primary": false,
77 "customType": null
78 }
79 ],
80 "events": [
81 {
82 "date": "2021-01-09",
83 "dayType": "SOLAR",
84 "type": "BIRTHDAY",
85 "primary": true,
86 "customType": null
87 },
88 {
89 "date": "2021-08-09",
90 "dayType": "SOLAR",
91 "type": "ANNIVERSARY",
92 "primary": false,
93 "customType": null
94 }
95 ],
96 "messengers": [
97 {
98 "id": "example1",
99 "type": "LINE",
100 "primary": true,
101 "customType": null
102 },
103 {
104 "id": "example2",
105 "type": "CUSTOM",
106 "customType": "Worksmobile",
107 "primary": false
108 }
109 ],
110 "websites": [
111 {
112 "url": "https://example1.com",
113 "primary": true
114 },
115 {
116 "url": "https://example2.com",
117 "primary": false
118 }
119 ],
120 "memo": "memo"
121}
Bad Request
Forbidden