开发者文档 开发者文档
帮助中心 (opens new window)
帮助中心 (opens new window)
  • 工单中心

    • 工单 API
      • Android SDK
      • iOS SDK
    • 质检 API
    • 管理协助类产品 API
    • 工单中心
    智齿科技
    2022-05-19
    目录

    工单 API

    # 工单 API

    # 接口声明

    在调用接口时必须在 https 请求的 header 中携带 "token" 参数。

    Token 是智齿客服接口开放平台全局唯一的接口调用凭据。 开发者在调用各业务接口时都需使用 Token,开发者需要进行妥善保存。 Token 的存储至少要保留 32 个字符空间。Token 的有效期目前为 24 个小时,需定时刷新,或根据接口返回的 Token 失效提示,进行重新获取。请求 Token 接口,无论 Token 是否存在,都会返回新的 Token,并重置 Token 的过期时间(目前 24 小时)。

    Token 使用方式说明:
    1、开发者需要统一获取和管理 Token,在调用智齿客服各个业务开放接口时都应该使用同一个的 Token,不应该每个业务都刷新获取新的 Token,否则容易导致 Token 失效,影响接口的正常调用;
    2、目前 Token 的有效期通过返回的 expire_in 来传达,目前是 86,400 秒之内的值。开发者需要根据这个有效时间提前去刷新新 Token。
    3、开发者需要根据接口返回的 Token 失效提示,进行重新获取 Token。

    # 接口调用
    # ● 获取访问 Token 编码

    接口说明:

    获取 API 开放接口 Token,此 Token 仅适用于智齿开放平台 5.0 版本全部 API 接口 。API 接口中的参数 appid 、 app_key 请联系智齿售后人员获取。

    请求方式:

    GET

    请求地址:

     https://www.sobot.com/api/get_token
    
    1

    请求参数:

    参数 类型 必填 描述
    appid String 是 第三方用户接口调用唯一凭证id
    create_time String 是 时间戳(秒),例如:2019-09-25 15:49:33 的时间戳1569397773
    sign String 是 签名md5(appid+create_time+app_key) sign签名,app_key为密钥

    请求示例:

    curl https://www.sobot.com/api/get_token?appid=1&create_time=1569397773&sign=258eec3118705112b2c53dc8043d4d34
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    token String 是 token编码
    expires_in String 是 凭证有效时间单位:秒

    时间戳转换参考工具:

    http://tool.chinaz.com/Tools/unixtime.aspx

    sign签名生成示例:

    例如,appid = "1"; create_time="1569397773"; app_key="2"

    sign = Md5("115693977732") 为 258eec3118705112b2c53dc8043d4d34。

    返回示例:

    {
      "item": {
        "token": "4ac37cb2e9c740dba4b75a34d5358802",
        "expires_in": "86400"
      },
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    # ● 查询时区

    接口说明: 接口返回时区信息。

    请求方式: GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/get_timezone
    
    1

    请求参数:

    参数 类型 必填 描述
    无

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回的数据

    item对象:

    参数 类型 必填 描述
    offset int 是 时区偏移
    sortNo int 是 排序
    timezone String 是 时差
    timezoneId String 是 时区Id
    timezoneValue String 是 时区名称

    请求示例:

     curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/get_timezone 
    
    1

    返回示例:

    {
    "item": [
     {
       "offset": -11.0,
       "sortNo": 1,
       "timezone": "-12:00",
       "timezoneId": "Etc/GMT+11",
       "timezoneValue": "GMT-11:00 国际日期线西"
     },
     {
       "offset": -11.0,
       "sortNo": 2,
       "timezone": "-11:00",
       "timezoneId": "Pacific/Midway",
       "timezoneValue": "GMT-11:00 中途岛"
     },
     {
       "offset": -11.0,
       "sortNo": 2,
       "timezone": "-11:00",
       "timezoneId": "US/Samoa",
       "timezoneValue": "GMT-11:00 美属萨摩亚"
     },
     {
       "offset": -10.0,
       "sortNo": 3,
       "timezone": "-10:00",
       "timezoneId": "US/Hawaii",
       "timezoneValue": "GMT-10:00 夏威夷"
     },
     {
       "offset": -8.0,
       "sortNo": 4,
       "timezone": "-09:00",
       "timezoneId": "US/Alaska",
       "timezoneValue": "GMT-08:00 阿拉斯加"
     },
     {
       "offset": -7.0,
       "sortNo": 5,
       "timezone": "-08:00",
       "timezoneId": "America/Los_Angeles",
       "timezoneValue": "GMT-07:00 太平洋时间(美国和加拿大)"
     },
     {
       "offset": -7.0,
       "sortNo": 6,
       "timezone": "-07:00",
       "timezoneId": "America/Phoenix",
       "timezoneValue": "GMT-07:00 亚利桑那"
     },
     {
       "offset": -7.0,
       "sortNo": 5,
       "timezone": "-08:00",
       "timezoneId": "America/Tijuana",
       "timezoneValue": "GMT-07:00 蒂华纳"
     },
     {
       "offset": -6.0,
       "sortNo": 7,
       "timezone": "-06:00",
       "timezoneId": "America/Guatemala",
       "timezoneValue": "GMT-06:00 中美洲"
     },
     {
       "offset": -5.0,
       "sortNo": 8,
       "timezone": "-05:00",
       "timezoneId": "America/Bogota",
       "timezoneValue": "GMT-05:00 波哥大"
     },
     {
       "offset": -5.0,
       "sortNo": 7,
       "timezone": "-06:00",
       "timezoneId": "America/Mexico_City",
       "timezoneValue": "GMT-05:00 墨西哥城"
     },
     {
       "offset": -5.0,
       "sortNo": 7,
       "timezone": "-06:00",
       "timezoneId": "America/Monterrey",
       "timezoneValue": "GMT-05:00 蒙特雷"
     },
     {
       "offset": -4.0,
       "sortNo": 9,
       "timezone": "-04:00",
       "timezoneId": "America/Caracas",
       "timezoneValue": "GMT-04:00 加拉加斯"
     },
     {
       "offset": -4.0,
       "sortNo": 8,
       "timezone": "-05:00",
       "timezoneId": "America/Indiana/Indianapolis",
       "timezoneValue": "GMT-04:00 印地安那州(东部)"
     },
     {
       "offset": -4.0,
       "sortNo": 9,
       "timezone": "-04:00",
       "timezoneId": "America/La_Paz",
       "timezoneValue": "GMT-04:00 拉巴斯"
     },
     {
       "offset": -4.0,
       "sortNo": 8,
       "timezone": "-05:00",
       "timezoneId": "America/New_York",
       "timezoneValue": "GMT-04:00 东部时间(美国和加拿大)"
     },
     {
       "offset": -4.0,
       "sortNo": 11,
       "timezone": "-03:00",
       "timezoneId": "America/Santiago",
       "timezoneValue": "GMT-04:00 圣地亚哥"
     },
     {
       "offset": -3.0,
       "sortNo": 9,
       "timezone": "-04:00",
       "timezoneId": "America/Halifax",
       "timezoneValue": "GMT-03:00 大西洋时间(加拿大)"
     },
     {
       "offset": -3.0,
       "sortNo": 11,
       "timezone": "-03:00",
       "timezoneId": "America/Sao_Paulo",
       "timezoneValue": "GMT-03:00 巴西利亚"
     },
     {
       "offset": -2.5,
       "sortNo": 10,
       "timezone": "-03:30",
       "timezoneId": "America/St_Johns",
       "timezoneValue": "GMT-02:30 纽芬兰"
     },
     {
       "offset": -1.0,
       "sortNo": 12,
       "timezone": "-02:00",
       "timezoneId": "Etc/GMT+1",
       "timezoneValue": "GMT-01:00 中大西洋"
     },
     {
       "offset": 0.0,
       "sortNo": 13,
       "timezone": "-01:00",
       "timezoneId": "Atlantic/Azores",
       "timezoneValue": "GMT+00:00 亚速尔群岛"
     },
     {
       "offset": 0.0,
       "sortNo": 14,
       "timezone": "+00:00",
       "timezoneId": "Atlantic/Reykjavik",
       "timezoneValue": "GMT+00:00 蒙罗维亚"
     },
     {
       "offset": 1.0,
       "sortNo": 14,
       "timezone": "+00:00",
       "timezoneId": "Europe/Lisbon",
       "timezoneValue": "GMT+01:00 里斯本"
     },
     {
       "offset": 1.0,
       "sortNo": 14,
       "timezone": "+00:00",
       "timezoneId": "Europe/London",
       "timezoneValue": "GMT+01:00 伦敦"
     },
     {
       "offset": 2.0,
       "sortNo": 16,
       "timezone": "+02:00",
       "timezoneId": "Africa/Cairo",
       "timezoneValue": "GMT+02:00 开罗"
     },
     {
       "offset": 2.0,
       "sortNo": 16,
       "timezone": "+02:00",
       "timezoneId": "Africa/Harare",
       "timezoneValue": "GMT+02:00 哈拉雷"
     },
     {
       "offset": 2.0,
       "sortNo": 15,
       "timezone": "+01:00",
       "timezoneId": "Europe/Bratislava",
       "timezoneValue": "GMT+02:00 布拉迪斯拉发"
     },
     {
       "offset": 2.0,
       "sortNo": 15,
       "timezone": "+01:00",
       "timezoneId": "Europe/Brussels",
       "timezoneValue": "GMT+02:00 布鲁塞尔"
     },
     {
       "offset": 3.0,
       "sortNo": 17,
       "timezone": "+03:00",
       "timezoneId": "Asia/Baghdad",
       "timezoneValue": "GMT+03:00 巴格达"
     },
     {
       "offset": 3.0,
       "sortNo": 17,
       "timezone": "+03:00",
       "timezoneId": "Asia/Kuwait",
       "timezoneValue": "GMT+03:00 科威特"
     },
     {
       "offset": 3.0,
       "sortNo": 16,
       "timezone": "+02:00",
       "timezoneId": "Europe/Athens",
       "timezoneValue": "GMT+03:00 雅典"
     },
     {
       "offset": 3.0,
       "sortNo": 16,
       "timezone": "+02:00",
       "timezoneId": "Europe/Bucharest",
       "timezoneValue": "GMT+03:00 布加勒斯特"
     },
     {
       "offset": 3.0,
       "sortNo": 17,
       "timezone": "+03:00",
       "timezoneId": "Europe/Istanbul",
       "timezoneValue": "GMT+03:00 伊斯坦布尔"
     },
     {
       "offset": 3.0,
       "sortNo": 17,
       "timezone": "+03:00",
       "timezoneId": "Europe/Minsk",
       "timezoneValue": "GMT+03:00 明斯克"
     },
     {
       "offset": 4.0,
       "sortNo": 19,
       "timezone": "+04:00",
       "timezoneId": "Asia/Baku",
       "timezoneValue": "GMT+04:00 巴库"
     },
     {
       "offset": 4.0,
       "sortNo": 19,
       "timezone": "+04:00",
       "timezoneId": "Asia/Dubai",
       "timezoneValue": "GMT+04:00 阿布扎比"
     },
     {
       "offset": 4.0,
       "sortNo": 19,
       "timezone": "+04:00",
       "timezoneId": "Asia/Muscat",
       "timezoneValue": "GMT+04:00 马斯喀特"
     },
     {
       "offset": 4.0,
       "sortNo": 19,
       "timezone": "+04:00",
       "timezoneId": "Europe/Samara",
       "timezoneValue": "GMT+04:00 萨马拉"
     },
     {
       "offset": 4.5,
       "sortNo": 20,
       "timezone": "+04:30",
       "timezoneId": "Asia/Kabul",
       "timezoneValue": "GMT+04:30 喀布尔"
     },
     {
       "offset": 4.5,
       "sortNo": 18,
       "timezone": "+03:30",
       "timezoneId": "Asia/Tehran",
       "timezoneValue": "GMT+04:30 德黑兰"
     },
     {
       "offset": 5.0,
       "sortNo": 21,
       "timezone": "+05:00",
       "timezoneId": "Asia/Karachi",
       "timezoneValue": "GMT+05:00 卡拉奇"
     },
     {
       "offset": 5.0,
       "sortNo": 21,
       "timezone": "+05:00",
       "timezoneId": "Asia/Yekaterinburg",
       "timezoneValue": "GMT+05:00 叶卡捷琳堡"
     },
     {
       "offset": 5.5,
       "sortNo": 22,
       "timezone": "+05:30",
       "timezoneId": "Asia/Kolkata",
       "timezoneValue": "GMT+05:30 加尔各答"
     },
     {
       "offset": 5.75,
       "sortNo": 23,
       "timezone": "+05:45",
       "timezoneId": "Asia/Kathmandu",
       "timezoneValue": "GMT+05:45 加德满都"
     },
     {
       "offset": 6.0,
       "sortNo": 24,
       "timezone": "+06:00",
       "timezoneId": "Asia/Almaty",
       "timezoneValue": "GMT+06:00 阿拉木图"
     },
     {
       "offset": 6.5,
       "sortNo": 25,
       "timezone": "+06:30",
       "timezoneId": "Asia/Yangon",
       "timezoneValue": "GMT+06:30 仰光"
     },
     {
       "offset": 7.0,
       "sortNo": 26,
       "timezone": "+07:00",
       "timezoneId": "Asia/Bangkok",
       "timezoneValue": "GMT+07:00 曼谷"
     },
     {
       "offset": 7.0,
       "sortNo": 26,
       "timezone": "+07:00",
       "timezoneId": "Asia/Jakarta",
       "timezoneValue": "GMT+07:00 雅加达"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Hong_Kong",
       "timezoneValue": "GMT+08:00 香港"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Irkutsk",
       "timezoneValue": "GMT+08:00 伊尔库茨克"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Manila",
       "timezoneValue": "GMT+08:00 马尼拉"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Shanghai",
       "timezoneValue": "GMT+08:00 北京"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Singapore",
       "timezoneValue": "GMT+08:00 新加坡"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Taipei",
       "timezoneValue": "GMT+08:00 台北"
     },
     {
       "offset": 8.0,
       "sortNo": 27,
       "timezone": "+08:00",
       "timezoneId": "Asia/Ulaanbaatar",
       "timezoneValue": "GMT+08:00 乌兰巴托"
     },
     {
       "offset": 9.0,
       "sortNo": 28,
       "timezone": "+09:00",
       "timezoneId": "Asia/Seoul",
       "timezoneValue": "GMT+09:00 首尔"
     },
     {
       "offset": 9.0,
       "sortNo": 28,
       "timezone": "+09:00",
       "timezoneId": "Asia/Tokyo",
       "timezoneValue": "GMT+09:00 东京"
     },
     {
       "offset": 9.5,
       "sortNo": 31,
       "timezone": "+10:30",
       "timezoneId": "Australia/Adelaide",
       "timezoneValue": "GMT+09:30 阿德莱德"
     },
     {
       "offset": 9.5,
       "sortNo": 29,
       "timezone": "+09:30",
       "timezoneId": "Australia/Darwin",
       "timezoneValue": "GMT+09:30 达尔文"
     },
     {
       "offset": 10.0,
       "sortNo": 30,
       "timezone": "+10:00",
       "timezoneId": "Australia/Brisbane",
       "timezoneValue": "GMT+10:00 布里斯班"
     },
     {
       "offset": 10.0,
       "sortNo": 32,
       "timezone": "+11:00",
       "timezoneId": "Australia/Hobart",
       "timezoneValue": "GMT+10:00 霍巴特"
     },
     {
       "offset": 10.0,
       "sortNo": 32,
       "timezone": "+11:00",
       "timezoneId": "Australia/Melbourne",
       "timezoneValue": "GMT+10:00 墨尔本"
     },
     {
       "offset": 12.0,
       "sortNo": 33,
       "timezone": "+12:00",
       "timezoneId": "Asia/Kamchatka",
       "timezoneValue": "GMT+12:00 堪察加"
     },
     {
       "offset": 12.0,
       "sortNo": 34,
       "timezone": "+13:00",
       "timezoneId": "Pacific/Auckland",
       "timezoneValue": "GMT+12:00 奥克兰"
     },
     {
       "offset": 12.0,
       "sortNo": 33,
       "timezone": "+12:00",
       "timezoneId": "Pacific/Fiji",
       "timezoneValue": "GMT+12:00 斐济"
     },
     {
       "offset": 13.0,
       "sortNo": 34,
       "timezone": "+13:00",
       "timezoneId": "Pacific/Apia",
       "timezoneValue": "GMT+13:00 萨摩亚"
     },
     {
       "offset": 13.0,
       "sortNo": 34,
       "timezone": "+13:00",
       "timezoneId": "Pacific/Tongatapu",
       "timezoneValue": "GMT+13:00 努库阿洛法"
     }
    ],
    "retCode": "000000",
    "retMsg": "操作成功"
    }
    
    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
    # ● 查询数据字典

    接口说明:

    数据字典包含:工单分类、工单状态、工单优先级、抄送数据其中抄送,工单分类为动态字典项,返回数据会随企业自身配置会发生变化。需要上述数据具体值时,请调用此接口获取。

    请求方式:

    GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/get_data_dict
    
    1

    请求参数:

    参数 类型 必填 描述
    无

    请求示例:

     curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/get_data_dict 
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回的数据

    item对象:

    参数 类型 必填 描述
    ticket_type_list List 是 工单分类信息
    ticket_status_list List 是 工单状态信息
    ticket_level_list List 是 工单优先级信息
    group_list List 是 技能组信息,业务变化频繁
    agent_list List 是 坐席信息,业务变化频繁

    ticket_type_list集合:

    参数 类型 必填 描述
    typeid String 是 分类ID
    companyid String 是 公司ID
    type_name String 是 分类名称
    parentid String 是 父ID,业务变化频繁
    type_level String 是 分类级别,最多五级(1:第一级,2:第二级,3:第三级,4:第四级,5:第五级)
    node_flag String 是 是否叶子节点,0 是, 1 不是
    sub_type_list List 是 子分类信息,内容与ticket_type_list一致

    ticket_status_list集合:

    参数 类型 必填 描述
    dict_value String 是 工单状态CODE
    dict_name String 是 工单状态名称

    ticket_level_list集合:

    参数 类型 必填 描述
    dict_value String 是 工单优先级CODE
    dict_name String 是 工单优先级名称

    group_list集合:

    参数 类型 必填 描述
    groupid String 是 技能组ID
    group_name String 是 技能组名称

    agent_list集合:

    参数 类型 必填 描述
    agentid String 是 坐席ID
    agent_name String 是 坐席名称

    返回示例:

    {
    "item": {
     "ticket_level_list": [
       {
         "dict_name": "低",
         "dict_value": "0"
       },
       {
         "dict_name": "中",
         "dict_value": "1"
       },
       {
         "dict_name": "高",
         "dict_value": "2"
       },
       {
         "dict_name": "紧急",
         "dict_value": "3"
       }
     ],
     "group_list": [
       {
         "group_name": "测试电销组",
         "groupid": "acb290d666814d65834c70073aed65f2_4"
       },
       {
         "group_name": "智齿_123",
         "groupid": "e3b931da9ab24a2abcb6f6ae59ae8c0c"
       }
     ],
     "ticket_status_list": [
       {
         "dict_name": "尚未受理",
         "dict_value": "0"
       },
       {
         "dict_name": "受理中",
         "dict_value": "1"
       },
       {
         "dict_name": "等待回复",
         "dict_value": "2"
       },
       {
         "dict_name": "已解决",
         "dict_value": "3"
       },
       {
         "dict_name": "已关闭",
         "dict_value": "99"
       }
     ],
     "ticket_type_list": [
       {
         "companyid": "acb290d666814d65834c70073aed65f2",
         "node_flag": "0",
         "parentid": "-1",
         "type_level": "1",
         "type_name": "其他",
         "typeid": "9"
       },
       {
         "companyid": "acb290d666814d65834c70073aed65f2",
         "node_flag": "1",
         "parentid": "-1",
         "sub_type_list": [
           {
             "companyid": "acb290d666814d65834c70073aed65f2",
             "node_flag": "0",
             "parentid": "131b5060166d4dbbb4beda95a4ff3d32",
             "type_level": "2",
             "type_name": "系统/应用类问题",
             "typeid": "42a4d00d26304a1fa3c94c552d47cfdf"
           },
           {
             "companyid": "acb290d666814d65834c70073aed65f2",
             "node_flag": "1",
             "parentid": "131b5060166d4dbbb4beda95a4ff3d32",
             "sub_type_list": [
               {
                 "companyid": "acb290d666814d65834c70073aed65f2",
                 "node_flag": "1",
                 "parentid": "5dc2f4d31c894f35a779f6a6d175c803",
                 "sub_type_list": [
                   {
                     "companyid": "acb290d666814d65834c70073aed65f2",
                     "node_flag": "0",
                     "parentid": "d3c3a3efc71f4a949bb7be8af6643626",
                     "type_level": "3",
                     "type_name": "摄像问题",
                     "typeid": "d3c3a3efc71f4a949bb7be8af6643626"
                   }
                 ],
                 "type_level": "2",
                 "type_name": "拍照",
                 "typeid": "5dc2f4d31c894f35a779f6a6d175c803"
               }
             ],
             "type_level": "1",
             "type_name": "故障排查",
             "typeid": "131b5060166d4dbbb4beda95a4ff3d32"
           }
         ]
       }
     ],
     "agent_list": [
       {
         "agent_name": "ming",
         "agentid": "0a37c8156d094311890e48fbc06501c4"
       },
       {
         "agent_name": "智齿测试12",
         "agentid": "efcfda336b5d4caeb4fd71392c54b5c9"
       }
     ]
    },
    "ret_code": "000000",
    "ret_msg": "操作成功"
    }
    
    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
    # ● 查询自定义字段定义信息

    接口说明:

    返回工单自定义字段的基本信息

    请求方式:

    GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/query_ticket_extend_fields
    
    1

    请求参数:

    参数 类型 必填 描述
    无

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_ticket_extend_fields`  
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合

    items集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_name String 是 自定义字段名称
    field_type String 是 自定义字段类型,1单行文本,2多行文本,3日期,4时间,5 数值,6下拉列表,7复选框,8单选框,9级联字段 11 地区 12 日期+时间
    fill_flag String 是 自定义字段是否必填,0 否 1 是
    field_data_list List 否 选择型字段的选项信息

    field_data_list集合:

    参数 类型 必填 描述
    data_name String 是 自定义字段选项名称
    data_value String 是 自定义字段选项CODE值
    data_id String 否 级联字段选项对应的ID
    data_parent_id String 否 级联字段选项的父节点ID
    node_flag String 否 级联字段选项是否最子级节点标识,0最子级节点,1非最子级节点

    返回示例:

    {
    "items": [
      {
        "field_data_list": [
          {
            "data_name": "999",
            "data_value": "540264609760473"
          },
          {
            "data_name": "777",
            "data_value": "540264668320333"
          },
          {
            "data_name": "888",
            "data_value": "540264668320352"
          }
        ],
        "field_name": "下拉列表",
        "field_type": 6,
        "fieldid": "3ceef648f3d6412abdf8fd6aac5db9f3",
        "fill_flag": 1
      },
      {
        "field_data_list": [
          {
            "data_name": "语文",
            "data_value": "500862751814255"
          },
          {
            "data_name": "数学",
            "data_value": "500862751819356"
          },
          {
            "data_name": "英语",
            "data_value": "502372726676614"
          }
        ],
        "field_name": "复选",
        "field_type": 7,
        "fieldid": "8f52d2f19fad4a8eae22238437817b9c",
        "fill_flag": 0
      },
      {
        "field_data_list": [],
        "field_name": "测试234",
        "field_type": 5,
        "fieldid": "d1dc7e1e13794cf1a936d74b76c4ecc0",
        "fill_flag": 0
      },
      {
        "field_data_list": [],
        "field_name": "时间",
        "field_type": 4,
        "fieldid": "4e1e6b21b433461d9bac2cee6d3297d1",
        "fill_flag": 0
      },
      {
        "field_data_list": [],
        "field_name": "日期",
        "field_type": 3,
        "fieldid": "30b5071f2b514d57b6d34e7c95cdf431",
        "fill_flag": 0
      },
      {
        "field_data_list": [],
        "field_name": "567",
        "field_type": 2,
        "fieldid": "c2610afb04014d788e398324f7f01329",
        "fill_flag": 0
      },
      {
        "field_data_list": [
          {
            "data_id": "fsflj0pl",
            "data_name": "级联01",
            "data_parent_id": "",
            "data_value": "689230596808442",
            "node_flag": "0"
          },
          {
            "data_id": "bl3aj9iu",
            "data_name": "级联02",
            "data_parent_id": "",
            "data_value": "689230596809951",
            "node_flag": "1"
          },
          {
            "data_id": "s7q2w9vh",
            "data_name": "级联02子01",
            "data_parent_id": "bl3aj9iu",
            "data_value": "689230596810917",
            "node_flag": "0"
          },
          {
            "data_id": "107s9f56",
            "data_name": "级联02子02",
            "data_parent_id": "bl3aj9iu",
            "data_value": "689230596811296",
            "node_flag": "1"
          },
          {
            "data_id": "glonliw3",
            "data_name": "级联02子02子01",
            "data_parent_id": "107s9f56",
            "data_value": "689230596812613",
            "node_flag": "0"
          }
        ],
        "field_name": "城市",
        "field_type": "9",
        "fieldid": "762c6e33788845dcb1585d9715d00e55",
        "fill_flag": "0"
      }
    ],
    "ret_code": "000000",
    "ret_msg": "操作成功!"
    }
    
    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
    # ● 查询地区型字段信息

    接口说明:

    返回工单自定义字段地区型字段的基本信息

    请求方式:

    GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/get_region
    
    1

    请求参数:

    参数 类型 必填 描述
    无

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/get_region`  
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合

    items集合:

    参数 类型 必填 描述
    id String 是 地区ID
    name String 是 地区名称
    regions List 否 地区下级地区信息

    regions集合:

    参数 类型 必填 描述
    id String 是 地区ID
    name String 是 地区名称
    regions List 否 地区下级地区信息

    返回示例:

    {
    "items": [
      {
        "id": "10001",
        "name": "安徽省",
        "regions": [
          {
            "id": "10032",
            "name": "安庆市",
            "regions": [
              {
                "id": "10395",
                "name": "大观区",
                "regions": [
                  {
                    "id": "13290",
                    "name": "德宽路街道"
                  },
                  {
                    "id": "13291",
                    "name": "海口镇"
                  },
                  {
                    "id": "13292",
                    "name": "花亭路街道"
                  },
                  {
                    "id": "13293",
                    "name": "集贤路街道"
                  },
                  {
                    "id": "13294",
                    "name": "菱湖街道"
                  },
                  {
                    "id": "13295",
                    "name": "龙山路街道"
                  },
                  {
                    "id": "13296",
                    "name": "山口乡"
                  },
                  {
                    "id": "13297",
                    "name": "十里铺乡"
                  },
                  {
                    "id": "13298",
                    "name": "石化路街道"
                  },
                  {
                    "id": "13299",
                    "name": "皖河农场"
                  },
                  {
                    "id": "13300",
                    "name": "玉琳路街道"
                  }
                ]
              },
              {
                "id": "10404",
                "name": "岳西县",
                "regions": [
                  {
                    "id": "13418",
                    "name": "白帽镇"
                  },
                  {
                    "id": "13419",
                    "name": "包家乡"
                  },
                  {
                    "id": "13420",
                    "name": "菖蒲镇"
                  },
                  {
                    "id": "13421",
                    "name": "店前镇"
                  },
                  {
                    "id": "13422",
                    "name": "古坊乡"
                  },
                  {
                    "id": "13423",
                    "name": "和平乡"
                  },
                  {
                    "id": "13424",
                    "name": "河图镇"
                  },
                  {
                    "id": "13425",
                    "name": "黄尾镇"
                  },
                  {
                    "id": "13426",
                    "name": "来榜镇"
                  },
                  {
                    "id": "13427",
                    "name": "莲云乡"
                  },
                  {
                    "id": "13428",
                    "name": "毛尖山乡"
                  },
                  {
                    "id": "13429",
                    "name": "青天乡"
                  },
                  {
                    "id": "13430",
                    "name": "石关乡"
                  },
                  {
                    "id": "13431",
                    "name": "天堂镇"
                  },
                  {
                    "id": "13432",
                    "name": "田头乡"
                  },
                  {
                    "id": "13433",
                    "name": "头陀镇"
                  },
                  {
                    "id": "13434",
                    "name": "巍岭乡"
                  },
                  {
                    "id": "13435",
                    "name": "温泉镇"
                  },
                  {
                    "id": "13436",
                    "name": "五河镇"
                  },
                  {
                    "id": "13437",
                    "name": "响肠镇"
                  },
                  {
                    "id": "13438",
                    "name": "姚河乡"
                  },
                  {
                    "id": "13439",
                    "name": "冶溪镇"
                  },
                  {
                    "id": "13440",
                    "name": "中关乡"
                  },
                  {
                    "id": "13441",
                    "name": "主簿镇"
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "ret_code": "000000",
    "ret_msg": "操作成功"
    }
    
    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
    # ● 工单自定义字段(选择型)添加选项信息

    接口说明:

    工单选择型自定义字段批量添加选项信息

    请求方式:

    POST

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/save_option_data_value
    
    1

    请求参数:

    参数 类型 必填 描述
    fieldid String 是 工单自定义字段ID
    field_data_value List 是 工单自定义字段选项信息
    agentid String 是 操作坐席ID
    agent_name String 是 操作坐席名称

    field_data_value集合:

    参数 类型 必填 描述
    field_value String 是 字段选项值
    field_text String 是 字段文本值

    请求示例:

     curl https://www.sobot.com/api/ws/5/ticket/save_option_data_value -X POST -H 'content-type: application/json' 
     -H 'token:4ac37cb2e9c740dba4b75a34d5358802'  -d '{"fieldid":"3ceef648f3d6412abdf8fd6aac5db9f3","agentid":"0a37c8156d094311890e48fbc06501c4","agent_name":"ming","field_data_value":[{"field_value":"539325753445693","field_text":"下列选项一"}]}'`  
    
    1
    2

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
    "ret_code": "000000",
    "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 查询工单分类关联的工单模板

    接口说明:

    返回工单分类关联的工单模板中的自定义字段信息

    请求方式:

    GET

    请求地址:

      https://www.sobot.com/api/ws/5/ticket/query_fileds_by_typeid
    
    1

    请求参数:

    参数 类型 必填 描述
    ticket_typeid String 是 工单分类ID

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_fileds_by_typeid
    ?ticket_typeid=75c5b76905054a0bad862d0e725570e9
    
    1
    2

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合

    items集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_name String 是 自定义字段名称
    field_type String 是 自定义字段类型,1单行文本,2多行文本,3日期,4时间,5 数值,6下拉列表,7复选框,8单选框 9 级联 11 地区 12 日期+时间
    fill_flag String 是 自定义字段是否必填,0 否,1 是
    field_data_list List 否 选择型字段的选项信息

    field_data_list集合:

    参数 类型 必填 描述
    data_name String 是 自定义字段选项名称
    data_value String 是 自定义字段选项CODE值

    返回示例:

    {
      "items": [
        {
          "field_data_list": [
            {
              "data_name": "999",
              "data_value": "540264609760473"
            },
            {
              "data_name": "777",
              "data_value": "540264668320333"
            },
            {
              "data_name": "888",
              "data_value": "540264668320352"
            }
          ],
          "field_name": "下拉列表",
          "field_type": 6,
          "fieldid": "3ceef648f3d6412abdf8fd6aac5db9f3",
          "fill_flag": 1
        },
        {
          "field_data_list": [
            {
              "data_name": "语文",
              "data_value": "500862751814255"
            },
            {
              "data_name": "数学",
              "data_value": "500862751819356"
            },
            {
              "data_name": "英语",
              "data_value": "502372726676614"
            }
          ],
          "field_name": "复选",
          "field_type": 7,
          "fieldid": "8f52d2f19fad4a8eae22238437817b9c",
          "fill_flag": 0
        },
        {
          "field_data_list": [],
          "field_name": "测试234",
          "field_type": 5,
          "fieldid": "d1dc7e1e13794cf1a936d74b76c4ecc0",
          "fill_flag": 0
        },
        {
          "field_data_list": [],
          "field_name": "时间",
          "field_type": 4,
          "fieldid": "4e1e6b21b433461d9bac2cee6d3297d1",
          "fill_flag": 0
        },
        {
          "field_data_list": [],
          "field_name": "日期",
          "field_type": 3,
          "fieldid": "30b5071f2b514d57b6d34e7c95cdf431",
          "fill_flag": 0
        },
        {
          "field_data_list": [],
          "field_name": "567",
          "field_type": 2,
          "fieldid": "c2610afb04014d788e398324f7f01329",
          "fill_flag": 0
        }
      ],
      "ret_code": "000000",
      "ret_msg": "操作成功!"
    }
    
    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
    # ● 查询自定义工单状态

    接口说明:

    返回自定义工单状态的基本信息

    请求方式:

    GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/query_ticket_status_infos
    
    1

    请求参数:

    参数 类型 必填 描述
    无

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_ticket_status_infos`  
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合

    items集合:

    参数 类型 必填 描述
    status_id String 是 状态id,如果未开启自定义状态管理,该字段为空
    status_code Integer 是 状态编码,工单状态属性的具体值
    status_name String 是 自定义工单状态名称
    status_type Integer 是 状态类型 1-新建,2-受理中 3-等待客户回复 4-暂停 5-已解决 6-已关闭 7-已删除
    status_desc String 是 自定义工单状态描述
    customer_status_name String 是 自定义工单状态在客户侧展示的状态名称
    is_delete Integer 是 是否删除 1-是 0-否

    返回示例:

    {
        "ret_code": "000000",
        "ret_msg": "操作成功",
        "items": [
            {
              "status_id": null,
              "status_code": 0,
              "status_name": "尚未受理",
              "status_type": 1,
              "status_desc": "工单待分配给客服",
              "customer_status_name": "处理中",
              "is_delete": 0
            },
            {
              "status_id": null,
              "status_code": 1,
              "status_name": "受理中",
              "status_type": 2,
              "status_desc": "客服正在处理工单",
              "customer_status_name": "处理中",
              "is_delete": 0
            },
            {
              "status_id": null,
              "status_code": 2,
              "status_name": "待客服回复",
              "status_type": 2,
              "status_desc": "客户回复后,工单状态将自动更新为此状态",
              "customer_status_name": "处理中",
              "is_delete": 0
            },
            {
              "status_id": null,
              "status_code": 3,
              "status_name": "已解决",
              "status_type": 5,
              "status_desc": "工单问题已解决问题,待客户确认",
              "customer_status_name": "已解决",
              "is_delete": 0
            },
            {
              "status_id": null,
              "status_code": 98,
              "status_name": "已删除",
              "status_type": 7,
              "status_desc": "已删除",
              "customer_status_name": "已删除",
              "is_delete": 0
            },
            {
              "status_id": null,
              "status_code": 99,
              "status_name": "已关闭",
              "status_type": 6,
              "status_desc": "工单问题已解决问题,且客户已确认",
              "customer_status_name": "已解决",
              "is_delete": 0
            }
        ]
    }
    
    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
    # ● 创建工单(客户)

    接口说明:

    调用此接口,系统会根据提交的参数按此优先级“客户 ID > 对接 ID > 客户邮箱 > 客户手机号”查找客户,如果匹配成功,用该客户作为工单关联客户,否则新建客户后关联。

    备注:

    1、此处所传工单自定义字段,必须是所传工单分类 id 关联工单模板中的自定义字段。
    2、分类关联模板中的自定义字段通过查询工单分类关联的工单模板信息接口获取。
    3、工单分类ID需要调用查询数据字典中工单分类获取具体值。
    4、如需上传附件,需要调用附件上传(客户)进行。
    5、first_contact_type和first_contact_info需同时存在或同时不存在

    请求方式:

    POST

    请求地址:

      https://www.sobot.com/api/ws/5/ticket/save_user_ticket
    
    1

    请求参数:

    参数 类型 必填 描述
    companyid String 是 企业ID
    ticket_title String 是 工单标题
    userid String 否 客户ID
    partnerid String 否 对接ID
    ticket_content String 是 工单问题描述
    user_emails String 否 客户邮箱
    user_tels String 否 客户电话
    ticket_typeid String 是 工单分类ID,叶子节点的分类ID
    ticket_from String 是 工单来源,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,12 邮件留言,13 语音留言,16 微信小程序客户留言,17 企业微信客户留言,21 机器人留言
    file_str String 否 附件路径,多个附件,附件之间采用英文分号";"隔开
    extend_fields List 否 工单自定义字段信息
    first_contact_type Int 否 优先联系方式的类型 1:邮箱 2: 手机号
    first_contact_info String 否 优先联系方式的值

    extend_fields集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_value String 是 自定义字段值(级联字段field_value只需填写最子级节点的data_value;地区字段按照 省/市/县(区)/街道 码值填写,示例:10002,10048,10501,14865,详情请见查询地区型字段信息接口)

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/save_user_ticket -X POST -H 'content-type: application/json' -H 'token:4ac37cb2e9c740dba4b75a34d5358802' -d '{"companyid":"acb290d666814d65834c70073aed65f2","ticket_title":"测试工单","userid":"007e447e1c104583971c2e990df0d4ac","ticket_content":"测试工单",,"ticket_typeid":"4112bddd39cd4895808180f139cd497a",   "ticket_from":"1","extend_fields":[{"fieldid":"5ba3741d772c47d9a3066db1d3900b4e","field_value":"123"},{"fieldid":"3ceef648f3d6412abdf8fd6aac5db9f3","field_value":"539325753445693"}}'
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    ticketid String 是 工单ID

    返回示例:

    {
      "item": {
        "ticketid": "5c4015d7bf71493db4a53a2877a1ae98"
      },
      "items": [],
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    # ● 创建工单(坐席)

    接口说明:

    坐席创建工单并把工单关联到相对应的客户下

    备注:

    1、此处所传工单自定义字段,必须是所传工单分类 id 关联工单模板中的自定义字段。
    2、分类关联模板中的自定义字段通过查询工单分类关联的工单模板信息接口获取。
    3、工单分类ID需要调用查询数据字典中工单分类获取具体值。
    4、如需上传附件,需要调用附件上传(坐席)进行。
    5、first_contact_type和first_contact_info需同时存在或同时不存在,优先联络方式存在时userid必须有值。

    请求方式:

    POST

    请求地址:

      https://www.sobot.com/api/ws/5/ticket/save_agent_ticket
    
    1

    请求参数:

    参数 类型 必填 描述
    companyid String 是 企业ID
    ticket_title String 是 工单标题
    userid String 否 客户ID
    ticket_content String 是 工单问题描述
    ticket_from String 是 工单来源,0工单中心,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台 14 微信小程序-在线工作台,15 企业微信-在线工作台,18 批量导入,19 微信客服,20 企业微信-智客
    deal_groupid String 否 受理技能组ID
    deal_group_name String 否 受理技能组名称
    deal_agentid String 否 受理坐席ID
    deal_agent_name String 否 受理坐席名称
    create_agentid String 是 创建坐席ID
    create_agent_name String 是 创建坐席名称
    recordid String 否 记录ID,呼叫记录ID或会话记录ID
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态(注意:使用状态编码而非状态ID)
    ticket_level String 是 工单优先级,0低,1中,2高,3紧急
    ticket_typeid String 是 工单分类ID,叶子节点的分类ID
    file_str String 否 附件路径,多个附件,附件之间采用英文分号";"隔开
    copy_agent List 否 抄送坐席
    extend_fields List 否 工单自定义字段信息
    first_contact_type Int 否 优先联系方式的类型 1:邮箱 2: 手机号
    first_contact_info String 否 优先联系方式的值

    copy_agent 集合:

    参数 类型 必填 描述
    agent_name String 是 坐席名称
    agent_mail String 是 坐席邮箱

    extend_fields集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_value String 是 自定义字段值 (级联字段field_value只需填写最子级节点的data_value;地区字段按照 省/市/县(区)/街道 码值填写,示例:10002,10048,10501,14865,详情请见查询地区型字段信息接口)

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/save_agent_ticket -X POST -H 'content-type: application/json' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' 
    -d '{"companyid":"acb290d666814d65834c70073aed65f2","ticket_title":"测试工单","userid":"007e447e1c104583971c2e990df0d4ac","ticket_content":"测试工单","ticket_status":"1","ticket_level":"0","create_agentid":"0a37c8156d094311890e48fbc06501c4","create_agent_name":"ming",
    "ticket_typeid":"4112bddd39cd4895808180f139cd497a","ticket_from":"0","extend_fields":[{"fieldid":"5ba3741d772c47d9a3066db1d3900b4e","field_value":"123"},{"fieldid":"3ceef648f3d6412abdf8fd6aac5db9f3","field_value":"539325753445693"}]}'
    
    1
    2
    3
    4

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    ticketid String 是 工单ID

    返回示例:

    {
      "item": {
        "ticketid": "5c4015d7bf71493db4a53a2877a1ae98"
      },
      "items": [],
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    # ● 回复工单(客户)

    接口说明:

    客户侧回复工单(客户可回复所有人)

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/save_user_reply
    
    1

    请求参数:

    参数 类型 必填 描述
    ticketid String 是 工单ID
    reply_content String 是 工单回复内容
    file_str String 否 回复附件路径,多个附件,附件之间使用英文分号";"隔开

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/save_user_reply -X POST -H 'content-type: application/json' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' -d '{"ticketid":"acb290d666814d65834c70073aed65f2"," reply_content":"坐席回复工单"}'
    
    1
    2

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 回复工单(坐席)

    接口说明:

    坐席侧回复工单(坐席回复分为仅回复坐席和回复所有人)

    请求方式:

    POST

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/save_ticket_reply
    
    1

    请求参数:

    参数 类型 必填 描述
    ticket_title String 是 工单标题
    ticket_content String 是 工单问题描述
    ticketid String 是 工单ID
    get_ticket_datetime String 是 获取工单信息时间,例如:2019-09-19 13:00:00 (当前时间)
    reply_content String 否 工单回复内容
    reply_type String 是 工单回复类型,0 所有人可见,1 仅坐席可见
    deal_groupid String 否 受理技能组ID
    deal_group_name String 否 受理技能组名称
    deal_agentid String 否 受理坐席ID
    deal_agent_name String 否 受理坐席名称
    reply_agentid String 是 回复坐席ID,指当前处理回复的坐席
    reply_agent_name String 是 回复坐席名称
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_level String 是 工单优先级, 0低,1中,2高,3紧急
    reply_file_str String 否 回复附件路径,多个附件,附件之间使用英文分号";"隔开
    copy_agent List 否 抄送坐席
    extend_fields List 否 工单自定义字段信息

    copy_agent集合:

    参数 类型 必填 描述
    agent_name String 是 坐席名称
    agent_mail String 是 坐席邮箱

    extend_fields集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_value String 是 自定义字段值 (级联字段field_value只需填写最子级节点的data_value;地区字段按照 省/市/县(区)/街道 码值填写,示例:10002,10048,10501,14865,详情请见查询地区型字段信息接口)

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/save_ticket_reply -X POST 
    -H 'content-type: application/json' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' -d '{"ticketid":"acb290d666814d65834c70073aed65f2","ticket_title":"测试工单","reply_content":"坐席回复工单","ticket_content":"测试工单"," reply_type":"0","ticket_status":"1","ticket_level":"0",
    "get_ticket_datetime":"2019-09-19 13:00:00","reply_agentid":"0a37c8156d094311890e48fbc06501c4","reply_agent_name":"ming","copy_agent":[{"agent_name":"工单坐席","agent_mail":"3443355456@qq.com"}],"reply_agentid":"0a37c8156d094311890e48fbc06501c4","reply_agent_name":"ming",  "extend_fields":[{"fieldid":"5ba3741d772c47d9a3066db1d3900b4e","field_value":"123"},{"fieldid":"3ceef648f3d6412abdf8fd6aac5db9f3","field_value":"539325753445693"}]}'
    
    1
    2
    3
    4

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 附件上传(客户)

    接口说明:

    客户创建工单或回复工单时,上传一个或多个附件。 先上传附件,再调用创建工单(客户)或者回复工单(客户)。

    备注:

    1、在请求中注明 Content-Type: multipart/form-data;boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/user_upload_file
    
    1

    请求参数:

    参数 类型 必填 描述
    file IO流 否 文件流,选择要上传的文件
    file_num_key String 否 上传文件标识,随机生成的值,用于判断上传文件数量

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/user_upload_file -X POST-H 'content-type:multipart/form-data;boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' -H 'token: 4ac37cb2e9c740dba4b75a34d5358802' -F 'file=@/ C:/Users/Pictures/微信图片_201905281146jpg ' -F 'file_num_key=16dfc20e-f3de-46tf-8088-844cfde704d3'
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    file_url String 是 文件路径

    返回示例:

    {
      "item": {
        "file_url": "https://sobot.oss-cn-beijing.aliyuncs.com/console/acb290d666814d65834c70073aed65f2/ticket/微信图片_201905281146jpg"
      },
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    # ● 附件上传(坐席)

    接口说明:

    坐席创建工单或回复工单时,上传一个或多个附件 先上传附件,再调用创建工单(坐席)或者回复工单(坐席)

    备注:

    1、在请求中注明 Content-Type: multipart/form-data;boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/upload_file
    
    1

    请求参数:

    参数 类型 必填 名称 备注
    file IO流 否 文件流 选择要上传的文件
    file_num_key String 否 上传文件标识 随机生成的值,用于判断上传文件数量

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/upload_file -X POST -H 'content-type:multipart/form-data;boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' -H 'token: 4ac37cb2e9c740dba4b75a34d5358802' -F 'file=@/ C:/Users/Pictures/微信图片_201905281146jpg' -F 'file_num_key=16dfc20e-f3de-46tf-8088-844cfde704d3'
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    file_url String 是 文件路径

    返回示例:

    {
      "item": {
        "file_url": "https://sobot.oss-cn-beijing.aliyuncs.com/console/acb290d666814d65834c70073aed65f2/ticket/微信图片_201905281146jpg"
      },
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    # ● 工单催单

    接口说明:

    对工单进行催单,返回操作结果

    通过接口进行催单暂不支持短信通知客服

    请求方式:

    POST

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/reminder
    
    1

    请求参数:

    参数 类型 必填 描述
    ticketid String 否 工单ID
    ticket_code String 否 工单编号(工单ID与工单编号不可同时为空,同时传参以工单ID为准)
    reminder_agentid String 是 催单人(客服ID)
    reminder_remark String 是 催单原因

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/reminder -X POST -H 'content-type: application/json' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' 
    -d '{"ticketid":"d53fb3d4b37d4164b8885ff0b3c3a1bb","ticket_code":"20240903000001",
    "reminder_agentid":"7dd8695ed454436897da52576a42b29e","reminder_remark":"催单原因"}'
    
    1
    2
    3
    4

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 否 返回信息

    返回示例:

    {
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 添加工单满意度评价

    接口说明:

    对工单满意度进行评价,返回操作结果

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/add_ticket_evaluation
    
    1

    请求参数:

    参数 类型 必填 描述
    ticketId String 是 工单ID
    companyId String 是 公司ID
    score Integer 是 评分,1 1星,2 2星,3 3星,4 4星,5 5星
    remark String 否 评语

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/ add_ticket_evaluation?ticketId=2831ceace38c45649840374a08d321bd&companyId=45649840374a08d321bd&score=5&remark=我对本次服务表示满意
    
    1

    返回参数:

    字段 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 根据创建时间查询工单列表

    接口说明:

    按照工单创建时间段查询工单列表信息

    请求方式:

    GET

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/query_tickets
    
    1

    请求参数:

    参数 类型 必填 描述
    create_start_datetime String 是 工单创建开始时间,例如:2018-09-18 00:00:00
    create_end_datetime String 是 工单创建结束时间,例如:2018-09-18 23:59:59(查询创建时间段不能大于一个月)
    ticket_status String 否 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_from String 否 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_typeid String 否 工单分类ID
    userid String 否 客户ID
    user_partnerid String 否 客户对接ID
    deal_agentid String 否 受理坐席ID
    deal_agent_groupid String 否 受理坐席组ID
    page_no Integer 是 当前页数,默认第一页
    page_size Integer 是 当前页显示条数,默认每页显示15条,最大每页显示50条

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_tickets? create_start_datetime=2018-09-18 00:00:00&create_end_datetime=2018-09-18 23:59:59
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 否 返回集合
    page_no Integer 是 当前页数
    page_size Integer 是 当前页显示条数
    page_count Integer 是 总页数
    total_count Integer 是 总条数

    items集合:

    参数 类型 必填 描述
    ticketid String 是 工单ID
    ticket_title String 是 工单标题
    ticket_content String 是 问题描述
    ticket_code String 是 工单编号
    ticket_from String 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_level String 是 工单优先级,0低,1中,2高,3紧急
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    start_type String 是 工单发起人类型,0坐席,1客户
    start_name String 是 工单发起人名称
    ticket_type_name String 是 工单分类名称,显示格式:一级/二级/三级
    deal_agent_name String 否 受理坐席名称
    deal_group_name String 否 受理技能组名称
    create_datetime String 是 工单创建时间,例如:2018-09-18 12:00:00
    update_datetime String 是 工单更新时间,例如:2018-09-18 13:00:00
    user_nick String 是 客户昵称
    user_name String 否 客户名称
    user_tels String 否 客户电话,多个电话号码,号码之间采用英文逗号","隔开
    user_emails String 否 客户邮箱,多个邮箱,邮箱之间采用英文逗号","隔开
    evaluation_datetime String 否 工单评价时间, 例如:2018-09-18 13:00:00
    score Integer 否 评分,1 1星,2 2星,3 3星,4 4星,5 5星
    remark String 否 评语

    返回示例:

    {
      "items": [
        {
          "create_datetime": "2018-09-18 09:10:05",
          "deal_group_name": "",
          "deal_agent_name": "",
          "start_name": "测试标签",
          "start_type": "1",
          "ticket_code": "20190912000007",
          "ticket_content": "测试工单",
          "ticket_from": "1",
          "ticket_level": "0",
          "ticket_status": "1",
          "ticket_title": "测试工单",
          "ticket_type_name": "售后",
          "ticketid": "b6dacd72a5cf4e2999e78a18a9126c72",
          "update_datetime": "2018-09-18 09:15:55",
          "user_nick": "测试标签",
          "evaluation_datetime": "2018-09-18 09:15:55",
          "score": 1,
          "remark": "问题解决地非常快,果断好评"
        },
        {
          "create_datetime": "2018-09-18 08:14:05",
          "deal_group_name": "",
          "deal_agent_name": "",
          "start_name": "测试标签",
          "start_type": "1",
          "ticket_code": "20190912000006",
          "ticket_content": "测试工单",
          "ticket_from": "1",
          "ticket_level": "0",
          "ticket_status": "1",
          "ticket_title": "测试工单",
          "ticket_type_name": "咨询/咨询1/咨询2",
          "ticketid": "266a341702ef40d595915a3c19676745",
          "update_datetime": "2018-09-18 08:20:05",
          "user_nick": "测试标签"
        },
        {
          "create_datetime": "2018-09-18 07:34:25",
          "deal_group_name": "123",
          "deal_agent_name": "ming",
          "start_name": "智齿测试12",
          "start_type": "0",
          "ticket_code": "20190912000003",
          "ticket_content": "<p>34433434</p>",
          "ticket_from": "0",
          "ticket_level": "0",
          "ticket_status": "0",
          "ticket_title": "4343",
          "ticket_type_name": "其他",
          "ticketid": "f294176887284c5597794c636d5a1bfe",
          "update_datetime": "2018-09-18 07:54:35",
          "user_emails": "wangxun0104@hotmail.com",
          "user_name": "王迅",
          "user_nick": "王迅",
          "user_tels": "18280240680"
        }
      ],
      "page_count": 1,
      "page_no": 1,
      "page_size": 15,
      "ret_code": "000000",
      "ret_msg": "操作成功",
      "total_count": 3
    }
    
    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
    # ● 根据更新时间查询工单列表

    接口说明:

    按照工单更新时间段查询工单列表信息

    请求方式:

    GET

    请求地址:

    https://www.sobot.com/api/ws/5/ticket/query_tickets_by_update_time
    
    1

    请求参数:

    参数 类型 必填 描述
    update_start_datetime String 是 工单更新开始时间,例如:2018-09-18 00:00:00
    update_end_datetime String 是 工单更新结束时间,例如:2018-09-18 23:59:59(查询创建时间段不能大于一个月)
    ticket_status String 否 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_from String 否 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_typeid String 否 工单分类ID
    userid String 否 客户ID
    user_partnerid String 否 客户对接ID
    deal_agentid String 否 受理坐席ID
    deal_agent_groupid String 否 受理坐席组ID
    page_no Integer 是 当前页数,默认第一页
    page_size Integer 是 当前页显示条数,默认每页显示15条,最大每页显示50条

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_tickets_by_update_time? update_start_datetime=2018-09-18 00:00:00&update_end_datetime=2018-09-18 23:59:59
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 否 返回集合
    page_no Integer 是 当前页数
    page_size Integer 是 当前页显示条数
    page_count Integer 是 总页数
    total_count Integer 是 总条数

    items集合:

    参数 类型 必填 名称
    ticketid String 是 工单ID
    ticket_title String 是 工单标题
    ticket_content String 是 问题描述
    ticket_code String 是 工单编号
    ticket_from String 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_level String 是 工单优先级,0低,1中,2高,3紧急
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    start_type String 是 工单发起人类型,0坐席,1客户
    start_name String 是 工单发起人名称
    ticket_type_name String 是 工单分类名称,显示格式:一级/二级/三级
    deal_agent_name String 否 受理坐席名称
    deal_group_name String 否 受理技能组名称
    create_datetime String 是 工单创建时间,例如:2018-09-18 12:00:00
    update_datetime String 是 工单更新时间,例如:2018-09-18 13:00:00
    user_nick String 是 客户昵称
    user_name String 否 客户名称
    user_tels String 否 客户电话,多个电话号码,号码之间采用英文逗号","隔开
    user_emails String 否 客户邮箱,多个邮箱,邮箱之间采用英文逗号","隔开
    evaluation_datetime String 否 工单评价时间,例如:2018-09-18 13:00:00
    score Integer 否 评分,1 1星,2 2星,3 3星,4 4星,5 5星
    remark String 否 评语

    返回示例:

    {
      "items": [
        {
          "create_datetime": "2018-09-18 09:10:05",
          "deal_group_name": "",
          "deal_agent_name": "",
          "start_name": "测试标签",
          "start_type": "1",
          "ticket_code": "20190912000007",
          "ticket_content": "测试工单",
          "ticket_from": "1",
          "ticket_level": "0",
          "ticket_status": "1",
          "ticket_title": "测试工单",
          "ticket_type_name": "售后",
          "ticketid": "b6dacd72a5cf4e2999e78a18a9126c72",
          "update_datetime": "2018-09-18 09:15:55",
          "user_nick": "测试标签",
          "evaluation_datetime": "2018-09-18 09:15:55",
          "score": 1,
          "remark": "问题解决地非常快,果断好评"
        },
        {
          "create_datetime": "2018-09-18 08:14:05",
          "deal_group_name": "",
          "deal_agent_name": "",
          "start_name": "测试标签",
          "start_type": "1",
          "ticket_code": "20190912000006",
          "ticket_content": "测试工单",
          "ticket_from": "1",
          "ticket_level": "0",
          "ticket_status": "1",
          "ticket_title": "测试工单",
          "ticket_type_name": "咨询/咨询1/咨询2",
          "ticketid": "266a341702ef40d595915a3c19676745",
          "update_datetime": "2018-09-18 08:20:05",
          "user_nick": "测试标签"
        },
        {
          "create_datetime": "2018-09-18 07:34:25",
          "deal_group_name": "123",
          "deal_agent_name": "ming",
          "start_name": "智齿测试12",
          "start_type": "0",
          "ticket_code": "20190912000003",
          "ticket_content": "<p>34433434</p>",
          "ticket_from": "0",
          "ticket_level": "0",
          "ticket_status": "0",
          "ticket_title": "4343",
          "ticket_type_name": "其他",
          "ticketid": "f294176887284c5597794c636d5a1bfe",
          "update_datetime": "2018-09-18 07:54:35",
          "user_emails": "wangxun0104@hotmail.com",
          "user_name": "王迅",
          "user_nick": "王迅",
          "user_tels": "18280240680"
        }
      ],
      "page_count": 1,
      "page_no": 1,
      "page_size": 15,
      "ret_code": "000000",
      "ret_msg": "操作成功",
      "total_count": 3
    }
    
    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
    # ● 查询工单详情页

    接口说明:

    返回该条工单的详细信息(包括工单回复、操作历史)。

    请求方式:

    GET

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/get_ticket_by_id
    
    1

    请求参数:

    参数 类型 必填 描述
    ticketid String 否 工单ID
    ticket_code String 否 工单编号(工单ID与工单编号不可同时为空,同时传参以工单ID为准)

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' -dhttps://www.sobot.com/api/ws/5/ticket/get_ticket_by_id?ticketid=ebe6a8b6bcf840418b8e58d123262945
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 否 返回对象

    item对象:

    参数 类型 必填 描述
    companyid String 是 公司ID
    ticketid String 是 工单ID
    ticket_code String 是 工单编号
    ticket_title String 是 工单标题
    ticket_content String 是 工单问题描述
    ticket_from String 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_level String 是 工单优先级,0低,1中,2高,3紧急
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_typeid String 是 工单分类ID
    ticket_type_name String 是 工单分类名称
    start_type String 是 工单发起人类型,0坐席,1客户
    start_name String 是 工单发起人名称
    deal_groupid String 否 工单受理技能组ID
    deal_group_name String 否 工单受理技能组名称
    deal_agentid String 否 工单受理坐席ID
    deal_agent_name String 否 工单受理坐席名称
    recordid String 否 关联记录ID,会话或呼叫ID(工单来源是桌面网站-在线工作台则表示会话ID,若来源是呼叫中心则表示呼叫ID)
    userid String 是 工单关联客户ID
    user_nick String 是 客户昵称
    user_name String 否 客户名称
    user_tels String 否 客户电话,多个电话号码,号码之间采用英文逗号","隔开
    user_emails String 否 客户邮箱,多个邮箱,邮箱之间采用英文逗号","隔开
    update_agent_name String 是 工单更新人名称
    create_datetime String 是 工单创建时间,例如:2018-09-18 10:14:05
    update_datetime String 是 工单更新时间,例如:2018-09-18 10:34:45
    file_list List 否 附件
    extend_fields_list List 否 工单自定义字段
    deal_list List 否 工单全部回复
    update_log_list List 是 工单操作记录
    evaluation_datetime String 否 工单评价时间,例如:2018-09-18 13:00:00
    score Integer 否 评分,1 1星,2 2星,3 3星,4 4星,5 5星
    remark String 否 评语
    params_extends_list List 否 对接字段
    create_group_names String 否 创建客服组名称,多个采用英文逗号","隔开
    closed_datetime String 否 工单关闭时间,例如:2022-08-10 10:14:05
    first_accept_datetime String 否 工单首次响应时间,例如:2022-08-10 10:14:05
    first_complete_datetime String 否 工单首次解决时间,例如:2022-08-10 10:14:05
    concern_serviceid String 否 工单关注人ID,多个采用英文逗号","隔开
    concern_service_name String 否 工单关注人名称,多个采用英文逗号","隔开
    relation_ticketid String 否 关联工单ID,多个采用英文逗号","隔开
    ticket_email String 否 收件箱

    extend_fields_list集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_name String 是 自定义字段名称
    field_type String 是 自定义字段类型,1单行文本,2多行文本,3日期,4时间,5 数值,6下拉列表,7复选框,8单选框 9 级联 11 地区 12 日期+时间
    field_text String 否 选择型字段选项文本值
    field_value String 是 自定义字段值
    field_sortno Integer 是 排序字段,数值越小,排的越靠前

    params_extends_list集合:

    参数 类型 必填 描述
    fieldid String 是 对接字段ID
    field_name String 是 对接字段名称
    field_value String 是 对接字段值

    deal_list集合:

    参数 类型 必填 描述
    replyid String 是 回复ID
    reply_title String 是 回复标题
    reply_content String 否 回复内容(电话回复方式的回复内容为通话id)
    reply_type String 是 回复类型,0 所有人可见 1 仅坐席所见
    reply_datetime String 是 回复时间,例如:2018-09-18 10:34:45
    start_type String 是 回复人类型,0 坐席 1 客户 2 触发器 3 工单机器人 6 自动化规则
    update_user_name String 是 回复人名称
    face_img String 是 回复人头像
    file_list List 否 回复附件
    reply_type_new Integer 否 回复方式,1 工单回复 2 邮件回复 3 内部备注 4 邮件通知(内部备注)5 短信通知 6 电话回复 7 亚马逊回复

    update_log_list集合:

    参数 类型 必填 描述
    update_title String 是 操作记录标题
    update_contents String 否 操作记录内容JSON格式
    log_from String 是 操作记录来源,1 页面操作,2 流转触发器,3 自动化任务,4 工单机器人规则,5 工单机器人,6 系统操作
    update_datetime String 是 操作记录时间,例如:2018-09-18 10:34:45
    start_type String 是 操作人类型,0 坐席 1 客户 2 触发器 3 工单机器人 4 工单机器人规则 5 系统操作 6 自动化任务
    update_agent_name String 是 操作人名称
    face_img String 是 操作人头像

    file_list集合:

    参数 类型 必填 描述
    file_name String 是 附件名称
    file_url String 是 附件路径
    file_type String 是 附件类型

    返回示例: update_contents json格式化之后:

    参数 类型 必填 描述
    工单状态 String 否 工单状态
    自定义字段 JsonString 否 自动定字段变动json字符串

    自定义字段 json格式化之后:

    参数 类型 必填 描述
    客户昵称 String 否 客户变动字段
    组合表单字段明 String 否 {"summary":"【字段1加TEST】132.00","combineFormList":[{"字段1":"66","TEST":"66"}]}
    组合表单中summary是计算值变化, combineFormList是组合表单具体的表单变化集合

    返回示例:

    {
      "item": {
        "companyid": "acb290d666814d65834c70073aed65f2",
        "create_datetime": "2018-09-18 10:14:05",
        "deal_groupid": "",
        "deal_group_name": "",
        "deal_list": [
          {
            "face_img": "https://sobot.oss-cn-beijing.aliyuncs.com/console/acb290d666814d65834c70073aed65f2/userImage/2018011516173PNG",
            "file_list": [
              {
                "file_name": "微信图片_201905281146jpg",
                "file_type": "jpg",
                "file_url": "https://sobot.oss-cn-beijing.aliyuncs.com/console/acb290d666814d65834c70073aed65f2/ticket/微信图片_20190528114613_15686145601jpg"
              }
            ],
            "reply_content": "<p>343</p>",
            "reply_datetime": "2018-09-18 10:34:45",
            "reply_title": "回复 北京客户 ",
            "reply_type": "0",
            "start_type": "0",
            "update_user_name": "智齿测试12",
            "replyid": "c11897076adc4dd98f7a64f026fc2632"
          }
        ],
        "deal_agent_name": "智齿测试12",
        "extend_fields_list": [
          {
            "field_name": "下拉列表",
            "fieldid": "3ceef648f3d6412abdf8fd6aac5db9f3",
            "field_type": "6",
            "field_text": "999",
            "field_value": "540264609760473"
          },
          {
            "field_name": "时间",
            "fieldid": "4e1e6b21b433461d9bac2cee6d3297d1",
            "field_type": "4",
            "field_text": "",
            "field_value": "00:00"
          },
          {
            "field_name": "测试234",
            "fieldid": "d1dc7e1e13794cf1a936d74b76c4ecc0",
            "field_type": "1",
            "field_text": "",
            "field_value": "455445"
          }
        ],
        "file_list": [],
        "start_name": "北京客户",
        "start_type": "1",
        "ticket_code": "1534758910",
        "ticket_content": "<p>测试用</p>",
        "ticket_from": "1",
        "ticket_level": "0",
        "ticket_status": "2",
        "ticket_title": "客户留言-北京客户",
        "ticket_typeid": "c6aef17dca6b4ee5b9dc4206d8162abt",
        "ticket_type_name": "咨询/咨询1/咨询2",
        "ticketid": "d6aef19dca6b4ee5b9dc4206d8162105",
        "update_log_list": [
          {
            "face_img": "https://sobot.oss-cn-beijing.aliyuncs.com/console/acb290d666814d65834c70073aed65f2/userImage/2018011516173PNG",
            "log_from": "1",
            "start_type": "0",
            "update_contents": "{\"回复\":\"343\",\"回复附件\":\"微信图片_201905281146jpg\"}",
            "update_agent_name": "智齿测试12",
            "update_datetime": "2018-09-18 10:34:45",
            "update_title": "工单更新"
          },
          {
            "face_img": "https://img.sobot.com/console/common/face/user.png",
            "log_from": "1",
            "start_type": "1",
            "update_contents": "{\"工单分类\":\"咨询/咨询1/咨询2\",{\"自定义字段\":{\"客户昵称\":\"张三\",\"测试组合表单\":{\"summary\":\"【字段1加TEST】132.00\",\"combineFormList\":[{\"字段1\":\"66\",\"TEST\":\"66\"}]}}}",
            "update_datetime": "2018-09-18 10:14:05",
            "update_title": "工单创建"
          }
        ],
        "update_datetime": "2018-09-18 10:34:45",
        "user_nick": "北京客户",
        "userid": "fdd41fb55c4f41e4afa4906064deced3",
        "evaluation_datetime": "2018-09-18 09:15:55",
        "score": 1,
        "remark": "问题解决地非常快,果断好评"
      },
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    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
    # ● 查询工单统计概览

    接口说明:

    获取某个时间段工单对应的数量。

    请求方式:

    GET

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/get_ticket_data
    
    1

    请求参数:

    参数 类型 必填 描述
    start_datetime String 是 开始时间,例如:2019-09-18 00:00:00
    end_datetime String 是 结束时间,例如:2019-09-18 23:59:59

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/get_ticket_data?start_datetime= 2019-09-18 00:00:00&end_datetime=2019-09-18 23:59:59
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    item Object 是 返回对象

    item对象:

    参数 类型 必填 描述
    unassigned_ticket_num String 是 未分配工单数量
    unsolved_ticket_num String 是 未解决工单数量

    返回示例:

    {
      "item": {
        "unassigned_ticket_num": "2",
        "unsolved_ticket_num": "3"
      },
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    # ● 查询工单坐席工作量

    接口说明:

    获取某个时间段内坐席工作量。

    请求方式:

    GET

    请求地址:

      https://www.sobot.com/api/ws/5/ticket/query_agent_jobs
    
    1

    请求参数:

    参数 类型 必填 描述
    start_datetime String 是 开始时间,例如:2019-09-18 00:00:00
    end_datetime String 是 结束时间,例如:2019-09-18 23:59:59

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_agent_jobs?start_datetime= 2019-09-18 00:00:00&end_datetime=2019-09-18 23:59:59
    
    1

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合

    items集合:

    参数 类型 必填 描述
    agentid String 是 坐席ID
    agent_name String 是 坐席名称
    deal_ticket_num String 是 处理工单数量
    ticket_end_rate String 是 工单完结率

    返回示例:

    {
      "items": [
        {
          "deal_ticket_num": "1",
          "agent_name": "智齿测试12",
          "agentid": "efcfda336b5d4caeb4fd71392c54b5c9",
          "ticket_end_rate": "0"
        },
        {
          "deal_ticket_num": 0,
          "agent_name": "ming",
          "agentid": "0a37c8156d094311890e48fbc06501c4",
          "ticket_end_rate": "0"
        }
      ],
      "ret_code": "000000",
      "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # ● 查询工单消息推送异常数据

    接口说明:

    返回工单消息推送失败的数据

    请求方式:

    GET

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/query_ticket_push_fail_infos
    
    1

    请求参数:

    参数 类型 必填 描述
    start_datetime String 是 开始时间,例如:2020-04-08 00:00:00
    end_datetime String 是 结束时间,例如:2020-04-08 23:59:59
    page_no Integer 是 当前页数, 默认第一页
    page_size Integer 是 当前页显示条数,默认每页显示15条,最大每页显示50条

    请求示例:

    curl -H 'token:4ac37cb2e9c740dba4b75a34d5358802' https://www.sobot.com/api/ws/5/ticket/query_ticket_push_fail_infos
    ?start_datetime= 2020-04-08 00:00:00&end_datetime=2020-04-08 23:59:59
    
    1
    2

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息
    items List 是 返回集合
    page_no Integer 是 当前页数
    page_size Integer 是 当前页显示条数
    page_count Integer 是 总页数
    total_count Integer 是 总条数

    items集合:

    参数 类型 必填 描述
    ticketid String 是 工单ID
    companyid String 是 公司ID
    ticket_title String 是 工单标题
    ticket_content String 是 问题描述
    ticket_code String 是 工单编号
    ticket_from String 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    ticket_level String 是 工单优先级, 0低,1中,2高,3紧急
    ticket_status String 是 工单状态,0尚未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_type_name String 是 工单分类名称,显示格式:一级/二级/三级
    deal_agentid String 否 受理坐席ID
    deal_agent_name String 否 受理坐席名称
    deal_groupid String 否 受理技能组ID
    deal_group_name String 否 受理技能组名称
    reply_content String 否 工单回复内容
    update_datetime String 是 工单更新时间,例如:2020-04-08 13:00:00
    update_agent_name String 是 操作坐席名称
    userid String 是 工单关联客户ID
    user_nick String 是 客户昵称
    user_name String 否 客户名称
    user_tels String 否 客户电话,多个电话号码,号码之间采用英文逗号,隔开
    user_emails String 否 客户邮箱,多个邮箱,邮箱之间采用英文逗号,隔开
    recordid String 否 工单关联记录ID,工单来源是呼叫中心这个是呼叫记录ID,来源是在线工作台-桌面网站客服提交这个是会话记录ID
    file_str String 否 附件路径
    voice_url String 否 录音文件
    hope_accept_time String 否 SLA规定的首次响应时间,例如:2020-04-08 13:00:00
    hope_complete_time String 否 SLA规定的首次解决时间,例如:2020-04-08 13:00:00
    is_reminder String 是 催单信息标识,是否催单信息 0 否 1 是
    reminder_agentid String 否 催单坐席id
    reminder_agent_name String 否 催单坐席名称
    reminder_remark String 否 催单备注
    reminder_time String 否 催单时间,具体的时间点,例如:2020-04-20 12:35:30
    partnerid String 否 关联客户对接id
    extend_fields_list List 否 工单自定义字段

    extend_fields_list集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_name String 是 自定义字段名称
    field_type String 是 自定义字段类型,1单行文本,2多行文本,3日期,4时间,5 数值,6下拉列表,7复选框,8单选框 9级联 12 日期+时间
    field_text String 否 选择型字段选项文本值
    field_value String 是 自定义字段值

    返回示例:

    {
     "items": [
          {
            "companyid": "40d8940f1e854642b41f7c21f790b8e3",
            "deal_agent_name": "",
            "deal_agentid": "",
            "deal_group_name": "",
            "deal_groupid": "",
            "extend_fields_list": [],
            "file_str": "",
            "hope_accept_time": "",
            "hope_complete_time": "",
            "partnerid": "test_lily",
             "recordid": "",
            "ticket_code": "20200326000002",
            "ticket_content": "<p>lily的工单中心</p>",
            "ticket_from": "0",
            "ticket_level": "0",
            "ticket_status": "0",
            "ticket_title": "停服务后创建工单",
            "ticketid": "4c38229b83bd4101a09612b9ac26baf7",
            "update_agent_name": "小丽",
            "user_name": "VIP客户",
            "userid": "11a1e8a4a8e9480a8f409dc2a130431f",
            "is_reminder": "0",
            "voice_url": ""
          },
          {
            "companyid": "40d8940f1e854642b41f7c21f790b8e3",
            "deal_agent_name": "在线203",
            "deal_agentid": "587d3293ff794d7785a33d9a0695ea32",
            "deal_group_name": "",
            "deal_groupid": "",
            "extend_fields_list": [
              {
                "field_name": "RIO--下拉列表",
                "field_text": "77",
                "field_type": "6",
                "field_value": "121",
                "fieldid": "6cb4450292d34720877f6083514ca6fb"
              },
                {
                "field_name": "时间",
                "field_type": "4",
                "field_value": "09:00",
                "fieldid": "22696682739c4fd7a68094eeed34a8a9"
              }
             ],
             "file_str": "",
             "hope_accept_time": "",
             "hope_complete_time": "",
             "partnerid": "sdk284",
             "recordid": "",
             "ticket_code": "20200326000001",
             "ticket_content": "三个好感动",
             "ticket_from": "4",
             "ticket_level": "0",
             "ticket_status": "1",
             "ticket_title": "重复点击回复",
             "ticketid": "2831ceace38c45649840374a08d321bd",
             "update_agent_name": "小丽",
             "userid": "9a4da303f00b4f5295459070edb6b34a",
             "voice_url": ""
            },
            {
               "ticketid":"23ddfbcd7de8472c93e4385d6195dfd5",
               "companyid":"40d8940f1e854642b41f7c21f790b8e3",
               "ticket_code": "202004200000001",
               "is_reminder": "1",
               "reminder_agentid":"587d3293ff794d7785a33d9a0695ea32",
               "reminder_agent_name": "在线203",
               "reminder_remark": "催单信息",
               "reminder_time": "2020-04-20 12:35:30",
               "update_datetime": "2020-04-20 12:35:30"
            }
        ],
        "page_count": 1,
        "page_no": 1,
        "page_size": 15,
        "ret_code": "000000",
        "ret_msg": "操作成功",
        "total_count": 2
    }
    
    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
    # ● 离线数据文件下载接口

    接口说明:

    可通过调用该接口来获取工单业务模块的原始数据,可用于企业对数据归档或做数据分析等。

    注意:

    若需要使用该接口下载离线数据,需提前通知智齿进行数据整理安排,否则无法下载到数据。

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/wb/5/data/export_data
    
    1

    请求参数:

    参数 类型 必填 描述
    task_type String 是 任务类型,此处获取工单模块的数据需要传固定值:6
    date String 是 日期(yyyy-MM-dd)

    请求示例:

    curl https://www.sobot.com/api/wb/5/data/export_data 
    -X POST 
    -H 'content-type: application/json' 
    -H 'token: 4ac37cb2e9c740dba4b75a34d5358802' 
    -d '{
            "task_type":  "6",
            "date": "2019-11-05",
        }'
    
    1
    2
    3
    4
    5
    6
    7
    8

    返回参数:

    字段 数据类型 必填 描述
    updateTime Long 是 工单更新时间(秒)
    startType Integer 是 工单发起人类型,0 坐席;1客户
    startName String 是 工单发起人姓名
    companyId String 是 工单所属公司ID
    ticketId String 是 工单ID
    ticketCode String 是 工单编号
    ticketTitle String 是 工单标题
    ticketContent String 是 问题描述
    ticketStatus Integer 是 工单状态,0未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticketLevel Integer 是 工单级别,0低,1中,2高,3紧急
    ticketFrom Integer 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言 ,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13语音留言,14微信小程序-在线工作台,15企业微信-在线工作台,16微信小程序客户留言,17企业微信客户留言
    createTime Long 是 工单创建时间(秒)
    dealGroupId String 否 受理客服组ID
    dealGroupName String 否 受理客服组名称
    dealUserId String 否 受理客服ID
    dealUserName String 否 受理客服名称
    hopeAcceptTime String 否 SLA规定的首次响应时间,例如:2019-11-11 13:01:30
    hopeCompleteTime String 否 SLA规定的首次解决时间,例如:2019-11-11 13:05:00
    customerId String 是 关联客户ID
    nick String 是 关联客户昵称
    uname String 否 关联客户真实姓名
    tel String 否 关联客户电话,多个电话之间以分号分隔
    email String 否 关联客户邮箱,多个邮箱之间以分号分隔
    ticketTypeName String 是 工单分类
    recordId String 否 记录ID
    copyUser String 否 抄送客服 ID
    resultList List 否 工单自定义字段
    dealList List 否 工单全部回复
    fileStr String 否 所有附件路径,以英文分号隔开
    updateLogList List 否 工单操作记录

    resultList工单自定义字段:

    字段 数据类型 必填 描述
    fieldId String 是 自定义字段ID
    fieldType Integer 是 自定义字段类型;1单行文本 2多行文本 3日期 4时间 5数值 6下拉列表 7复选框 8 单选框
    fieldVariable String 是 自定义字段的参数名
    title String 是 自定义字段名称
    value String 是 自定义字段值
    text String 是 选择型字段选项文本值

    dealList工单全部回复:

    字段 数据类型 必填 描述
    replyTitle String 是 回复标题
    replyContent String 是 回复内容
    replyType String 是 回复类型,0:所有人可见;1:仅坐席可见
    replyTime Long 是 回复时间(秒)
    startType Integer 是 回复人类型;0 坐席;1 客户
    updateUserName String 是 回复人名称
    updateUserId String 是 回复人ID
    fileList List 否 回复附件列表

    fileList回复附件列表:

    字段 数据类型 必填 描述
    fileName String 是 附件名称
    fileUrl String 是 附件路径
    fileType String 是 附件类型

    updateLogList工单操作记录:

    字段 数据类型 必填 描述
    updateTitle String 是 操作记录标题
    updateContent String 是 操作记录内容
    updateTime Long 是 操作记录时间(秒)
    startType Integer 是 操作人类型;0 坐席,1 客户
    updateServiceName String 是 操作人名称

    返回示例:

    {
        "ticketTitle": "测试工单",
        "dealUserId": "27a3f720bdd8446ea243017f1d2b626f",
        "ticketLevel": 0,
        "dealUserName": "张三",
        "startType": 0,
        "updateLogList": [
            {
                "startType": 0,
                "updateTime": 1591847016,
                "updateServiceName": "张三",
                "updateContent": "{\"工单分类\":\"1\",\"工单标题\":\"测试工单\",\"问题描述\":\"测试附件存储日志\",\"问题描述附件\":\"夜晚.jpg\",\"自定义字段\":\"callid:驱蚊器二群;公司id:驱蚊器翁;问题发生频次:单个坐席偶发;在线会话id 附截图:驱蚊器;app&sdk 版本号,反馈机型;:驱蚊器;是否为软电话:否;问题类型:智齿app\",\"优先级\":\"低\",\"工单状态\":\"尚未受理\"}",
                "updateTitle": "工单创建"
            },
            {
                "startType": 0,
                "updateTime": 1591847020,
                "updateServiceName": "张三",
                "updateContent": "{\"受理客服\":\"张三\"}",
                "updateTitle": "工单更新"
            },
            {
                "startType": 0,
                "updateTime": 1591847020,
                "updateServiceName": "张三",
                "updateContent": "{\"受理客服\":\"张三\"}",
                "updateTitle": "工单更新"
            },
            {
                "startType": 0,
                "updateTime": 1591847352,
                "updateServiceName": "张三",
                "updateContent": "{\"回复附件\":\"沙漠绿洲.jpg,云.jpg\"}",
                "updateTitle": "工单更新"
            },
            {
                "startType": 0,
                "updateTime": 1591850735,
                "updateServiceName": "张三",
                "updateContent": "{\"工单状态\":\"已关闭\"}",
                "updateTitle": "工单更新"
            }
        ],
        "updateTime": 1591850735,
        "dealGroupName": "",
        "dealList": [
            {
                "replyTime": 1591847016,
                "replyType": "0",
                "updateUserId": "27a3f720bdd8446ea243017f1d2b626f",
                "updateUserName": "张三",
                "startType": 0,
                "replyContent": "<p>测试附件存储日志</p>",
                "fileList": [
                    {
                        "fileName": "夜晚.jpg",
                        "fileUrl": "https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/夜晚_15918469714jpg",
                        "fileType": "jpg"
                    }
                ]
            },
            {
                "replyTime": 1591850735,
                "replyType": "1",
                "updateUserId": "27a3f720bdd8446ea243017f1d2b626f",
                "updateUserName": "张三",
                "startType": 0,
                "replyTitle": "回复 张三 zhangjc@sobot.com",
                "fileList": []
            },
            {
                "replyTime": 1591847352,
                "replyType": "1",
                "updateUserId": "27a3f720bdd8446ea243017f1d2b626f",
                "updateUserName": "张三",
                "startType": 0,
                "replyTitle": "回复 张三 zhangjc@sobot.com",
                "fileList": [
                    {
                        "fileName": "云.jpg",
                        "fileUrl": "https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/云_15918473508jpg",
                        "fileType": "jpg"
                    },
                    {
                        "fileName": "沙漠绿洲.jpg",
                        "fileUrl": "https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/沙漠绿洲_15918473472jpg",
                        "fileType": "jpg"
                    }
                ]
            }
        ],
        "nick": "啊",
        "companyId": "651b00ce4b5a43969b63ac934e4f0ba2",
        "ticketFrom": 0,
        "createTime": 1591847016,
        "ticketStatus": 99,
        "customerId": "570f8e431f9843239ed083f748015412",
        "ticketContent": "<p>测试附件存储日志</p>",
        "dealGroupId": "",
        "fileStr": ";https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/夜晚_15918469714jpg;https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/夜晚_15918469714jpg;https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/云_15918473508jpg;https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/夜晚_15918469714jpg;https://img.sobot.com/console/651b00ce4b5a43969b63ac934e4f0ba2/ticket/沙漠绿洲_15918473472jpg",
        "ticketCode": 20200611000021,
        "resultList": [
            {
                "fieldId": "271c5b23bd914d81950e68755b7c43b4",
                "fieldType": 1,
                "fieldVariable": "customField15",
                "title": "公司id",
                "value": "驱蚊器翁"
            },
            {
                "fieldId": "411c7ec298de4084aeb1f7cce70c836e",
                "fieldType": 6,
                "fieldVariable": "customField85",
                "text": "单个坐席偶发",
                "title": "问题发生频次",
                "value": "579514320725440"
            },
            {
                "fieldId": "8ed8518cabc641739958d9ec64f069f5",
                "fieldType": 8,
                "fieldVariable": "customField80",
                "text": "否",
                "title": "是否为软电话",
                "value": "575543181142367"
            },
            {
                "fieldId": "63f0aab22a2b4760a2d9d4a58f2ff938",
                "fieldType": 1,
                "fieldVariable": "customField20",
                "title": "callid",
                "value": "驱蚊器二群"
            },
            {
                "fieldId": "f8b00f7f1df948b7b4233ac23bd419bd",
                "fieldType": 6,
                "fieldVariable": "customField97",
                "text": "智齿app",
                "title": "问题类型",
                "value": "587347957556856"
            },
            {
                "fieldId": "6da2c7ee7bd040faa9328fcbf06efd17",
                "fieldType": 1,
                "fieldVariable": "customField99",
                "title": "app&sdk 版本号,反馈机型;",
                "value": "驱蚊器"
            },
            {
                "fieldId": "5fe20ad11906453f8db291d834e3d130",
                "fieldType": 1,
                "fieldVariable": "customField102",
                "title": "在线会话id 附截图",
                "value": "驱蚊器"
            },
            {
                "fieldId": "01c370c4eac64be7a7b784208e9d15ae",
                "fieldType": 10,
                "fieldVariable": "customField120",
                "title": "333",
                "value": "[[{\"id\":\"9521446615114883a8a091f41a6b576d\",\"text\":\"\",\"value\":\"\"}]]"
            }
        ],
        "ticketId": "c3f25978eb5d4d4e95f02f1db570a1b7",
        "startName": "张三"
    }
    
    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
    # ● 工单回复信息删除

    接口说明:

    删除工单的回复信息。

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/del_reply_infos
    
    1

    请求参数:

    参数 类型 必填 描述
    ticketid String 是 工单ID
    replyid String 是 工单回复ID,删除工单回复信息对应的回复记录ID
    agentid String 否 操作坐席ID

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/del_reply_infos -X POST -H 'content-type: application/json' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' 
    -d '{
            "ticketid":" e1ccfd1725074f868d9e14dde5853d3d",
            "agentid":"0a37c8156d094311890e48fbc06501c4",
            "replyid":"c11897076adc4dd98f7a64f026fc2632"
        }'
    
    1
    2
    3
    4
    5
    6
    7

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
       "ret_code": "000000",
       "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4
    # ● 工单更换客户信息

    接口说明:

    更换工单绑定的客户信息

    请求方式:

    POST

    请求地址:

     https://www.sobot.com/api/ws/5/ticket/update_ticket_user
    
    1

    请求参数:

    参数 类型 必填 描述
    ticket_id String 否 工单ID(工单编码和工单ID至少填一个)
    ticket_code String 否 工单编码(工单编码和工单ID至少填一个)
    user_id String 是 客户ID

    请求示例:

    curl https://www.sobot.com/api/ws/5/ticket/update_ticket_user?ticket_id=9be168721dfd4824a107e177035bcf4f&ticket_code=20250120000005&user_id=94ad902f1bbe4405a672bcbd1aca2dce -X POST -H 'content-type: multipart/form-data;' 
    -H 'token:4ac37cb2e9c740dba4b75a34d5358802' 
    
    1
    2

    返回参数:

    参数 类型 必填 描述
    ret_code String 是 返回编码
    ret_msg String 是 返回信息

    返回示例:

    {
       "ret_code": "000000",
       "ret_msg": "操作成功"
    }
    
    1
    2
    3
    4

    # 工单消息转发

    # ● 工单信息

    接口说明:

    推送工单信息

    访问方式:

    详见回调消息参数说明, 点击此处跳转 (opens new window)

    返回内容:

    参数 类型 必填 描述
    sys_code String 是 产品编码,4
    type String 是 消息类型,ticket
    content List 是 消息内容

    content集合:

    参数 类型 必填 描述
    companyid String 是 企业ID,适用一个公司多个超管帐号或者多个分公司需要分别统计的情况
    ticketid String 是 工单ID
    ticket_code String 是 工单编号
    ticket_title String 是 工单标题,最大长度为100
    ticket_content String 是 问题描述,最大长度为5000
    ticket_type_name String 是 工单分类名称,多级分类之间用/分隔
    ticket_status Integer 是 工单状态,0未受理,1受理中,2等待回复,3已解决,99已关闭,98已删除,包括自定义工单状态
    ticket_level Integer 是 工单级别,0低,1中,2高,3紧急
    ticket_from Integer 是 工单来源,0工单中心,1 桌面网站客户留言,2 移动网站客户留言,3 微信公众号客户留言,4 APP客户留言 ,6 桌面网站-在线工作台,7客户中心,8呼叫中心,9微信公众号-在线工作台,10 移动网站-在线工作台,11 APP-在线工作台,12 邮件留言,13 语音留言,14 微信小程序-在线工作台,15 企业微信-在线工作台,16 微信小程序客户留言,17 企业微信客户留言,18 批量导入,19 微信客服,20 企业微信-智客,21 机器人留言
    file_str String 否 附件路径,多个附件之间用英文分号分隔
    deal_groupid String 否 受理客服组ID
    deal_group_name String 否 受理客服组名称
    deal_agentid String 否 受理客服ID
    deal_agent_name String 否 受理客服名称
    copy_agent String 否 抄送客服
    hope_accept_time String 否 SLA规定的首次响应时间,具体的时间点,例如:2019-11-11 13:01:30
    hope_complete_time String 否 SLA规定的首次解决时间,具体的时间点,例如:2019-11-11 13:05:00
    userid String 是 关联客户ID
    user_nick String 是 关联客户昵称
    user_name String 否 关联客户真实姓名
    user_tels String 否 关联客户电话,多个电话之间以分号分隔
    user_emails String 否 关联客户邮箱,多个邮箱之间以分号分隔
    partnerid String 否 关联客户对接ID
    enterpriseid String 否 关联客户企业ID
    enterprise_name String 否 关联客户企业名称
    recordid String 否 记录ID,工单来源是呼叫中心这个是呼叫记录ID,来源是在线工作台-桌面网站客服提交这个是会话记录ID
    update_name String 是 更新人名称,当前编辑工单或回复工单的操作人姓名
    update_time String 是 更新时间,当前编辑工单保存或回复工单提交的时间具体的时间点,例如:2019-11-11 12:00:30
    reply_content String 否 回复工单的内容
    is_receipt String 否 接单信息标识,是否接单信息 0 否, 1 是
    is_reminder String 是 催单信息标识,是否催单信息 0 否, 1 是
    reminder_agentid String 否 催单坐席ID
    reminder_agent_name String 否 催单坐席名称
    reminder_remark String 否 催单备注
    reminder_time String 否 催单时间,具体的时间点,例如:2020-04-20 12:35:30
    extend_fields_list List 否 工单自定义字段集合
    partner_fields_list List 否 工单对接型字段集合
    reply_type String 否 工单回复类型 0所有人可见 1 仅坐席可见
    start_type String 否 工单发起人类型 0 坐席 1客户
    create_groupids String 否 创建客服组ID,多个采用英文逗号","隔开
    closed_time String 否 工单关闭时间,例如:2022-08-10 10:14:05
    first_accept_time String 否 工单首次响应时间,例如:2022-08-10 10:14:05
    first_complete_time String 否 工单首次解决时间,例如:2022-08-10 10:14:05
    concern_serviceid String 否 工单关注人ID,多个采用英文逗号","隔开
    first_contact_type Int 否 优先联系方式的类型 1:邮箱 2: 手机号
    first_contact_info String 否 优先联系方式的值
    relation_ticket_codes String 否 关联工单编号,多个采用英文逗号","隔开
    start_userid String 否 工单发起人ID

    extend_fields_list集合:

    参数 类型 必填 描述
    fieldid String 是 自定义字段ID
    field_type String 是 自定义字段类型,1单行文本 2多行文本 3日期 4时间 5数值 6下拉列表 7复选框 8 单选框 11 地区
    field_name String 是 自定义字段名称
    field_value String 是 自定义字段值
    field_text String 是 选择型字段选项文本值

    partner_fields_list集合:

    参数 类型 必填 描述
    fieldid String 是 字段ID
    field_name String 是 字段名称
    fidle_value String 是 字段值

    返回示例:

    非催单信息:

    {
        "sys_code": "4",
        "type": "ticket",
        "content": [
            {
                "companyid": "5cc2c708202d4defaf72d4bcac362a55",
                "ticketid": "56b7954e8ff1428ea39cd5a8136de9e1",
                "ticket_code": "20191111000001",
                "ticket_title": "测试工单",
                "ticket_content": "测试工单",
                "ticket_type_name": "咨询",
                "ticket_status": "0",
                "ticket_level":"0",
                "ticket_from":"0",
                "file_str": "",
                "deal_groupid": "5436dc5288b645188aedc2a21f66a4ba",
                "deal_group_name": "咨询客服组",
                "deal_agentid": "0a37c8156d094311890e48fbc06501c4",
                "deal_agent_name": "ming",
                "copy_agent": "",
                "hope_accept_time": "2019-11-11 13:01:30",
                "hope_complete_time": "2019-11-11 13:05:00",
                "userid": "3dff300e008f4c4a8c399751ddb7b8cc",
                "user_nick": "北京客户",
                "partnerid": "",
                "enterpriseid": "",
                "enterprise_name": "",
                "recordid": "",
                "reply_content": "回复工单",
                "update_name": "客服一",
                "update_time": "2019-11-11 12:00:30",
                "is_reminder": "0",
                "reply_type": "0",
                "start_type": "0",
                "extend_fields_list": [ 
                    {
                        "fieldid": "1",
                        "field_type": 1,
                        "field_text": "",
                        "field_name": "微信",
                        "field_value": "21332112"
                    },
                    {
                        "fieldid": "4",
                        "field_type": 6,
                        "field_text": "下拉一",
                        "field_name": "下拉列表",
                        "field_value": "500862697708553"  
                    }
                ],
                "partner_fields_list": [ 
                    {
                        "fieldid": " a974d9ac9cbc43388f80e6e8c968ddc9 ",
                        "field_value ": " http://www.sobot.com",
                        "field_name": "商品链接"
                    },
                    {
                        "fieldid": " 1b17bbfa1e48447ebfce11a66ff5d802 ",
                        "field_name": "商品备注",
                        "field_value": " 1500元"          
                    }
                ]
            }
        ]
    }
    
    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

    催单信息:

    {
        "sys_code": "4",
        "type": "ticket",
        "content": [
            {
                "companyid": "5cc2c708202d4defaf72d4bcac362a55",
                "ticketid": "56b7954e8ff1428ea39cd5a8136de9e1",
                "ticket_code": "20191111000001",
                "is_reminder": "1",
                "reminder_remark": "回复工单",
                "reminder_agentid": "0a37c8156d094311890e48fbc06501c4",
                "reminder_agent_name": "客服一",
                "reminder_time": "2020-04-20 12:00:30",
                "update_time": "2020-04-20 12:00:30"
            }
        ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17

    请求响应示例:

    按此响应示例对接可进行消息确认,便于双方统计到的数据进行对比

    { 
         "data":{ 
            "receiveTime":"20191209115658" 
         }, 
         "retCode":"000000", 
         "retMsg":"数据接收成功" 
    }
    
    1
    2
    3
    4
    5
    6
    7

    # 接口返回状态编码

    # ● 操作成功
    返回编码 编码说明
    000000 操作成功(除此编码以外的编码为错误编码)
    # ● 系统异常
    返回编码 编码说明
    700046 当前企业所购的版本不支持使用接口(免费版、海外团队版不可使用)
    900001 token为空
    900002 token已失效,请重新获取
    900003 signature错误
    900004 没有找到公司的api配置信息
    999999 系统未知异常
    # ● 业务异常
    返回编码 编码说明
    400001 创建时间不能为空
    400002 创建结束时间不能小于创建开始时间
    400003 查询创建时间段不能超过一个月
    400004 请求参数不能为空
    400005 时间格式不正确
    400006 操作坐席ID不能为空
    400007 操作坐席ID不正确
    400008 工单分类ID不能为空
    400009 工单状态不能为空
    400010 工单来源不能为空
    400011 工单级别不能为空
    400012 技能组ID不能为空
    400013 受理客服组与受理客服不匹配
    400014 请求失败
    400015 开始时间不能为空
    400016 获取工单信息已过期,请刷新!
    400017 更新时间不能为空
    400018 更新结束时间不能小于更新开始时间
    400019 查询更新时间段不能超过一个月
    400020 工单信息不存在
    400021 工单回复信息不存在
    400057 结束时间不能小于开始时间
    400308 名称已存在,请重新输入
    400309 名称不能为空
    400310 名称不能与默认名称重复
    400311 工单状态不存在
    400312 最多支持30个工单状态
    400314 工单状态错误
    400401 地区编码不正确
    上次更新: 2025/2/7 16:15:31

    Android SDK→

    最近更新
    01
    运营支持 API
    03-03
    02
    CRM 对接方案
    12-05
    03
    大模型机器人API
    09-09
    更多文章>
    Theme by Vdoing
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式