-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwework.yaml
More file actions
6354 lines (6297 loc) · 162 KB
/
wework.yaml
File metadata and controls
6354 lines (6297 loc) · 162 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: "2.0"
info:
description: "企业微信服务端API."
version: 1.0.0
title: 企业微信服务端API
license:
name: Apache-2.0
url: "https://www.apache.org/licenses/LICENSE-2.0.html"
host: qyapi.weixin.qq.com
basePath: /cgi-bin
schemes:
- https
paths:
/gettoken:
get:
tags:
- auth
summary: 每个应用有独立的secret,获取到的access_token只能本应用使用,所以每个应用的access_token应该分开来获取
description: ""
operationId: auth_getToken
produces:
- application/json
parameters:
- in: query
name: corpid
description: 企业ID
required: true
type: string
- in: query
name: corpsecret
description: 应用的凭证密钥
required: true
type: string
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/TokenRsp"
/get_api_domain_ip:
get:
tags:
- auth
summary: 获取企业微信API域名IP段
description: ""
operationId: auth_getApiDomainIp
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetApiDomainIpRsp"
/user/create:
post:
tags:
- users
summary: 创建成员
description: 创建成员
operationId: users_create
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
- in: body
name: body
required: true
schema:
$ref: "#/definitions/CreateUserReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/user/get:
get:
tags:
- users
summary: 读取成员
description: 读取成员
operationId: users_get
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
- in: query
name: userid
required: true
type: string
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetUserRsp"
/user/update:
post:
tags:
- users
summary: 更新成员
description: 更新成员
operationId: users_update
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
required: true
schema:
$ref: "#/definitions/UpdateUserReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/user/delete:
get:
tags:
- users
summary: 删除成员
description: 删除成员
operationId: users_delete
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
- in: query
name: userid
required: true
type: string
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/user/batchdelete:
post:
tags:
- users
summary: 批量删除成员
description: 批量删除成员
operationId: users_deleteBatch
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
required: true
schema:
$ref: "#/definitions/BatchDeleteUserReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/user/simplelist:
get:
tags:
- users
summary: 获取部门成员
description: 获取部门成员
operationId: users_getDepartmentSimplelist
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: department_id
required: true
type: integer
format: int32
- in: query
name: fetch_child
required: false
type: integer
format: int32
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/SimplelistRsp"
/user/list:
get:
tags:
- users
summary: 获取部门成员详情
description: 获取部门成员详情
operationId: users_getDepartmentUserDetail
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
description: 调用接口凭证
- in: query
name: department_id
required: true
type: integer
format: int32
description: 获取的部门id
- in: query
name: fetch_child
required: false
type: integer
format: int32
description: 1/0:是否递归获取子部门下面的成员
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/ListUserRsp"
/user/convert_to_openid:
post:
tags:
- users
summary: userid与openid互换
description: userid转openid
operationId: users_convertUseridToOpenid
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/ConvertToOpenidReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/ConvertToOpenidRsp"
/user/authsucc:
get:
tags:
- users
summary: 二次验证
operationId: users_authsucc
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: userid
required: true
type: string
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/batch/invite:
post:
tags:
- users
summary: 邀请成员
operationId: users_invite
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/InviteReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/InviteRsp"
/corp/get_join_qrcode:
get:
tags:
- corps
summary: 获取加入企业二维码
operationId: corps_getJoinQrcode
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: size_type
type: string
required: false
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetJoinQrcodeRsp"
/user/get_active_stat:
post:
tags:
- users
summary: 获取企业活跃成员数
operationId: users_getActiveStat
produces:
- application/json
consumes:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: date
type: string
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetActiveStatRsp"
/message/send:
post:
tags:
- messages
summary: 发送消息
description: 应用支持推送文本、图片、视频、文件、图文等类型
operationId: message_send
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
- in: body
name: body
required: true
schema:
$ref: "#/definitions/SendMessageReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/SendMessageRsp"
/message/update_taskcard:
post:
tags:
- messages
produces:
- application/json
consumes:
- application/json
operationId: message_updateTaskcard
summary: 更新任务卡片消息状态
description: 应用可以发送任务卡片消息,发送之后可再通过接口更新用户任务卡片消息的替换文案信息。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/UpdateTaskcardReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/UpdateTaskcardRsp"
/tag/create:
post:
tags:
- tags
summary: 创建内部标签
description: 创建企业内部标签
operationId: tags_create
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
required: true
type: string
- in: body
name: body
required: true
schema:
$ref: "#/definitions/CreateTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/CreateTagRsp"
/tag/update:
post:
tags:
- tags
summary: 更新内部标签名字
description: 更新内部标签名字
operationId: tags_update
produces:
- application/json
consumes:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/UpdateTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/tag/delete:
get:
tags:
- tags
summary: 删除标签
description: 删除企业内部标签
produces:
- application/json
operationId: tags_delete
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: tagid
type: integer
format: int32
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/tag/addtagusers:
post:
tags:
- tags
summary: 增加标签成员
description: 增加标签成员
produces:
- application/json
consumes:
- application/json
operationId: tags_addUsers
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/AddTagUsersReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/tag/deltagusers:
post:
tags:
- tags
summary: 删除标签成员
description: 删除标签成员
operationId: tags_deleteUsers
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/DeleteTagUsersReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/tag/get:
get:
tags:
- tags
summary: 获取标签成员
description: 获取标签成员
operationId: tags_getUsers
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: tagid
type: string
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetTagUsersRsp"
/tag/list:
get:
tags:
- tags
produces:
- application/json
summary: 获取标签列表
description: 获取标签列表
operationId: tags_getList
parameters:
- in: query
name: access_token
type: string
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetTagListRsp"
/externalcontact/get_follow_user_list:
get:
tags:
- externalcontacts
produces:
- application/json
operationId: externalcontacts_getFollowUserList
summary: 获取配置了客户联系功能的成员列表
description: 企业和第三方服务商可通过此接口获取配置了客户联系功能的成员列表。
parameters:
- in: query
name: access_token
type: string
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetFollowUserListRsp"
/externalcontact/add_contact_way:
post:
tags:
- externalcontacts
summary: 配置客户联系「联系我」方式
description: 企业可以在管理后台-客户联系-加客户中配置成员的「联系我」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可获取成员联系方式,主动联系到成员。企业可通过此接口为具有客户联系功能的成员生成专属的「联系我」二维码或者「联系我」按钮。
operationId: externalcontacts_addContactWay
consumes:
- application/json
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/AddContactWayReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/AddContactWayRsp"
/externalcontact/get_contact_way:
post:
tags:
- externalcontacts
summary: 获取企业已配置的「联系我」方式
description: 获取企业配置的「联系我」二维码和「联系我」小程序按钮。
operationId: externalcontacts_getContactWay
produces:
- application/json
consumes:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/GetContactWayReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetContactWayRsp"
/externalcontact/update_contact_way:
post:
tags:
- externalcontacts
summary: 更新企业已配置的「联系我」方式
description: 更新企业配置的「联系我」二维码和「联系我」小程序按钮中的信息,如使用人员和备注等。
produces:
- application/json
consumes:
- application/json
operationId: externalcontacts_updateContactWay
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/UpdateContactWayReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/del_contact_way:
post:
tags:
- externalcontacts
summary: 删除企业已配置的「联系我」方式
description: 删除一个已配置的「联系我」二维码或者「联系我」小程序按钮。
produces:
- application/json
consumes:
- application/json
operationId: externalcontacts_delContactWay
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/DelContactWayReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/close_temp_chat:
post:
tags:
- externalcontacts
summary: 结束临时会话
description: 将指定的企业成员和客户之前的临时会话断开,断开前会自动下发已配置的结束语。
produces:
- application/json
consumes:
- application/json
operationId: externalcontacts_closeTempChat
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: true
schema:
$ref: "#/definitions/CloseTempChatReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/list:
get:
tags:
- externalcontacts
summary: 获取客户列表
description: 企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。没有配置客户联系功能的成员,所添加的外部联系人将不会作为客户返回。
operationId: externalcontacts_getList
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: userid
type: string
required: true
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetExternalContactListRsp"
/externalcontact/get:
get:
tags:
- externalcontacts
operationId: externalcontacts_getDetail
summary: 获取客户详情
description: 企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。
produces:
- application/json
parameters:
- in: query
name: access_token
type: string
required: true
- in: query
name: external_userid
type: string
required: true
- in: query
name: cursor
type: string
required: false
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetExternalContactDetailRsp"
/externalcontact/batch/get_by_user:
post:
tags:
- externalcontacts
operationId: externalcontacts_getBatchUser
consumes:
- application/json
produces:
- application/json
summary: 批量获取客户详情
description: 企业/第三方可通过此接口获取指定成员添加的客户信息列表。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/GetExternalContactBatchUserReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetExternalContactBatchUserRsp"
/externalcontact/remark:
post:
tags:
- externalcontacts
operationId: externalcontacts_remark
consumes:
- application/json
produces:
- application/json
summary: 修改客户备注信息
description: 企业可通过此接口修改指定用户添加的客户的备注信息。
parameters:
- in: query
name: access_token
required: true
type: string
- in: body
name: body
required: true
schema:
$ref: "#/definitions/UpdateExternalContactRemarkReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/get_corp_tag_list:
post:
tags:
- externalcontacts
operationId: externalcontacts_getTagList
consumes:
- application/json
produces:
- application/json
summary: 获取企业标签库
description: 企业可通过此接口获取企业客户标签详情。
parameters:
- in: query
name: access_token
required: true
type: string
- in: body
name: body
required: false
schema:
$ref: "#/definitions/GetCorpTagListReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/GetCorpTagListRsp"
/externalcontact/add_corp_tag:
post:
tags:
- externalcontacts
consumes:
- application/json
produces:
- application/json
summary: 添加企业客户标签
description: 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。
operationId: externalcontacts_addTag
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
required: false
schema:
$ref: "#/definitions/AddCorpTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/AddCorpTagRsp"
/externalcontact/edit_corp_tag:
post:
tags:
- externalcontacts
operationId: externalcontacts_editTag
consumes:
- application/json
produces:
- application/json
summary: 编辑企业客户标签
description: 企业可通过此接口编辑客户标签/标签组的名称或次序值。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/EditCorpTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/del_corp_tag:
post:
tags:
- externalcontacts
produces:
- application/json
consumes:
- application/json
operationId: externalcontacts_delTag
summary: 删除企业客户标签
description: 企业可通过此接口删除客户标签库中的标签,或删除整个标签组。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/DelCorpTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/mark_tag:
post:
tags:
- externalcontacts
consumes:
- application/json
produces:
- application/json
summary: 编辑客户企业标签
description: 企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。
operationId: externalcontacts_markTag
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/MarkCorpContactTagReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/BaseResponse"
/externalcontact/transfer_customer:
post:
tags:
- externalcontacts
consumes:
- application/json
produces:
- application/json
operationId: externalcontacts_transferCustomer
summary: 分配在职成员的客户
description: 企业可通过此接口,转接在职成员的客户给其他成员。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/TransferCustomerReq"
responses:
"200":
description: successful operation
schema:
$ref: "#/definitions/TransferCustomerRsp"
/externalcontact/transfer_result:
post:
tags:
- externalcontacts
produces:
- application/json
consumes:
- application/json
operationId: externalcontacts_transferResult
summary: 查询客户接替状态
description: 企业和第三方可通过此接口查询在职成员的客户转接情况。
parameters:
- in: query
name: access_token
type: string
required: true
- in: body
name: body
schema:
$ref: "#/definitions/GetTransferResultReq"
responses: