# Deal Enquiry

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/deals/enquiry:
    post:
      summary: Deal Enquiry
      deprecated: false
      description: ดึงข้อมูล deal หลายชุด
      tags:
        - Venio/Deal
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription ของผู้ลูกค้า
          required: true
          example: <Your-Subscription-Key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dealStageIds:
                  type: array
                  items:
                    type: integer
                  description: รายการรหัสของ deal stage
                pageLength:
                  type: integer
                  description: ความยาวของหน้า
                skip:
                  type: integer
                  description: ข้าม
                orderBy:
                  type: string
                  description: >-
                    จัดเรียงได้ดังนี้

                    1. ใส่ DealNo  desc คือ
                    จัดเรียงตามเลขรันของดีลให้ดีลล่าสุดขึ้นก่อน

                    2. ใส่ DealNo  asc คือ
                    จัดเรียงตามเลขรันของดีลให้ดีลเก่าสุดขึ้นก่อน

                    3. ใส่ DateCreated desc คือ
                    จัดเรียงตามวันที่สร้างดีลจากวันที่ล่าสุดขึ้นก่อน

                    4. ใส่ DateCreated asc คือ
                    จัดเรียงตามวันที่สร้างดีลจากวันที่เก่าสุดขึ้นก่อน
                keyword:
                  type: string
                  description: คำค้นหา
              x-apidog-orders:
                - dealStageIds
                - pageLength
                - skip
                - orderBy
                - keyword
              required:
                - pageLength
              x-apidog-ignore-properties: []
            example:
              pageLength: 10
              dealStageIds:
                - 1
              keyword: string
              skip: 3
              orderBy: string
      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 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  data:
                    type: object
                    properties:
                      value:
                        type: array
                        items:
                          type: object
                          properties:
                            dealsId:
                              type: integer
                              description: รหัส deal
                            dealNo:
                              type: string
                              description: หมายเลข deal
                            dealsName:
                              type: string
                              description: ชื่อ deal
                            customerId:
                              type: integer
                              description: รหัสลูกค้า
                            customerName:
                              type: string
                              description: ชื่อลูกค้า
                            customerCode:
                              type: string
                              description: รหัสลูกค้า
                            dealsValue:
                              type: number
                              description: ค่าของ deal
                            statusId:
                              type: integer
                              description: รหัสสถานะ
                            statusName:
                              type: string
                              description: ชื่อสถานะ
                              nullable: true
                            dealStageId:
                              type: integer
                              description: รหัสขั้นตอน
                              nullable: true
                            dealStageName:
                              type: string
                              description: ชื่อขั้นตอน
                              nullable: true
                            notes:
                              type: string
                              description: รายละเอียดเพิ่มเติม
                              nullable: true
                            dealQuantity:
                              type: number
                              description: ปริมาณ Deal
                              nullable: true
                            quantity:
                              type: number
                              description: ปริมาณ
                              nullable: true
                            dealMeasure:
                              type: integer
                              description: การประมาณดีล
                              nullable: true
                            dealMeasureUnit:
                              type: object
                              properties:
                                unitId:
                                  type: integer
                                  description: รหัสของหน่วย
                                name:
                                  type: string
                                  description: ชื่อของหน่วย
                                companyId:
                                  type: integer
                                  description: รหัสบริษัท
                                isActive:
                                  type: boolean
                                  description: |-
                                    ใช้งานอยู่หรือไม่
                                    true = ใช้งานอยู่
                                    false = ไม่ได้ใช้งานอยู่
                                createdByUserId:
                                  type: string
                                  description: รหัสของผู้สร้าง
                                dateCreated:
                                  type: string
                                  description: เวลาที่สร้าง
                                modifiedByUserId:
                                  type: string
                                  description: รหัสผู้ที่แก้ไข
                                  nullable: true
                                dateModified:
                                  type: string
                                  description: เวลาที่แก้ไข
                                  nullable: true
                              description: หน่วยการประมาณดีล
                              x-apidog-orders:
                                - unitId
                                - name
                                - companyId
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - modifiedByUserId
                                - dateModified
                              required:
                                - unitId
                                - name
                                - companyId
                                - isActive
                                - createdByUserId
                                - dateCreated
                              x-apidog-ignore-properties: []
                              nullable: true
                            measure:
                              type: integer
                              description: การประมวณ
                              nullable: true
                            measureUnit:
                              type: object
                              properties:
                                unitId:
                                  type: integer
                                  description: รหัสของหน่วย
                                name:
                                  type: string
                                  description: ชื่อของหน่วย
                                companyId:
                                  type: integer
                                  description: รหัสบริษัท
                                isActive:
                                  type: boolean
                                  description: |-
                                    ใช้งานอยู่หรือไม่
                                    true = ใช้งานอยู่
                                    false = ไม่ได้ใช้งานอยู่
                                createdByUserId:
                                  type: string
                                  description: รหัสของผู้สร้าง
                                dateCreated:
                                  type: string
                                  description: เวลาที่สร้าง
                                modifiedByUserId:
                                  type: string
                                  description: รหัสผู้ที่แก้ไข
                                  nullable: true
                                dateModified:
                                  type: string
                                  description: เวลาที่แก้ไข
                                  nullable: true
                              description: หน่วยการประมาณ
                              x-apidog-orders:
                                - unitId
                                - name
                                - companyId
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - modifiedByUserId
                                - dateModified
                              required:
                                - unitId
                                - name
                                - companyId
                                - isActive
                                - createdByUserId
                                - dateCreated
                              x-apidog-ignore-properties: []
                              nullable: true
                            probability:
                              type: integer
                              description: ความน่าจะเป็น
                              nullable: true
                            assignToUserId:
                              type: string
                              description: รหัสผู้ที่ได้รับมอบหมาย
                            assignToUser:
                              type: object
                              properties:
                                userId:
                                  type: string
                                  description: รหัสผู้ใช้งาน
                                username:
                                  type: string
                                  description: ชื่อผู้ใช้งาน
                                  nullable: true
                                companyId:
                                  type: integer
                                  description: รหัสบริษัท
                                  nullable: true
                                companyName:
                                  type: string
                                  description: ชื่อบริษัท
                                  nullable: true
                                teamId:
                                  type: integer
                                  description: รหัสทีม
                                  nullable: true
                                teamName:
                                  type: string
                                  description: ชื่อทีม
                                  nullable: true
                                staffCode:
                                  type: string
                                  description: รหัสพนักงาน
                                  nullable: true
                                title:
                                  type: string
                                  description: หัวข้อ
                                  nullable: true
                                firstname:
                                  type: string
                                  description: ชื่อต้น
                                  nullable: true
                                lastname:
                                  type: string
                                  description: นามสกุล
                                  nullable: true
                                fullname:
                                  type: string
                                  description: ชื่อเต็ม
                                position:
                                  type: string
                                  description: ตำแหน่ง
                                  nullable: true
                                email:
                                  type: string
                                  description: email
                                  nullable: true
                                phoneNumber:
                                  type: string
                                  description: หมายเลขโทรศัพท์
                                  nullable: true
                                orgString:
                                  type: string
                                  description: โครงสร้างตามสายงาน
                                  nullable: true
                                orgLevel:
                                  type: integer
                                  description: ระดับองค์กร
                                  nullable: true
                                latitude:
                                  type: number
                                  description: ละติจูด
                                  nullable: true
                                longitude:
                                  type: number
                                  description: ลองจิจูด
                                  nullable: true
                                location:
                                  type: string
                                  description: ที่ตั้ง
                                  nullable: true
                                locationName:
                                  type: string
                                  description: ชื่อที่ตั้ง
                                  nullable: true
                                isActive:
                                  type: boolean
                                  description: |-
                                    ใช้งานอยู่หรือไม่
                                    true = ใช้
                                    false = ไม่ใช้
                                  nullable: true
                                createdByUserId:
                                  type: string
                                  description: รหัสผู้สร้าง
                                  nullable: true
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                                modifiedByUserId:
                                  type: string
                                  description: รหัสuseridของผู้แก้ไข
                                  nullable: true
                                hasPicture:
                                  type: boolean
                                  description: |-
                                    มีรูปหรือไหม 
                                    true = 1
                                    false = 2
                                  nullable: true
                                role:
                                  type: string
                                  description: หน้าที
                                  nullable: true
                                roleId:
                                  type: string
                                  description: รหัสหน้าที
                                  nullable: true
                                siteId:
                                  type: string
                                  description: รหัสงาน
                                  nullable: true
                                isAgreementPdpa:
                                  type: boolean
                                  description: |-
                                    ข้อตกลง PDPA
                                    true = ตกลง
                                    false = ไม่ตกลง
                                  nullable: true
                                dateAgreementPdpa:
                                  type: string
                                  description: เวลาตกลง PDPA
                                  nullable: true
                                emailSubscription:
                                  type: integer
                                  description: email สมัครสมาชิก
                                  nullable: true
                                identityUserId:
                                  type: string
                                  description: รหัสยืนยันตัวตน
                                  nullable: true
                                uniqueName:
                                  type: string
                                  description: ชื่อเฉพาะ
                                  nullable: true
                                inAppSubscription:
                                  type: integer
                                  description: สมัครสมาชิกในแอพ
                                  nullable: true
                                userType:
                                  type: integer
                                  description: ประเภทผู้ใช้
                                  nullable: true
                                platformId:
                                  type: integer
                                  description: รหัส id ของ platform
                                  nullable: true
                                isActiveEmpeo:
                                  type: boolean
                                  description: ใช้งาน empeoอยู่ไหม
                                  nullable: true
                                refCompanyId:
                                  type: integer
                                  description: เลขอ้างอิงcompanyId
                                  nullable: true
                                refClientId:
                                  type: integer
                                  description: |
                                    เลขอ้างอิง clientid
                                  nullable: true
                                signatureUrl:
                                  type: string
                                  description: urlรูปภาพลายแซ้น
                                  nullable: true
                                emailSupscriptionFlag:
                                  type: integer
                                  description: >-
                                    รหัส
                                    subscriptionflagของemailที่สมัครสมาชิกsubscriptionflag
                                  nullable: true
                                inAppSupscriptionFlag:
                                  type: integer
                                  description: >-
                                    รหัส subscriptionflag ที่ในการสมัครบนแอพ
                                    subscriptionflag
                                  nullable: true
                                pictureUrl:
                                  type: string
                                  description: url รูปภาพ
                                  nullable: true
                              x-apidog-orders:
                                - userId
                                - username
                                - companyId
                                - companyName
                                - teamId
                                - teamName
                                - staffCode
                                - title
                                - firstname
                                - lastname
                                - fullname
                                - position
                                - email
                                - phoneNumber
                                - orgString
                                - orgLevel
                                - latitude
                                - longitude
                                - location
                                - locationName
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - modifiedByUserId
                                - hasPicture
                                - role
                                - roleId
                                - siteId
                                - isAgreementPdpa
                                - dateAgreementPdpa
                                - emailSubscription
                                - identityUserId
                                - uniqueName
                                - inAppSubscription
                                - userType
                                - platformId
                                - isActiveEmpeo
                                - refCompanyId
                                - refClientId
                                - signatureUrl
                                - emailSupscriptionFlag
                                - inAppSupscriptionFlag
                                - pictureUrl
                              required:
                                - userId
                                - fullname
                                - dateCreated
                              description: ข้อมูลผู้ที่ได้รับมอบหมาย
                              x-apidog-ignore-properties: []
                            dealsDate:
                              type: string
                              description: วันที่ดีล
                            expectedCloseDate:
                              type: string
                              description: เวลาคาดหวังที่ปิด deal
                            closeDate:
                              type: string
                              description: เวลาปิด deal
                              nullable: true
                            dateFollowUp:
                              type: string
                              description: เวลาติดตาม
                              nullable: true
                            followUpNotes:
                              type: string
                              description: รายละเอียดเพิ่มเติมที่ติดตาม
                              nullable: true
                            dateCreated:
                              type: string
                              description: เวลาที่สร้าง
                            createByUserId:
                              type: string
                              description: รหัสผู้สร้าง
                              nullable: true
                            dateModified:
                              type: string
                              description: เวลาแก้ไข
                              nullable: true
                            dealIndex:
                              type: integer
                              description: ลำดับดีล
                              nullable: true
                            modifiedByUserId:
                              type: string
                              description: รหัสผู้แก้ไข
                              nullable: true
                            modifiedByUser:
                              type: object
                              properties:
                                userId:
                                  type: string
                                  description: รหัสผู้ใช้งาน
                                username:
                                  type: string
                                  description: ชื่อผู้ใช้งาน
                                  nullable: true
                                companyId:
                                  type: integer
                                  description: รหัสบริษัท
                                  nullable: true
                                companyName:
                                  type: string
                                  description: ชื่อบริษัท
                                  nullable: true
                                teamId:
                                  type: integer
                                  description: รหัสทีม
                                  nullable: true
                                teamName:
                                  type: string
                                  description: ชื่อทีม
                                  nullable: true
                                staffCode:
                                  type: string
                                  description: รหัสพนักงาน
                                  nullable: true
                                title:
                                  type: string
                                  description: หัวข้อ
                                firstname:
                                  type: string
                                  description: ชื่อต้น
                                lastname:
                                  type: string
                                  description: นามสกุล
                                fullname:
                                  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: |-
                                    ใช้งานอยู่หรือไม่
                                    true = ใช้
                                    false = ไม่ใช้
                                createdByUserId:
                                  type: string
                                  description: รหัสผู้สร้าง
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                                modifiedByUserId:
                                  type: string
                                  description: รหัสuseridของผู้แก้ไข
                                hasPicture:
                                  type: boolean
                                  description: |-
                                    มีรูปหรือไหม 
                                    true = 1
                                    false = 2
                                role:
                                  type: string
                                  description: หน้าที
                                roleId:
                                  type: string
                                  description: รหัสหน้าที
                                siteId:
                                  type: string
                                  description: รหัสงาน
                                isAgreementPdpa:
                                  type: boolean
                                  description: |-
                                    ข้อตกลง PDPA
                                    true = ตกลง
                                    false = ไม่ตกลง
                                dateAgreementPdpa:
                                  type: string
                                  description: เวลาตกลง PDPA
                                emailSubscription:
                                  type: integer
                                  description: email สมัครสมาชิก
                                uniqueName:
                                  type: string
                                  description: ชื่อเฉพาะ
                                  nullable: true
                                inAppSubscription:
                                  type: integer
                                  description: สมัครสมาชิกในแอพ
                                  nullable: true
                                userType:
                                  type: integer
                                  description: ประเภทผู้ใช้
                                platformId:
                                  type: integer
                                  description: รหัส id ของ platform
                                  nullable: true
                                isActiveEmpeo:
                                  type: boolean
                                  description: ใช้งาน empeoอยู่ไหม
                                  nullable: true
                                refCompanyId:
                                  type: integer
                                  description: เลขอ้างอิงcompanyId
                                refClientId:
                                  type: integer
                                  description: |
                                    เลขอ้างอิง clientid
                                signatureUrl:
                                  type: string
                                  description: urlรูปภาพลายแซ้น
                                  nullable: true
                                emailSupscriptionFlag:
                                  type: integer
                                  description: >-
                                    รหัส
                                    subscriptionflagของemailที่สมัครสมาชิกsubscriptionflag
                                inAppSupscriptionFlag:
                                  type: integer
                                  description: >-
                                    รหัส subscriptionflag ที่ในการสมัครบนแอพ
                                    subscriptionflag
                                pictureUrl:
                                  type: string
                                  description: url รูปภาพ
                              description: ข้อมูลผู้แก้ไข
                              x-apidog-orders:
                                - userId
                                - username
                                - companyId
                                - companyName
                                - teamId
                                - teamName
                                - staffCode
                                - title
                                - firstname
                                - lastname
                                - fullname
                                - position
                                - email
                                - phoneNumber
                                - orgString
                                - orgLevel
                                - latitude
                                - longitude
                                - location
                                - locationName
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - modifiedByUserId
                                - hasPicture
                                - role
                                - roleId
                                - siteId
                                - isAgreementPdpa
                                - dateAgreementPdpa
                                - emailSubscription
                                - uniqueName
                                - inAppSubscription
                                - userType
                                - platformId
                                - isActiveEmpeo
                                - refCompanyId
                                - refClientId
                                - signatureUrl
                                - emailSupscriptionFlag
                                - inAppSupscriptionFlag
                                - pictureUrl
                              required:
                                - userId
                                - title
                                - firstname
                                - lastname
                                - fullname
                                - position
                                - email
                                - phoneNumber
                                - orgString
                                - orgLevel
                                - latitude
                                - longitude
                                - location
                                - locationName
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - modifiedByUserId
                                - hasPicture
                                - role
                                - roleId
                                - siteId
                                - isAgreementPdpa
                                - dateAgreementPdpa
                                - emailSubscription
                                - userType
                                - refCompanyId
                                - refClientId
                                - emailSupscriptionFlag
                                - inAppSupscriptionFlag
                                - pictureUrl
                              x-apidog-ignore-properties: []
                              nullable: true
                            pictureUrl:
                              type: string
                              description: Url รูปภาพ
                            lastDealsState:
                              type: object
                              properties:
                                stateNameTH:
                                  type: string
                                  description: ชื่อสถานะภาษาไทย
                                  nullable: true
                                stateNameEN:
                                  type: string
                                  description: ชื่อสถานะภาษาอังกฤษ
                                  nullable: true
                              description: รายการสถานะของdealล่าสุด
                              x-apidog-orders:
                                - stateNameTH
                                - stateNameEN
                              x-apidog-ignore-properties: []
                              nullable: true
                            labelName:
                              type: string
                              description: ป้ายชื่อ
                              nullable: true
                            isEdit:
                              type: boolean
                              description: |-
                                สามารถแก้ไขได้หรือไม่ 
                                true = แก้ไขได้
                                false = ไม่สามารถแก้ไขได้
                              nullable: true
                            orderId:
                              type: integer
                              description: รหัสคำสั่ง order
                              nullable: true
                            saleOrderId:
                              type: integer
                              description: รหัสคำสั่งขาย
                              nullable: true
                            calTargetDate:
                              type: string
                              description: calTargetDate วันที่จะนำไปคำนวนเป็น sales target
                              nullable: true
                          x-apidog-orders:
                            - dealsId
                            - dealNo
                            - dealsName
                            - customerId
                            - customerName
                            - customerCode
                            - dealsValue
                            - statusId
                            - statusName
                            - dealStageId
                            - dealStageName
                            - notes
                            - dealQuantity
                            - quantity
                            - dealMeasure
                            - dealMeasureUnit
                            - measure
                            - measureUnit
                            - probability
                            - assignToUserId
                            - assignToUser
                            - dealsDate
                            - expectedCloseDate
                            - closeDate
                            - dateFollowUp
                            - followUpNotes
                            - dateCreated
                            - createByUserId
                            - dateModified
                            - dealIndex
                            - modifiedByUserId
                            - modifiedByUser
                            - pictureUrl
                            - lastDealsState
                            - labelName
                            - isEdit
                            - orderId
                            - saleOrderId
                            - calTargetDate
                          required:
                            - dealsId
                            - dealNo
                            - dealsName
                            - customerId
                            - customerName
                            - customerCode
                            - dealsValue
                            - statusId
                            - assignToUserId
                            - assignToUser
                            - dealsDate
                            - expectedCloseDate
                            - dateCreated
                            - pictureUrl
                          x-apidog-ignore-properties: []
                      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-ignore-properties: []
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - data
                required:
                  - statusCode
                  - httpStatusCode
                  - data
                x-apidog-ignore-properties: []
              example:
                data:
                  value:
                    - lastDealsState:
                        stateNameTH: string
                        stateNameEN: string
                      labelName: string
                      isEdit: true
                      dealsId: 1
                      dealNo: string
                      dealsName: string
                      customerId: 1
                      customerName: string
                      customerCode: string
                      dealsValue: 456
                      statusId: 1
                      statusName: string
                      notes: string
                      dealQuantity: 456
                      quantity: 456
                      dealMeasure: 3
                      dealMeasureUnit:
                        unitId: 3
                        name: ด้าม
                        companyId: 1
                        isActive: true
                        createdByUserId: string
                        dateCreated: 2019-12-11T11:09:01+0700
                        modifiedByUserId: string
                        dateModified: 2019-12-11T11:09:01+0700
                      measure: 3
                      measureUnit:
                        unitId: 3
                        name: ด้าม
                        companyId: 1
                        isActive: true
                        createdByUserId: string
                        dateCreated: 2019-12-11T11:09:01+0700
                        modifiedByUserId: string
                        dateModified: 2019-12-11T11:09:01+0700
                      probability: 100
                      assignToUserId: string
                      assignToUser:
                        userId: string
                        fullname: string
                        dateCreated: 2018-11-05T10:13:59+0700
                        dateModified: 2023-01-13T10:26:26+0700
                        level: 0
                      dealsDate: 2023-01-17T13:22:52+0700
                      expectedCloseDate: 2023-01-17T13:22:52+0700
                      dateCreated: 2023-01-17T13:24:16+0700
                      createByUserId: string
                      dateModified: 2023-01-17T15:18:36+0700
                      modifiedByUserId: 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
                x-apidog-ignore-properties: []
              example:
                statusCode: 401
                message: >-
                  Access denied due to invalid subscription key. Make sure to
                  provide a valid key for an active subscription.
          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-ignore-properties: []
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่ดูไม่มี permission view data '
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                x-apidog-ignore-properties: []
              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: <p>มีerrorไม่<br>true=มี<br>ดฟfalse=ไม่</p>
                  errorMessage:
                    type: string
                    description: คำบรรยายerror
                  validationErrors:
                    type: object
                    properties:
                      item:
                        type: string
                        description: ชื่อfieldจะเปลี่ยนตามfieldที่เจอerrorและคำบรรยาย
                        nullable: true
                    x-apidog-orders:
                      - item
                    description: รายการที่validateแล้วติดerror
                    x-apidog-ignore-properties: []
                    nullable: true
                  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: "<p>สถานะ\_code\_ของ\_httpเช่น<br>200\_Ok<br>201\_Created<br>400\_BadRequest<br>401\_Unauthorized<br>404\_Record\_not\_found<br>500\_Internal\_Server\_Error</p>"
                x-apidog-orders:
                  - hasError
                  - errorMessage
                  - validationErrors
                  - statusCode
                  - httpStatusCode
                required:
                  - hasError
                  - errorMessage
                  - statusCode
                  - httpStatusCode
                x-apidog-ignore-properties: []
              example:
                hasError: true
                errorMessage: Missing required parameters
                validationErrors:
                  pageLength: The PageLength field is required.
                statusCode: 1101
                httpStatusCode: 400
          headers: {}
          x-apidog-name: Bad Request
        x-200:User authentication required V2.:
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Required%20authorization'
                  status:
                    $ref: '#/components/schemas/Response%20Error%20Msg%20'
                required:
                  - data
                  - status
                x-apidog-orders:
                  - data
                  - status
                x-apidog-ignore-properties: []
              example:
                data:
                  subCode: E9103
                  description: Authorization credentials required
                  metadata: {}
                status:
                  code: '4001'
                  description: Business error with 1 errors
          headers: {}
          x-apidog-name: User authentication required V2.
      security:
        - bearer: []
      x-apidog-folder: Venio/Deal
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3602939-run
components:
  schemas:
    'Response Error Msg ':
      type: object
      properties:
        code:
          type: string
          x-apidog-mock: '4001'
        description:
          type: string
          x-apidog-mock: Business error with 1 errors
      required:
        - code
        - description
      x-apidog-orders:
        - code
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Required authorization:
      type: object
      properties:
        subCode:
          type: string
          x-apidog-mock: E9103
        description:
          type: string
          x-apidog-mock: Authorization credentials required
        metadata:
          type: object
          properties: {}
          x-apidog-orders: []
          x-apidog-ignore-properties: []
      required:
        - subCode
        - description
        - metadata
      x-apidog-orders:
        - subCode
        - description
        - metadata
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  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: []

```
