summaryrefslogtreecommitdiff
path: root/data/zh_cn/btripopen/2022-05-17/api-docs.php
blob: 9fc256c729216254f3b2ef9960c03b782e48a8b9 (plain)
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
<?php return [
    'version' => '1.0',
    'info' => ['style' => 'ROA', 'product' => 'btripOpen', 'version' => '2022-05-17'],
    'directories' => [
        [
            'id' => 167494,
            'title' => '测试hlf',
            'type' => 'directory',
            'children' => ['ScanMsgList'],
        ],
        [
            'id' => 167496,
            'title' => '其他',
            'type' => 'directory',
            'children' => ['TakeAccessToken'],
        ],
    ],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'ScanMsgList' => [
            'summary' => '商旅消息——消息扫描。',
            'path' => '/ScanMsgList',
            'methods' => ['post'],
            'schemes' => ['https'],
            'security' => [
                [
                    'btripOpen' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [],
            'parameters' => [
                [
                    'name' => 'ChannelType',
                    'in' => 'formData',
                    'schema' => ['title' => '消息渠道Type', 'description' => '消息渠道Type', 'type' => 'string', 'required' => false, 'example' => 'hdm_alarm_sms,dingtalk'],
                ],
                [
                    'name' => 'SequenceId',
                    'in' => 'formData',
                    'schema' => ['title' => '商旅消息Id', 'description' => '商旅消息Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1130107041'],
                ],
                [
                    'name' => 'Biz',
                    'in' => 'formData',
                    'schema' => ['title' => '业务类型', 'description' => '业务类型', 'type' => 'string', 'required' => false, 'example' => 'Verify_RPBio'],
                ],
                [
                    'name' => 'ScanSequence',
                    'in' => 'formData',
                    'schema' => ['title' => '扫描顺序', 'description' => '扫描顺序', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1122221'],
                ],
                [
                    'name' => 'Size',
                    'in' => 'formData',
                    'schema' => ['title' => '查询数量', 'description' => '查询数量', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'],
                ],
                [
                    'name' => 'CorpId',
                    'in' => 'formData',
                    'schema' => ['title' => '企业ID', 'description' => '企业ID', 'type' => 'string', 'required' => false, 'example' => '3562012953454577801'],
                ],
                [
                    'name' => 'UserId',
                    'in' => 'formData',
                    'schema' => ['title' => '用户ID', 'description' => '用户ID', 'type' => 'string', 'required' => false, 'example' => 'qqqqqqq'],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'BtripResult<List<BtripMsgDTO>>',
                        'description' => 'BtripResult<List<BtripMsgDTO>>',
                        'type' => 'object',
                        'properties' => [
                            'Success' => ['title' => '成功标识', 'description' => '成功标识', 'type' => 'boolean', 'example' => 'True'],
                            'Code' => ['title' => '错误代码', 'description' => '错误代码', 'type' => 'integer', 'format' => 'int32', 'example' => 'OK'],
                            'Msg' => ['title' => '出错消息', 'description' => '出错消息', 'type' => 'string', 'example' => 'success'],
                            'ExtMsg' => ['title' => '结果扩展信息', 'description' => '结果扩展信息', 'type' => 'string', 'example' => 'dddd'],
                            'Module' => [
                                'title' => '返回对象',
                                'description' => '返回对象',
                                'type' => 'array',
                                'items' => [
                                    'description' => 'module',
                                    'type' => 'object',
                                    'properties' => [
                                        'SequenceId' => ['title' => '商旅消息ID', 'description' => '商旅消息ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1135434288'],
                                        'Biz' => ['title' => '业务类型', 'description' => '业务类型', 'type' => 'string', 'example' => 'CREATE'],
                                        'Content' => ['title' => '消息内容', 'description' => '消息内容', 'type' => 'string', 'example' => 'True'],
                                        'SendTime' => ['title' => '发送时间', 'description' => '发送时间', 'type' => 'string', 'example' => '{\\"type\\":\\"week\\",\\"day\\":\\"5\\",\\"date\\":\\"1\\",\\"hour\\":\\"18\\",\\"month\\":\\"1\\"}'],
                                        'HaveRedDot' => ['title' => '是否有红点', 'description' => '是否有红点', 'type' => 'boolean', 'example' => 'True'],
                                        'UnReadCount' => ['title' => '未读数量', 'description' => '未读数量', 'type' => 'integer', 'format' => 'int32', 'example' => '111'],
                                        'ShowMsg' => ['title' => '灰度:是否展示消息', 'description' => '灰度:是否展示消息', 'type' => 'boolean', 'example' => 'True'],
                                    ],
                                ],
                            ],
                            'RequestId' => ['description' => '阿里云为该请求生成的唯一标识符。', 'type' => 'string', 'example' => 'A3F8DCAB-8301-5770-BD9F-71B0BF9E1A6E'],
                        ],
                    ],
                ],
                400 => [],
                500 => [],
            ],
            'errorCodes' => [
                400 => [
                    ['errorCode' => '1001', 'errorMessage' => '测试错误码'],
                ],
                500 => [
                    ['errorCode' => '500', 'errorMessage' => '500'],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"Success\\": true,\\n  \\"Code\\": 0,\\n  \\"Msg\\": \\"success\\",\\n  \\"ExtMsg\\": \\"dddd\\",\\n  \\"Module\\": [\\n    {\\n      \\"SequenceId\\": 1135434288,\\n      \\"Biz\\": \\"CREATE\\",\\n      \\"Content\\": \\"True\\",\\n      \\"SendTime\\": \\"{\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"week\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"day\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"5\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"date\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"hour\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"18\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"month\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\"}\\",\\n      \\"HaveRedDot\\": true,\\n      \\"UnReadCount\\": 111,\\n      \\"ShowMsg\\": true\\n    }\\n  ],\\n  \\"RequestId\\": \\"A3F8DCAB-8301-5770-BD9F-71B0BF9E1A6E\\"\\n}","type":"json"}]',
            'title' => '消息扫描',
            'description' => '>消息扫描',
            'requestParamsDescription' => 'GET /v1.0/oauth2/apps/authInfo?authCorpId=dingxxx HTTP/1.1'."\n"
                ."\n"
                .'Host:api.dingtalk.com'."\n"
                ."\n"
                .'x-acs-dingtalk-access-token:BExxx'."\n"
                ."\n"
                .'Content-Type:application/json',
            'responseParamsDescription' => '```json'."\n"
                .'{'."\n"
                .'  "authAppInfo" : {'."\n"
                .'    "agentList" : [ {'."\n"
                .'      "agentId" : 888,'."\n"
                .'      "agentName" : "小程序DEMO",'."\n"
                .'      "appId" : 111,'."\n"
                .'      "adminList" : [ "manager975" ]'."\n"
                .'    } ]'."\n"
                .'  },'."\n"
                .'  "authCorpInfo" : {'."\n"
                .'    "inviteCode" : "111",'."\n"
                .'    "industry" : "201",'."\n"
                .'    "corpName" : "小程序体验HTTP",'."\n"
                .'    "licenseCode" : "111",'."\n"
                .'    "authChannel" : "123",'."\n"
                .'    "authChannelType" : "1",'."\n"
                .'    "authLevel" : 1,'."\n"
                .'    "inviteUrl" : "https://wx.dingtalk.com/invite-page/xxx",'."\n"
                .'    "corpLogoUrl" : "https://static-legacy.dingtalk.com/xxx"'."\n"
                .'  },'."\n"
                .'  "authUserInfo" : {'."\n"
                .'    "userId" : "manager975"'."\n"
                .'  }'."\n"
                .'}'."\n"
                .'```',
        ],
        'TakeAccessToken' => [
            'summary' => 'dddd。',
            'path' => '/btrip/open/access-token/take/{app_key}',
            'methods' => ['get'],
            'schemes' => ['https'],
            'security' => [
                [
                    'Anonymous' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [],
            'parameters' => [
                [
                    'name' => 'app_key',
                    'in' => 'path',
                    'schema' => ['type' => 'string', 'required' => false],
                ],
                [
                    'name' => 'app_secret',
                    'in' => 'query',
                    'schema' => ['description' => '密钥', 'type' => 'string', 'required' => false, 'example' => 'affsgdfgsgsddg'],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'title' => 'Schema of Response',
                        'description' => 'Schema of Response',
                        'type' => 'object',
                        'properties' => [
                            'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '456456575656757'],
                            'code' => ['description' => '错误码'."\n", 'type' => 'string', 'example' => 'System.Error'],
                            'message' => ['description' => '错误信息', 'type' => 'string', 'example' => '系统错误'],
                            'success' => ['description' => '是否成功', 'type' => 'string', 'example' => 'true'],
                            'data' => [
                                'description' => '数据',
                                'type' => 'object',
                                'properties' => [
                                    'access_token' => ['description' => 'token', 'type' => 'string', 'example' => '32sfjge'],
                                    'expire' => ['description' => '过期时间', 'type' => 'integer', 'format' => 'int64', 'example' => '70000'],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'errorCodes' => [
                500 => [
                    ['errorCode' => 'AccessToken.Application.Missing', 'errorMessage' => '找不到对应的应用'],
                    ['errorCode' => 'AccessToken.AppSecret.Mismatching', 'errorMessage' => 'appSecret不正确'],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"requestId\\": \\"456456575656757\\",\\n  \\"code\\": \\"System.Error\\",\\n  \\"message\\": \\"系统错误\\",\\n  \\"success\\": \\"true\\",\\n  \\"data\\": {\\n    \\"access_token\\": \\"32sfjge\\",\\n    \\"expire\\": 70000\\n  }\\n}","type":"json"}]',
            'title' => '获取accessToken',
            'description' => "\n"
                .'> 要调用此API,需要以下权限之一。'."\n"
                .'> - 调用ISV专有API时需要具备的权限'."\n"
                ."\n",
            'requestParamsDescription' => 'GET /v1.0/oauth2/apps/authInfo?authCorpId=String HTTP/1.1'."\n"
                .'Host:api.dingtalk.com'."\n"
                .'x-acs-dingtalk-access-token:String'."\n"
                .'Content-Type:application/json',
            'responseParamsDescription' => 'HTTP/1.1 200 OK'."\n"
                .'Content-Type:application/json'."\n"
                ."\n"
                .'{'."\n"
                .'  "authAppInfo" : {'."\n"
                .'    "agentList" : [ {'."\n"
                .'      "agentId" : 888,'."\n"
                .'      "agentName" : "小程序DEMO",'."\n"
                .'      "appId" : 111,'."\n"
                .'      "adminList" : [ "manager975" ]'."\n"
                .'    } ]'."\n"
                .'  },'."\n"
                .'  "authCorpInfo" : {'."\n"
                .'    "inviteCode" : "111",'."\n"
                .'    "industry" : "201",'."\n"
                .'    "corpName" : "小程序体验HTTP",'."\n"
                .'    "licenseCode" : "111",'."\n"
                .'    "authChannel" : "123",'."\n"
                .'    "authChannelType" : "1",'."\n"
                .'    "authLevel" : 1,'."\n"
                .'    "inviteUrl" : "https://wx.dingtalk.com/invite-page/xxx",'."\n"
                .'    "corpLogoUrl" : "https://static-legacy.dingtalk.com/xxx"'."\n"
                .'  },'."\n"
                .'  "authUserInfo" : {'."\n"
                .'    "userId" : "manager975"'."\n"
                .'  }'."\n"
                .'}',
        ],
    ],
    'endpoints' => [],
];