# Edit Case by CaseNo

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/case/{caseNo}:
    put:
      summary: Edit Case by CaseNo
      deprecated: false
      description: การแก้ไขรายละเอียดของ case ผ่าน caseNo
      tags:
        - Venio/Case
      parameters:
        - name: caseNo
          in: path
          description: หมายเลขของ case
          required: true
          example: T250200010
          schema:
            type: string
        - 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 Subscriptin-key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subject:
                  type: string
                  description: หัวข้อของ case
                customerNo:
                  type: string
                  description: รหัสของลูกค้า
                categoryId:
                  type: integer
                  description: >-
                    หรือ feedbackCategoryId คือเลขหมวดหมู่ของ case
                    (สามารถดูข้อมูลของ feedbackCategoryId ทั้งหมดได้จาก Endpoint
                    Get Case Categories)
                dateCase:
                  type: string
                  description: วันที่เริ่มของ case
                dateDue:
                  type: string
                  description: วันสิ้นสุด case
                activityNos:
                  type: array
                  items:
                    type: string
                  description: รหัสของกิจกรรมที่เชื่อมต่อ
                dealNos:
                  type: array
                  items:
                    type: string
                  description: รหัสของดีลที่เชื่อมต่อ
                note:
                  type: string
                  description: คำอธิบาย
                assignedToUserId:
                  type: string
                  description: ID ของ user ที่ต้องการมอบหมาย case ให้
              x-apidog-orders:
                - subject
                - customerNo
                - categoryId
                - dateCase
                - dateDue
                - activityNos
                - dealNos
                - note
                - assignedToUserId
              required:
                - subject
                - categoryId
                - dateCase
                - dateDue
                - assignedToUserId
              x-apidog-ignore-properties: []
            example:
              subject: Update Case
              customerCode: C000154
              categoryId: 2140016585
              dateCase: 2025-02-05T17:35:53.693+0700
              dateDue: 2025-02-05T17:35:53.693+0700
              activityNos:
                - A20250200028
                - A20250200029
              dealNos:
                - D241200044
                - D241200047
              note: description
              assignedToUserId: 6d473b8f-a6b3-4536-b1e6-f4b7688414e2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                      description:
                        type: string
                        description: คำอธิบายข้อความที่จะแสดง
                    x-apidog-orders:
                      - code
                      - description
                    required:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          feedbackId:
                            type: integer
                            description: รหัสของ case
                          companyId:
                            type: integer
                            description: รหัสของบริษัท
                          customerId:
                            type: integer
                            description: รหัสของลูกค้า
                          feedbackNo:
                            type: string
                            description: หมายเลข caseNo
                          subject:
                            type: string
                            description: หัวข้อ/ชื่อของ case
                          statusId:
                            type: integer
                            description: รหัสสถานะ
                          feedbackTypeId:
                            type: string
                            description: รหัสของประเภทของ case
                          feedbackFromId:
                            type: string
                          feedbackFromName:
                            type: string
                            description: >-
                              ชื่อของลูกค้า (หากไม่มีข้อมูลของลูกค้า
                              จะเป็นชื่อของคนที่สร้าง case)
                          note:
                            type: string
                            description: คำอธิบาย
                          assignedToUserId:
                            type: string
                            description: ID ของ user ที่ต้องการมอบหมาย case ให้
                          dateAssigned:
                            type: string
                            description: วันที่มอบหมาย
                          dateCase:
                            type: string
                            description: วันที่เริ่มของ case
                          dateDue:
                            type: string
                            description: วันสิ้นสุด case
                          createdByUserId:
                            type: string
                            description: รหัสของคนที่สร้าง case
                          dateUpdated:
                            type: string
                            description: วันที่อัพเดทล่าสุด
                          dateLatestAnswer:
                            type: string
                            description: วันที่ตอบล่าสุด
                        x-apidog-orders:
                          - feedbackId
                          - companyId
                          - customerId
                          - feedbackNo
                          - subject
                          - statusId
                          - feedbackTypeId
                          - feedbackFromId
                          - feedbackFromName
                          - note
                          - assignedToUserId
                          - dateAssigned
                          - dateCase
                          - dateDue
                          - createdByUserId
                          - dateUpdated
                          - dateLatestAnswer
                        required:
                          - feedbackId
                          - companyId
                          - feedbackNo
                          - subject
                          - statusId
                          - feedbackTypeId
                          - feedbackFromId
                          - feedbackFromName
                          - assignedToUserId
                          - dateAssigned
                          - dateCase
                          - dateDue
                          - createdByUserId
                          - dateUpdated
                          - dateLatestAnswer
                        x-apidog-ignore-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
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    x-apidog-orders:
                      - data
                      - statusCode
                      - httpStatusCode
                    required:
                      - data
                      - statusCode
                      - httpStatusCode
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - status
                  - data
                required:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  data:
                    feedbackId: 67941
                    companyId: 507
                    customerId: 705693
                    feedbackNo: T250200010
                    subject: Create new case (Edit)
                    statusId: 201
                    feedbackTypeId: 592
                    feedbackFromId: 50642
                    feedbackFromName: 𝗢𝗮𝘀𝗶𝘀 𝗦𝗽𝗮 Thailand
                    note: Bff description
                    assignedToUserId: 6d473b8f-a6b3-4536-b1e6-f4b7688414e2
                    dateAssigned: 2025-02-06T09:41:33+0700
                    dateCase: 2025-02-05T17:35:53+0700
                    dateDue: 2025-02-05T17:35:53+0700
                    createdByUserId: 23108b99-ee24-43c4-b9e7-58dc6a4e16a2
                    dateCreated: 2025-02-06T09:41:33+0700
                    updatedByUserId: 23108b99-ee24-43c4-b9e7-58dc6a4e16a2
                    dateUpdated: 2025-02-06T09:55:04+0700
                    dateLatestAnswer: 2025-02-06T09:41:33+0700
                  statusCode: 1000
                  httpStatusCode: 200
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                      description:
                        type: string
                        description: คำอธิบายข้อความที่จะแสดง
                    x-apidog-orders:
                      - code
                      - description
                    required:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      error:
                        type: array
                        items:
                          type: object
                          properties:
                            subcode:
                              type: string
                              description: >-
                                เป็น Subcode
                                ที่ต้องการจะแสดงเพื่อมีความหมายสำหรับ Module
                                ของเจ้าของในการดู Error โดย subcode
                                จะเป็นตัวเดียวกับ business erroe code
                                หรือไม่ก็ได้ เพื่อความสะดวกในการแสดงผล
                            description:
                              type: string
                              description: คำอธิบาย error
                          x-apidog-orders:
                            - subcode
                            - description
                          required:
                            - subcode
                            - description
                          x-apidog-ignore-properties: []
                        description: >-
                          เป็นส่วนแสดงผล Error
                          ที่พบว่ามีจำนวนกี่ชุดก็ได้ไม่จำกัดเพื่อความสะดวกในการจัดการกับ
                          Error
                    x-apidog-orders:
                      - error
                    required:
                      - error
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - status
                  - data
                required:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '4001'
                  description: Business error with 1 or more errors
                data:
                  errors:
                    - subCode: '4003'
                      description: Invalid CategoryId.
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      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
        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/Case
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-13759837-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: []

```
