# Conversation Enquiry 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/conversation/enquiry:
    post:
      summary: 'Conversation Enquiry '
      deprecated: false
      description: ดึงข้อมูล Conversations หลายข้อมูล
      tags:
        - Venio/Conversation
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ของลูกค้า
          required: true
          example: <Your-Subscription-Key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                staffCodes:
                  type: array
                  items:
                    type: string
                  description: รายการรหัสพนักงาน
                customerCodes:
                  type: array
                  items:
                    type: string
                  description: รายการรหัสลูกค้า
                dateStart:
                  type: string
                  description: |-
                    วันที่เริ่ม 
                    * กรณีไม่ได้ใส่มาจะ default = วันที่ยิง api
                  nullable: true
                dateEnd:
                  type: string
                  description: |-
                    วันสิ้นสุด
                    * กรณีไม่ได้ใส่มาจะ default = วันที่ยิง api
                  nullable: true
                actionIds:
                  type: array
                  items:
                    type: integer
                  description: |
                    รายการเลขสถานะการติดต่อ
                    New = 110061,
                    Followup = 110062,
                    Unqualified = 110063,
                    Interested = 110064,
                    Quantified = 110065,
              x-apidog-orders:
                - staffCodes
                - customerCodes
                - actionIds
                - dateStart
                - dateEnd
            example: "{\r\n    \"staffCodes\": [\r\n        \"string\"\r\n    ],\r\n    \"customerCodes\": [\r\n        \"string\"\r\n    ],\r\n    \"actionIds\": [\r\n        110062,\r\n        110063\r\n    ],\r\n    \"dateStart\": \"string\", //format \"YYYY-MM-DD\"\r\n    \"dateEnd\": \"string\" //format \"YYYY-MM-DD\"\r\n}"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: "สถานะ\_\_code\_ของ\_httpเช่น200\_Ok201\_Created400\_BadRequest401\_Unauthorized404\_Record\_not\_found500\_Internal\_Server\_Error"
                  data:
                    type: object
                    properties:
                      value:
                        type: object
                        properties:
                          data:
                            type: array
                            items:
                              type: object
                              properties:
                                activityId:
                                  type: integer
                                  description: รหัสกิจกรรม
                                userId:
                                  type: string
                                  description: รหัสผู้ใช้
                                groupId:
                                  type: integer
                                  description: รหัสกลุ่ม
                                planStart:
                                  type: string
                                  description: วันที่เริ่มแผน
                                planEnd:
                                  type: string
                                  description: วันสิ้นสุดของแผน
                                dateStart:
                                  type: string
                                  description: วันที่เริ่ม
                                dateEnd:
                                  type: string
                                  description: วันสิ้นสุด
                                keyActivity:
                                  type: string
                                  description: key ของกิจกรรม
                                staffName:
                                  type: string
                                  description: ชื่อของstaff
                                statusName:
                                  type: string
                                  description: ชื่อสถานะ
                                statusId:
                                  type: integer
                                  description: รหัสสถานะ
                                dateProfileModified:
                                  type: string
                                  description: เวลาแก้ไข modified
                                customerId:
                                  type: integer
                                  description: รหัสลูกค้า
                                  nullable: true
                                subject:
                                  type: string
                                  description: หัวข้อ
                                latitude:
                                  type: number
                                  description: ละติจูด
                                  nullable: true
                                longitude:
                                  type: number
                                  description: ลองจิจูด
                                  nullable: true
                                dateCheckin:
                                  type: string
                                  description: เวลาทำการ checkin
                                  nullable: true
                                dateCheckout:
                                  type: string
                                  description: เวลาทำการ checkout
                                  nullable: true
                                staffs:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      userId:
                                        type: string
                                        description: รหัสผู้ใช้งาน
                                      username:
                                        type: string
                                        description: ชื่อผู้ใช้งาน
                                      companyId:
                                        type: integer
                                        description: รหัสบริษัท
                                      companyName:
                                        type: string
                                        description: ชื่อบริษัท
                                      teamId:
                                        type: integer
                                        description: รหัสทีม
                                      teamName:
                                        type: string
                                        description: ชื่อทีม
                                      staffCode:
                                        type: string
                                        description: รหัสพนักงาน
                                      title:
                                        type: string
                                        description: หัวข้อ
                                      firstname:
                                        type: string
                                        description: ชื่อต้น
                                      lastname:
                                        type: string
                                        description: นามสกุล
                                      fullname:
                                        type: string
                                        description: ชื่อเต็ม
                                      nickname:
                                        type: string
                                        description: ชื่อเล่น
                                      position:
                                        type: string
                                        description: ตำแหน่ง
                                      email:
                                        type: string
                                        description: email
                                      phoneNumber:
                                        type: string
                                        description: หมายเลขโทรศัพท์
                                      orgString:
                                        type: string
                                        description: โครงสร้างตามสายงาน
                                      orgLevel:
                                        type: integer
                                        description: ระดับองค์กร
                                      latitude:
                                        type: number
                                        description: ละติจูด
                                      longitude:
                                        type: number
                                        description: ลองจิจูด
                                      location:
                                        type: string
                                        description: ที่ตั้ง
                                      locationName:
                                        type: string
                                        description: ชื่อที่ตั้ง
                                      isActive:
                                        type: boolean
                                        description: >-
                                          <p>ใช้งานอยู่หรือไม่<br>true=ใช่<br>false=ไม่ใช่งาน</p>
                                      createdByUserId:
                                        type: string
                                        description: รหัสผู้สร้าง
                                      hasPicture:
                                        type: boolean
                                        description: มีรูปหรือไม่
                                      dateCreated:
                                        type: string
                                        description: เวลาสร้าง
                                      dateModified:
                                        type: string
                                        description: เวลาแก้ไข
                                      role:
                                        type: string
                                        description: หน้าที
                                      roleId:
                                        type: string
                                        description: รหัสหน้าที
                                      level:
                                        type: integer
                                        description: ระดับ
                                        nullable: true
                                      siteId:
                                        type: integer
                                        description: รหัสงาน
                                        nullable: true
                                      isAgreementPDPA:
                                        type: integer
                                        description: เป็นข้อตกลง PDPA
                                      dateAgreementPDPA:
                                        type: string
                                        description: เวลาตกลง PDPA
                                        nullable: true
                                      emailSubscription:
                                        type: integer
                                        description: email สมัครสมาชิก
                                      identityUserId:
                                        type: string
                                        description: รหัสยืนยันตัวตน
                                      uniqueName:
                                        type: string
                                        description: ชื่อเฉพาะ
                                      inAppSubscription:
                                        type: integer
                                        description: สมัครสมาชิกในแอพ
                                      userType:
                                        type: integer
                                        description: ประเภทผู้ใช้
                                    x-apidog-orders:
                                      - userId
                                      - username
                                      - companyId
                                      - companyName
                                      - teamId
                                      - teamName
                                      - staffCode
                                      - title
                                      - firstname
                                      - lastname
                                      - fullname
                                      - nickname
                                      - position
                                      - email
                                      - phoneNumber
                                      - orgString
                                      - orgLevel
                                      - latitude
                                      - longitude
                                      - location
                                      - locationName
                                      - isActive
                                      - createdByUserId
                                      - hasPicture
                                      - dateCreated
                                      - dateModified
                                      - role
                                      - roleId
                                      - level
                                      - siteId
                                      - isAgreementPDPA
                                      - dateAgreementPDPA
                                      - emailSubscription
                                      - identityUserId
                                      - uniqueName
                                      - inAppSubscription
                                      - userType
                                    required:
                                      - userId
                                      - username
                                      - companyId
                                      - companyName
                                      - teamId
                                      - teamName
                                      - staffCode
                                      - title
                                      - firstname
                                      - lastname
                                      - fullname
                                      - nickname
                                      - position
                                      - email
                                      - phoneNumber
                                      - orgString
                                      - orgLevel
                                      - latitude
                                      - longitude
                                      - location
                                      - locationName
                                      - isActive
                                      - createdByUserId
                                      - hasPicture
                                      - dateCreated
                                      - dateModified
                                      - role
                                      - roleId
                                      - isAgreementPDPA
                                      - emailSubscription
                                      - identityUserId
                                      - uniqueName
                                      - inAppSubscription
                                      - userType
                                  description: ข้อมูลพนักงาน
                                  nullable: true
                                locationName:
                                  type: string
                                  description: ชื่อสถานที
                                  nullable: true
                                location:
                                  type: string
                                  description: สถานที
                                  nullable: true
                                customerName:
                                  type: string
                                  description: ชื่อลูกค้า
                                  nullable: true
                                note:
                                  type: string
                                  description: รายละเอียดเพิ่มเติม
                                  nullable: true
                                visitPlaceId:
                                  type: string
                                  description: รหัสสถานทีปฏิบัติงาน หรือนัดพบ
                                  nullable: true
                                createdBy:
                                  type: object
                                  properties:
                                    userId:
                                      type: string
                                      description: รหัสผู้ใช้งาน
                                    username:
                                      type: string
                                      description: ชื่อผู้ใช้งาน
                                    companyId:
                                      type: integer
                                      description: รหัสบริษัท
                                    companyName:
                                      type: string
                                      description: ชื่อบริษัท
                                    teamId:
                                      type: integer
                                      description: รหัสทีม
                                    teamName:
                                      type: string
                                      description: ชื่อทีม
                                    staffCode:
                                      type: string
                                      description: รหัสพนักงาน
                                    title:
                                      type: string
                                      description: หัวข้อ
                                    firstname:
                                      type: string
                                      description: ชื่อต้น
                                    lastname:
                                      type: string
                                      description: นามสกุล
                                    fullname:
                                      type: string
                                      description: ชื่อเต็ม
                                    nickname:
                                      type: string
                                      description: ชื่อเล่น
                                    position:
                                      type: string
                                      description: ตำแหน่ง
                                    email:
                                      type: string
                                      description: email
                                    phoneNumber:
                                      type: string
                                      description: หมายเลขโทรศัพท์
                                    orgString:
                                      type: string
                                      description: โครงสร้างตามสายงาน
                                    orgLevel:
                                      type: integer
                                      description: ระดับองค์กร
                                    latitude:
                                      type: number
                                      description: ละติจูด
                                    longitude:
                                      type: number
                                      description: ลองจิจูด
                                    location:
                                      type: string
                                      description: ที่ตั้ง
                                    locationName:
                                      type: string
                                      description: ชื่อที่ตั้ง
                                    isActive:
                                      type: boolean
                                      description: >-
                                        <p>ใช้งานอยู่หรือไม่<br>true=ใช่<br>false=ไม่ใช่งาน</p>
                                    createdByUserId:
                                      type: string
                                      description: รหัสผู้สร้าง
                                    hasPicture:
                                      type: boolean
                                      description: มีรูปหรือไม่
                                    dateCreated:
                                      type: string
                                      description: เวลาสร้าง
                                    dateModified:
                                      type: string
                                      description: เวลาแก้ไข
                                    role:
                                      type: string
                                      description: หน้าที
                                    roleId:
                                      type: string
                                      description: รหัสหน้าที
                                    level:
                                      type: integer
                                      description: ระดับ
                                      nullable: true
                                    siteId:
                                      type: integer
                                      description: รหัสงาน
                                      nullable: true
                                    isAgreementPDPA:
                                      type: integer
                                      description: เป็นข้อตกลง PDPA
                                    dateAgreementPDPA:
                                      type: string
                                      description: เวลาตกลง PDPA
                                      nullable: true
                                    emailSubscription:
                                      type: integer
                                      description: email สมัครสมาชิก
                                    identityUserId:
                                      type: string
                                      description: รหัสยืนยันตัวตน
                                    uniqueName:
                                      type: string
                                      description: ชื่อเฉพาะ
                                    inAppSubscription:
                                      type: integer
                                      description: สมัครสมาชิกในแอพ
                                    userType:
                                      type: integer
                                      description: ประเภทผู้ใช้
                                  x-apidog-orders:
                                    - userId
                                    - username
                                    - companyId
                                    - companyName
                                    - teamId
                                    - teamName
                                    - staffCode
                                    - title
                                    - firstname
                                    - lastname
                                    - fullname
                                    - nickname
                                    - position
                                    - email
                                    - phoneNumber
                                    - orgString
                                    - orgLevel
                                    - latitude
                                    - longitude
                                    - location
                                    - locationName
                                    - isActive
                                    - createdByUserId
                                    - hasPicture
                                    - dateCreated
                                    - dateModified
                                    - role
                                    - roleId
                                    - level
                                    - siteId
                                    - isAgreementPDPA
                                    - dateAgreementPDPA
                                    - emailSubscription
                                    - identityUserId
                                    - uniqueName
                                    - inAppSubscription
                                    - userType
                                  required:
                                    - userId
                                    - username
                                    - companyId
                                    - companyName
                                    - teamId
                                    - teamName
                                    - staffCode
                                    - title
                                    - firstname
                                    - lastname
                                    - fullname
                                    - nickname
                                    - position
                                    - email
                                    - phoneNumber
                                    - orgString
                                    - orgLevel
                                    - latitude
                                    - longitude
                                    - location
                                    - locationName
                                    - isActive
                                    - createdByUserId
                                    - hasPicture
                                    - dateCreated
                                    - dateModified
                                    - role
                                    - roleId
                                    - isAgreementPDPA
                                    - emailSubscription
                                    - identityUserId
                                    - uniqueName
                                    - inAppSubscription
                                    - userType
                                  description: รายละเอียดผู้สร้าง
                              x-apidog-orders:
                                - activityId
                                - userId
                                - groupId
                                - planStart
                                - planEnd
                                - dateStart
                                - dateEnd
                                - keyActivity
                                - locationName
                                - location
                                - staffName
                                - statusName
                                - statusId
                                - dateProfileModified
                                - customerId
                                - customerName
                                - note
                                - subject
                                - visitPlaceId
                                - latitude
                                - longitude
                                - dateCheckin
                                - dateCheckout
                                - createdBy
                                - staffs
                              required:
                                - activityId
                                - userId
                                - groupId
                                - planStart
                                - planEnd
                                - dateStart
                                - dateEnd
                                - dateProfileModified
                                - subject
                                - keyActivity
                                - staffName
                                - statusName
                                - statusId
                        x-apidog-orders:
                          - data
                        required:
                          - data
                      statusCode:
                        type: integer
                        description: |-
                          สถานะ  code ของ httpเช่น
                          200 Ok
                          201 Created
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    x-apidog-orders:
                      - value
                      - statusCode
                    required:
                      - value
                      - statusCode
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - data
                required:
                  - httpStatusCode
                  - data
                  - statusCode
              example:
                data:
                  value:
                    total: 0
                    data:
                      - conversationId: 0
                        customerId: 0
                        customerName: string
                        customerType: 0
                        type: 0
                        typeName: string
                        outcome: 0
                        outcomeName: string
                        quantified: 0
                        quantifiedName: string
                        action: 0
                        actionName: string
                        description: string
                        dateFollowUp: 2025-03-24T09:00:00+0700
                        callMinutes: 0
                        createdByUserId: string
                        dateCreated: 2025-03-21T11:39:03+0700
                        fullname: string
                        fullnameEn: string
                        firstname: string
                        firstnameEn: string
                        lastname: string
                        lastnameEn: string
                        pictureUrl: string
                  statusCode: 200
                statusCode: 1000
                httpStatusCode: 200
          headers: {}
          x-apidog-name: OK
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  message:
                    type: string
                    description: คำบรรยาย error
                x-apidog-orders:
                  - statusCode
                  - message
                required:
                  - statusCode
                  - message
              example:
                statusCode: 401
                message: Access denied due to invalid subscription key. Mak...
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ  code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  errorMessage:
                    type: string
                    description: คำอธิบายเกี่ยวกับ error
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไหม
                      true = มี
                      false = ไม่มี
                  data:
                    type: object
                    properties:
                      authenticationSchemes:
                        type: array
                        items:
                          type: string
                        description: ค่า Enum ของ authenticationSchemes
                    x-apidog-orders:
                      - authenticationSchemes
                    required:
                      - authenticationSchemes
                    description: |-
                      ข้อมูลที่จะแสดง ไม่จำกัดรูปแบบว่าจะเป็นเช่นไร 
                      ตอนเรียกออกมาสามารเป็น Array และ Object ได้
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่ดูไม่มี permission view data เช่นลูกน้องดู activity หัวหน้า'
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
              example:
                data:
                  authenticationSchemes: []
                hasError: true
                errorMessage: Invalid access rights
                statusCode: 9503
                httpStatusCode: 403
          headers: {}
          x-apidog-name: Forbidden
        x-200:Bad Request:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไม่
                      true = มี
                      false = ไม่มี
                  errorMessage:
                    type: string
                    description: คำบรรยายerror
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  data:
                    type: object
                    properties:
                      value:
                        type: string
                        description: คำบรรยายที่เจอ error
                      statusCode:
                        type: integer
                        description: |-
                          สถานะ code ของ httpเช่น
                          200 Ok
                          201 Created
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    description: รายการ
                    x-apidog-orders:
                      - value
                      - statusCode
                    required:
                      - value
                      - statusCode
                x-apidog-orders:
                  - hasError
                  - errorMessage
                  - data
                  - statusCode
                  - httpStatusCode
                required:
                  - hasError
                  - errorMessage
                  - data
                  - statusCode
                  - httpStatusCode
              example:
                data:
                  value: Staff Code "janiefer" doesn't exist.
                  statusCode: 400
                hasError: true
                errorMessage: Invalid parameters entered
                statusCode: 1102
                httpStatusCode: 400
          headers: {}
          x-apidog-name: Bad Request
      security:
        - bearer: []
      x-apidog-folder: Venio/Conversation
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-23754246-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
