# Update Deal

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/deals/{id}:
    put:
      summary: Update Deal
      deprecated: false
      description: แก้ไขข้อมูล Deal
      tags:
        - Venio/Deal
      parameters:
        - name: id
          in: path
          description: รหัส dealsId
          required: true
          schema:
            type: integer
        - 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:
                dealName:
                  type: string
                  description: ชื่อดีล
                dealValue:
                  type: integer
                  description: ค่า ดีล
                dealQuantity:
                  type: integer
                  description: ปริมาณดีล
                dealQuantityUnit:
                  type: string
                  description: หน่วยของปริมาณดีล
                dealInterests:
                  type: array
                  items:
                    type: integer
                  description: ชื่อหัวข้อความสนใจ
                dealLabels:
                  type: array
                  items:
                    type: integer
                  description: ชื่อป้ายกำกับ
                dealDate:
                  type: string
                  title: DateTimeString
                  description: เวลาขอเสนอ
                expectedCloseDate:
                  type: string
                  description: วันที่คาดว่าจะปิด
                note:
                  type: string
                  description: รายละเอียดเพิ่มเติม
                assignTo:
                  type: string
                  description: มอบหมายให้
                participantCodes:
                  type: array
                  items:
                    type: string
                  description: รายการรหัสผู้เขาร่วม
                dateFollowUp:
                  type: string
                  description: เวลาติดตาม
                  format: yyyy-MM-ddTHH:mm:ss
                followUpNotes:
                  type: string
                  description: บันทึกสำหรับการติดตาม
                dealStageId:
                  type: integer
                remark:
                  type: string
                  description: บันทึกสำหรับการยกเลิกดีล Won / Missed ดีล
                reasonCategoryId:
                  type: integer
                  description: ประเภทเหตุผลดีลที่ Missed
                markAllTaskAsDone:
                  type: boolean
                  description: ปรับให้ task ทั้งหมด Done
                cancleAllOrder:
                  type: boolean
                  description: ยกเลิก Saleorder , Quotation ทั้งหมด (กรณี Missed Deal)
              required:
                - dealName
                - dealValue
                - dealDate
                - expectedCloseDate
                - assignTo
              x-apidog-orders:
                - dealName
                - dealValue
                - dealQuantity
                - dealQuantityUnit
                - dealInterests
                - dealLabels
                - dealDate
                - expectedCloseDate
                - note
                - assignTo
                - participantCodes
                - dateFollowUp
                - followUpNotes
                - dealStageId
                - remark
                - reasonCategoryId
                - markAllTaskAsDone
                - cancleAllOrder
              x-apidog-ignore-properties: []
            example:
              dealName: string
              dealQuantityUnit: unit
              dealQuantity: 90
              dealValue: 10000
              dealInterests: []
              dealLabels:
                - 98199047
                - 34064271
              dealDate: 2023-02-08T16:51:40+0700
              expectedCloseDate: 2023-02-08T16:51:40+0700
              note: string
              assignTo: staff01
              participantCodes:
                - staff02
              dateFollowUp: 2023-02-08T16:51:40+0700
              followUpNotes: incididunt
              dealStageId: 5509
              remark: Excepteur Lorem non cupidatat nostrud
              reasonCategoryId: 39733557
              markAllTaskAsDone: false
              cancleAllOrder: true
      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: object
                        properties:
                          dealsId:
                            type: integer
                            description: รหัสดีล
                          customerId:
                            type: integer
                            description: รหัสลูกค้า
                            nullable: true
                          dealNo:
                            type: string
                            description: หมายเลขดีล
                            nullable: true
                          dealsName:
                            type: string
                            description: ชื่อดีล
                          dealsValue:
                            type: number
                            description: ค่าดีล
                          statusId:
                            type: integer
                            description: รหัสสถานะ
                          dealStageId:
                            type: integer
                            description: รหัสขั้นตอน
                          dealsIndex:
                            type: integer
                            description: ลำดับดีล
                            nullable: true
                          dealsDate:
                            type: string
                            description: วันที่ดีล
                          expectedCloseDate:
                            type: string
                            description: วันที่คาดว่าจะปิด
                          probability:
                            type: integer
                            description: ความน่าจะเป็น
                          notes:
                            type: string
                            description: รายละเอียดเพิ่มเติม
                          isActive:
                            type: boolean
                            description: |-
                              ใช้งานอยู่หรือไหม
                              true = ใช้งาน
                              false = ไม่ได้ใช้งาน
                            nullable: true
                          boardId:
                            type: integer
                            description: รหัส board
                            nullable: true
                          dateCreated:
                            type: string
                            description: เวลาสร้าง
                            nullable: true
                          createByUserId:
                            type: string
                            description: รหัส userid ของผู้สร้าง
                            nullable: true
                          dateModified:
                            type: string
                            description: เวลาแก้ไข
                            nullable: true
                          modifiedByUserId:
                            type: string
                            description: รหัส userid ของผู้แก้ไข
                            nullable: true
                          measure:
                            type: integer
                            description: ค่าประมาณ
                            nullable: true
                          customer:
                            type: object
                            properties:
                              customerId:
                                type: integer
                                description: รหัส idลูกค้า
                              companyId:
                                type: integer
                                description: รหัสบริษัท
                              customerCode:
                                type: string
                                description: รหัสลูกค้า
                              customerName:
                                type: string
                                description: ชื่อลูกค้า
                              customerNameEN:
                                type: string
                                description: ชื่อลูกค้าภาษาอังกฤษ
                              type:
                                type: integer
                                description: |-
                                  ประเภทลูกค้า
                                  13001 = individual
                                  13002 = Business
                              customerType:
                                type: integer
                                description: |-
                                  ประเภท customerstage:
                                  Prospect=11200,
                                   Customer=11300,
                                   Lead=11100
                              branch:
                                type: string
                                description: สาขา
                              phone:
                                type: string
                                description: เบอร์โทรศัพท์
                              mobile:
                                type: string
                                description: เบอร์มือถือ
                              notes:
                                type: string
                                description: รายละเอียดเพิ่มเติม
                              isActive:
                                type: boolean
                                description: |-
                                  ใช้งานอยู่หรือไหม
                                  true= ใช้งาน
                                  false = ไม่ได้ใช้งาน
                              dateChangeToCustomer:
                                type: string
                                description: วันที่เปลี่ยนจาก Prospect เป็น Customer
                              createdByUserId:
                                type: string
                                description: รหัส  userid ของผู้ใส่
                              modifiedByUserId:
                                type: string
                                description: รหัส userid ผู้แก้ไข
                              dateModified:
                                type: string
                                description: เวลาแก้ไข
                              customerGroupId:
                                type: integer
                                description: รหัสกลุ่มลูกค้า
                              leadStatus:
                                type: integer
                                description: รหัสสถานะลูกค้า
                              hasPicture:
                                type: boolean
                                description: มีรูปหรือไหม
                              companyName:
                                type: string
                                description: ชื่อบริษัท
                              sourceOfLead:
                                type: integer
                                description: แหล่งที่มา
                              classificationId:
                                type: integer
                                description: ชื่อหมวดหมู่
                              customerStateId:
                                type: integer
                                description: รหัสสถานะของลูกค้า
                              hasOwner:
                                type: boolean
                                description: |-
                                  มีหัวหน้าหรือไม่
                                  true= มี owner
                                  false = ไม่มี
                              pictureUrl:
                                type: string
                                description: url รูปภาพ
                              addresses:
                                type: array
                                items:
                                  type: string
                                description: ที่อยู่
                              customerInterests:
                                type: array
                                items:
                                  type: string
                                description: สิ่งที่สนใจของลูกค้า
                            description: ลูกค้า
                            x-apidog-orders:
                              - customerId
                              - companyId
                              - customerCode
                              - customerName
                              - customerNameEN
                              - type
                              - customerType
                              - branch
                              - phone
                              - mobile
                              - notes
                              - isActive
                              - dateChangeToCustomer
                              - createdByUserId
                              - modifiedByUserId
                              - dateModified
                              - customerGroupId
                              - leadStatus
                              - hasPicture
                              - companyName
                              - sourceOfLead
                              - classificationId
                              - customerStateId
                              - hasOwner
                              - pictureUrl
                              - addresses
                              - customerInterests
                            required:
                              - customerId
                              - companyId
                              - customerCode
                              - customerName
                              - customerNameEN
                              - type
                              - customerType
                              - branch
                              - phone
                              - mobile
                              - notes
                              - isActive
                              - dateChangeToCustomer
                              - createdByUserId
                              - modifiedByUserId
                              - dateModified
                              - customerGroupId
                              - leadStatus
                              - hasPicture
                              - companyName
                              - sourceOfLead
                              - classificationId
                              - customerStateId
                              - hasOwner
                              - pictureUrl
                              - addresses
                              - customerInterests
                            x-apidog-ignore-properties: []
                            nullable: true
                          dealStage:
                            type: object
                            properties:
                              dealStageId:
                                type: integer
                                description: รหัสขั้นตอน
                              stageName:
                                type: string
                                description: ชื่อขั้นตอน
                              dateCreated:
                                type: string
                                description: เวลาสร้าง
                              createByUserId:
                                type: string
                                description: รหัส userid ของผู้สร้าง
                              dateModified:
                                type: string
                                description: เวลาแก้ไข
                              modifiedByUserId:
                                type: string
                                description: รหัสของผู้ที่แก้ไข
                              isActive:
                                type: boolean
                                description: ใช้งานอยู่หรือไหม
                              companyId:
                                type: integer
                                description: รหัสบริษัท
                              seq:
                                type: integer
                                description: ลำดับ
                              boardId:
                                type: string
                                description: รหัส board
                            description: รายละเอียดขั้นตอน
                            x-apidog-orders:
                              - dealStageId
                              - stageName
                              - dateCreated
                              - createByUserId
                              - dateModified
                              - modifiedByUserId
                              - isActive
                              - companyId
                              - seq
                              - boardId
                            required:
                              - dealStageId
                              - stageName
                              - dateCreated
                              - createByUserId
                              - dateModified
                              - modifiedByUserId
                              - isActive
                              - companyId
                              - seq
                              - boardId
                            x-apidog-ignore-properties: []
                            nullable: true
                          dealsInterests:
                            type: array
                            items:
                              type: object
                              properties:
                                dealsId:
                                  type: integer
                                  description: รหัสข้อเสนอ
                                  nullable: true
                                topicId:
                                  type: integer
                                  description: รหัสหัวข้อ
                                isActive:
                                  type: boolean
                                  description: ใช้งานอยู่หรือไม่
                                  nullable: true
                              x-apidog-orders:
                                - dealsId
                                - topicId
                                - isActive
                              required:
                                - topicId
                              x-apidog-ignore-properties: []
                            description: รายการ deal ที่สนใจ
                          dealsLabels:
                            type: array
                            items:
                              type: object
                              properties:
                                dealsId:
                                  type: integer
                                  description: รหัส deal
                                dealLabelId:
                                  type: integer
                                  description: รหัสปายดีล
                                isActive:
                                  type: boolean
                                  description: |-
                                    ใช้งานอยู่หรือป่าว
                                    true = ใช้งาน
                                    false = ไม่ได้ใช้งาน
                              x-apidog-orders:
                                - dealsId
                                - dealLabelId
                                - isActive
                              required:
                                - dealsId
                                - dealLabelId
                                - isActive
                              x-apidog-ignore-properties: []
                            description: รายการป้ายของ deal
                          isAction:
                            type: boolean
                            description: |-
                              มี action หรือไม่
                              true = มี action
                              false = ไม่มี action
                            nullable: true
                          isEdit:
                            type: boolean
                            description: |-
                              สามารถแก้ไขได้ไหม
                              true = แก้ได้
                              false = ไม่สามารถแก้ได้
                            nullable: true
                          isDelete:
                            type: boolean
                            description: สามารถลบได้ไหม
                            nullable: true
                          statusName:
                            type: string
                            description: ชื่อสถานะ
                            nullable: true
                          user:
                            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: ใช้งานอยู่หรือไม่
                              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: ประเภทผู้ใช้
                            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
                            x-apidog-ignore-properties: []
                            nullable: true
                          dealSummary:
                            type: object
                            properties:
                              probability:
                                type: string
                                description: ความน่าจะเป็น
                              dealValue:
                                type: string
                                description: ค่าของดีล
                              expectedCloteDate:
                                type: string
                                description: วันที่คาดว่าจะปิด
                            description: ข้อมูลดีลโดยสรุป
                            x-apidog-orders:
                              - probability
                              - dealValue
                              - expectedCloteDate
                            required:
                              - probability
                              - dealValue
                              - expectedCloteDate
                            x-apidog-ignore-properties: []
                            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: รหัสผู้ที่แก้ไข
                              dateModified:
                                type: string
                                description: เวลาที่แก้ไข
                            description: หน่วยการประมาณ
                            x-apidog-orders:
                              - unitId
                              - name
                              - companyId
                              - isActive
                              - createdByUserId
                              - dateCreated
                              - modifiedByUserId
                              - dateModified
                            required:
                              - unitId
                              - name
                              - companyId
                              - isActive
                              - createdByUserId
                              - dateCreated
                              - modifiedByUserId
                              - dateModified
                            x-apidog-ignore-properties: []
                            nullable: true
                          currentStage:
                            type: object
                            properties:
                              dealStageId:
                                type: integer
                                description: 'รหัสขั้นตอน '
                              stageName:
                                type: string
                                description: ชื่อขั้นตอน
                              dateChangeStage:
                                type: string
                                description: เวลาเปลี่ยนขั้นตอน
                            description: รายการ stage ปัจจุบัน
                            x-apidog-orders:
                              - dealStageId
                              - stageName
                              - dateChangeStage
                            required:
                              - dealStageId
                              - stageName
                              - dateChangeStage
                            x-apidog-ignore-properties: []
                            nullable: true
                          userId:
                            type: array
                            items:
                              type: string
                            description: รายการรหัสผู้ใช้
                            nullable: true
                          dateFollowUp:
                            type: string
                            description: เวลาติดตาม
                          customerIds:
                            type: array
                            items:
                              type: integer
                            description: รายการรหัสลูกค้า
                            nullable: true
                          participantUserIds:
                            type: array
                            items:
                              type: string
                            description: รายการรหัสผู้เข้าใช้งาน
                        x-apidog-orders:
                          - dealsId
                          - customerId
                          - dealNo
                          - dealsName
                          - dealsValue
                          - statusId
                          - dealStageId
                          - dealsIndex
                          - dealsDate
                          - expectedCloseDate
                          - probability
                          - notes
                          - isActive
                          - boardId
                          - dateCreated
                          - createByUserId
                          - dateModified
                          - modifiedByUserId
                          - measure
                          - customer
                          - dealStage
                          - dealsInterests
                          - dealsLabels
                          - isAction
                          - isEdit
                          - isDelete
                          - statusName
                          - user
                          - dealSummary
                          - measureUnit
                          - currentStage
                          - userId
                          - dateFollowUp
                          - customerIds
                          - participantUserIds
                        required:
                          - dealsId
                          - dealsName
                          - dealsValue
                          - statusId
                          - dealStageId
                          - dealsDate
                          - expectedCloseDate
                          - probability
                          - notes
                          - dealsInterests
                          - dealsLabels
                          - dateFollowUp
                          - participantUserIds
                        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:
                    dealsId: 1
                    customerId: 1
                    dealNo: string
                    dealsName: string
                    dealsValue: 10
                    statusId: 1
                    dealStageId: 1
                    dealsIndex: 1
                    dealsDate: 2023-01-19T00:00:00+0700
                    expectedCloseDate: 2023-01-23T00:00:00+0700
                    probability: 20
                    notes: string
                    isActive: true
                    boardId: 1
                    dateCreated: 2023-01-19T21:25:01+0700
                    createByUserId: string
                    dateModified: 2023-01-19T21:39:34+0700
                    modifiedByUserId: string
                    customer:
                      customerId: 1
                      companyId: 1
                      customerCode: string
                      customerName: string
                      type: 1
                      customerType: 1
                      isActive: true
                      createdByUserId: string
                      dateCreated: 2022-11-28T13:41:11+0700
                      modifiedByUserId: string
                      dateModified: 2023-01-16T15:12:52+0700
                      customerGroupId: 1
                      sourceOfLead: 1
                      classificationId: 2
                      hasOwner: true
                      pictureUrl: string
                      addresses: []
                      customerInterests: []
                    dealStage:
                      dealStageId: 1
                      stageName: string
                      dateCreated: 2022-12-12T17:15:43+0700
                      createByUserId: string
                      isActive: true
                      companyId: 1
                      seq: 3
                      boardId: 1
                    dealsInterests:
                      - dealsId: 1
                        topicId: 3
                        isActive: true
                    dealsLabels:
                      - dealsId: 1
                        dealLabelId: 1
                        isActive: true
                    isAction: true
                    isEdit: true
                    isDelete: true
                    statusName: string
                    user:
                      userId: string
                      username: string
                      companyId: 1
                      companyName: string
                      teamId: 1
                      teamName: string
                      staffCode: string
                      title: ''
                      firstname: string
                      lastname: string
                      fullname: string
                      position: string
                      email: string
                      phoneNumber: string
                      orgString: string
                      orgLevel: 1
                      latitude: 1
                      longitude: 1.5
                      location: string
                      locationName: string
                      isActive: true
                      createdByUserId: string
                      hasPicture: true
                      dateCreated: 2018-11-05T10:13:59+0700
                      dateModified: 2023-01-19T15:15:13+0700
                      role: string
                      roleId: string
                      level: 0
                      siteId: 1
                      isAgreementPDPA: true
                      dateAgreementPDPA: 2020-08-26T07:13:22+0700
                      emailSubscription: 2
                      identityUserId: string
                      uniqueName: string
                      inAppSubscription: 1
                      userType: 1
                    dealSummary:
                      probability: 20
                      dealValue: 10
                      expectedCloseDate: 2023-01-23T00:00:00+0700
                    currentStage:
                      dealStageId: 1
                      stageName: string
                      dateChangeStage: 2023-01-19T21:39:34+0700
                    dateFollowUp: 2023-01-21T00:00:00+0700
                  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
        '500':
          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:
                      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:
                      - statusCode
                    required:
                      - statusCode
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - hasError
                  - errorMessage
                  - statusCode
                  - httpStatusCode
                  - data
                required:
                  - hasError
                  - errorMessage
                  - statusCode
                  - httpStatusCode
                  - data
                x-apidog-ignore-properties: []
              example:
                data:
                  statusCode: 400
                hasError: true
                errorMessage: Internal Server Error
                statusCode: 9999
                httpStatusCode: 500
          headers: {}
          x-apidog-name: Server Error
        'x-200:Bad Request ':
          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:
                      value:
                        type: string
                        description: valueที่พบerror
                      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
                    description: 'รายละเอียดรายการที่เกิดerror '
                    required:
                      - value
                      - statusCode
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่request bodyมีข้อผิดพลาด'
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                x-apidog-ignore-properties: []
              example:
                data:
                  value: Employee Code "6661" doesn't exist.
                  statusCode: 400
                hasError: true
                errorMessage: Invalid parameters entered
                statusCode: 1102
                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-3602937-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: []

```
