# 外部联系人分页

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 外部联系人分页
      deprecated: false
      description: >-
        <div style="background: linear-gradient(135deg, rgba(255, 213, 145,
        0.45) 0%, rgba(255, 255, 255, 0.06) 100%); border: 1px solid rgba(255,
        236, 202, 0.7); border-radius: 12px; padding: 20px 28px; margin-bottom:
        20px; box-shadow: 0 4px 12px rgba(250, 140, 22, 0.08)">
          <h3 style="margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: inherit; border: none; padding-bottom: 0;">外部联系人分页</h3>
          <p style="margin: 0; font-size: 14px; color: inherit; line-height: 1.6">通过查询 外部联系人分页 获取 userid ，再调用 <a href="api-344613868" style="">联系人详情 - 批量</a> 接口进行查询联系人信息。<br> 查询后保存 ，不用一直调用，后续可以根据回调保存数据</p>
        </div>
      tags:
        - API参考/客户管理/联系人模块
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: X-QIWEI-TOKEN
          in: header
          description: >-
            <p style="margin: 0; font-size: 14px; color: inherit; line-height:
            1.6;">进入 <a href="https://new.qiweapi.com/tokens" style="color:
            inherit; text-decoration: underline; font-weight: 600;">应用凭证</a>，复制
            <code style="color: inherit; background: rgba(82, 196, 26, 0.08);
            border: 1px solid rgba(82, 196, 26, 0.1); padding: 2px 4px;
            border-radius: 3px;">TokenId</code>。</p>
          required: true
          example: '{{tokenId}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: 执行方法
                  description: >-
                    <code style="color: inherit; background: rgba(82, 196, 26,
                    0.08); border: 1px solid rgba(82, 196, 26, 0.1); padding:
                    2px 4px; border-radius:
                    3px;">/contact/getWxContactList</code>
                params:
                  type: object
                  properties:
                    guid:
                      type: string
                      title: 设备 ID
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">设备唯一标识 <code style="color: inherit;
                        background: rgba(82, 196, 26, 0.08); border: 1px solid
                        rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                        3px;">guid</code>，由「创建设备」接口返回，业务接口必传。</p>
                    currentSeq:
                      type: integer
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">联系人比较多时，可以用此字段分页查询。首次传0，之后传上一次查询返回的值;
                        传这个值可以只拉取出现变更的好友;</p>
                      title: 游标
                    limit:
                      type: integer
                      title: 每页数量
                      description: ''
                    bizType:
                      type: integer
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">1、外部联系人信息变动的数据 2、好友申请的数据
                        收到好友申请通知时，需要通过这个值来拉取好友申请通知。</p>
                      title: 业务类型
                  required:
                    - guid
                    - currentSeq
                    - limit
                    - bizType
                  x-apifox-orders:
                    - guid
                    - currentSeq
                    - limit
                    - bizType
                  title: 请求参数
              required:
                - method
                - params
              x-apifox-orders:
                - method
                - params
            example:
              method: /contact/getWxContactList
              params:
                guid: '{{guid}}'
                currentSeq: 0
                limit: 1
                bizType: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    title: 状态码
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">状态码，<code style="color: inherit;
                      background: rgba(82, 196, 26, 0.08); border: 1px solid
                      rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                      3px;">0</code> 成功。</p>
                  data:
                    type: object
                    properties:
                      currentSeq:
                        type: integer
                        description: >-
                          <p style="margin: 0; font-size: 14px; color: inherit;
                          line-height: 1.6;">下次请求时应传入的currentSeq</p>
                        title: 分页游标
                      contactCount:
                        type: integer
                        title: 联系人数量
                        description: ''
                      hasMore:
                        type: integer
                        title: 是否有更多
                        description: |+
                          hasMore=0  ，无分页  <br>   hasMore= 1，有分页

                      contactList:
                        type: array
                        items:
                          type: object
                          properties:
                            acctid:
                              type: string
                              title: Acct ID
                              description: ''
                            addTime:
                              type: integer
                              title: 添加时间
                              description: ''
                            alias:
                              type: string
                              title: 别名
                              description: ''
                            avatarUrl:
                              type: string
                              title: 头像url
                              description: ''
                            contactType:
                              type: integer
                              title: 好友类型
                              description: >-
                                <p style="margin: 0; font-size: 14px; color:
                                inherit; line-height:
                                1.6;">0=双删；8=我删客户；2049=客户删我；2057=正常好友</p>
                            corpFullName:
                              type: string
                              title: 企业Full名称
                              description: ''
                            corpId:
                              type: string
                              title: 企业id
                              description: ''
                            corpName:
                              type: string
                              title: 企业名称
                              description: ''
                            desc:
                              type: string
                              title: 描述
                              description: ''
                            gender:
                              type: integer
                              title: 性别
                              description: >-
                                <p style="margin: 0; font-size: 14px; color:
                                inherit; line-height: 1.6;">0未，1男，2女</p>
                            groupId:
                              type: string
                              title: 分组Id
                              description: ''
                            internationCode:
                              type: string
                              title: 国际码
                              description: ''
                            itemFlag:
                              type: integer
                              title: 项标志
                              description: ''
                            job:
                              type: string
                              title: 职位
                              description: ''
                            labelList:
                              type: 'null'
                              title: 标签列表
                              description: ''
                            mobile:
                              type: string
                              title: 手机号
                              description: ''
                            nickname:
                              type: string
                              title: 昵称
                              description: ''
                            position:
                              type: string
                              title: 职位
                              description: ''
                            realName:
                              type: string
                              title: 真实姓名
                              description: ''
                            remark:
                              type: string
                              title: 备注
                              description: ''
                            sourceInfo:
                              type: object
                              properties:
                                addSource:
                                  type: integer
                                  description: >-
                                    <p style="margin: 0; font-size: 14px; color:
                                    inherit; line-height: 1.6;">103 -> 通过扫一扫添加
                                    51 -> 对方通过扫一扫添加 2 -> 通过微信好友添加 61 ->
                                    对方通过群聊"xxxxx"添加 60 -> 对方通过搜索手机号添加 62 ->
                                    对方通过"xxxxx"分享的名片添加 113 -> 由"xxxxx"共享</p>
                                  title: 客户添加来源
                                applyMode:
                                  type: integer
                                  title: 申请模式
                                  description: ''
                                opUserId:
                                  type: integer
                                  title: Op用户Id
                                  description: ''
                                sourceRoomId:
                                  type: integer
                                  title: Source群Id
                                  description: ''
                              required:
                                - addSource
                                - applyMode
                                - opUserId
                                - sourceRoomId
                              x-apifox-orders:
                                - addSource
                                - applyMode
                                - opUserId
                                - sourceRoomId
                              title: Source信息
                              description: ''
                            userId:
                              type: string
                              title: 用户id
                              description: ''
                            unionid:
                              type: string
                              title: Union 标识
                              description: ''
                            applyReason:
                              type: string
                              title: 申请理由
                              description: ''
                            companyRemark:
                              type: string
                              title: 企业备注
                              description: ''
                            mobileRemark:
                              type: array
                              items:
                                type: string
                                title: mobileRemark
                                description: ''
                              title: 手机号备注
                              description: ''
                            addCustomerTime:
                              type: integer
                              title: Add客户时间
                              description: ''
                            ' seq':
                              type: integer
                              description: >-
                                <p style="margin: 0; font-size: 14px; color:
                                inherit; line-height: 1.6;">（最近一次）编辑seq</p>
                              title: 序号
                            createSeq:
                              type: integer
                              title: 创建序号
                              description: ''
                          required:
                            - acctid
                            - addTime
                            - alias
                            - avatarUrl
                            - contactType
                            - corpFullName
                            - corpId
                            - corpName
                            - desc
                            - gender
                            - groupId
                            - internationCode
                            - itemFlag
                            - job
                            - labelList
                            - mobile
                            - nickname
                            - position
                            - realName
                            - remark
                            - sourceInfo
                            - userId
                            - unionid
                            - applyReason
                            - companyRemark
                            - mobileRemark
                            - addCustomerTime
                            - ' seq'
                            - createSeq
                          x-apifox-orders:
                            - acctid
                            - addTime
                            - alias
                            - avatarUrl
                            - contactType
                            - corpFullName
                            - corpId
                            - corpName
                            - desc
                            - gender
                            - groupId
                            - internationCode
                            - itemFlag
                            - job
                            - labelList
                            - mobile
                            - nickname
                            - position
                            - realName
                            - remark
                            - sourceInfo
                            - userId
                            - unionid
                            - applyReason
                            - companyRemark
                            - mobileRemark
                            - addCustomerTime
                            - ' seq'
                            - createSeq
                        title: 联系人列表
                        description: ''
                    required:
                      - currentSeq
                      - contactCount
                      - hasMore
                      - contactList
                    x-apifox-orders:
                      - currentSeq
                      - contactCount
                      - hasMore
                      - contactList
                    title: 响应数据
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">业务数据。</p>
                  msg:
                    type: string
                    title: 创建seq
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">返回说明。</p>
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
              example: |-
                {
                    "code": 0,
                    "data": {
                        "currentSeq": 9221725,
                        "contactCount": 1,
                        "hasMore": 1,
                        "contactList": [
                            {
                                "acctid": "",
                                "addTime": 1599479231,
                                "alias": "",
                                "avatarUrl": "http://wx.qlogo.cn/mmhead/x80nypPWjznPvh3CjIc9TKg**********ziaGeU/0",
                                "contactType": 2057,
                                "corpFullName": "",
                                "corpId": "197032**********",
                                "corpName": "",
                                "desc": "",
                                "gender": 2,
                                "groupId": "0",
                                "internationCode": "",
                                "itemFlag": 0,
                                "job": "",
                                "labelList": [
                                    {
                                        "labelId": 14333357796586
                                    }
                                ],
                                "unionid": "ozynFsaXJhjOSPHvxXaCWs",
                                "applyReason": "",
                                "addCustomerTime": 1723711412,
                                "companyRemark": "foo",
                                "mobileRemark": [
                                    "+86-17602101010"
                                ],
                                "mobile": "",
                                "nickname": "fasefFJDFdfdf==",
                                "position": "",
                                "realName": "",
                                "remark": "",
                                "sourceInfo": {
                                    "addSource": 2,
                                    "applyMode": 1,
                                    "opUserId": 0,
                                    "sourceRoomId": 0
                                },
                                "userId": "788130**********"
                                "seq": 159000002,
                                "createSeq": 15900099
                            }
                        ]
                    },
                    "msg": "成功"
                }
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API参考/客户管理/联系人模块
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-344613869-run
components:
  schemas: {}
  securitySchemes:
    apiKey:
      type: apikey
      in: header
      name: X-WECOM-TOKEN
servers:
  - url: https://new.qiweapi.com/qiwe
    description: 正式环境
security: []

```
