# Get Case By CaseNo

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/cases/{caseNo}:
    get:
      summary: Get Case By CaseNo
      deprecated: false
      description: ดึงข้อมูลเคสด้วยหมายเลขเคสที่ต้องการดึงข้อมูล
      tags:
        - Venio/Case Management
      parameters:
        - name: caseNo
          in: path
          description: รหัสเคส
          required: true
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ลูกค้า
          required: true
          example: <Your Subscription-Key>
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      caseNo:
                        type: string
                      subject:
                        type: string
                      description:
                        type: string
                      categoryId:
                        type: integer
                      stageId:
                        type: integer
                      customerCode:
                        type: string
                      source:
                        type: string
                      sourceName:
                        type: string
                      dateCase:
                        type: string
                      dateDue:
                        type: string
                      caseTag:
                        type: array
                        items:
                          type: string
                      activityNo:
                        type: array
                        items:
                          type: string
                      dealNo:
                        type: array
                        items:
                          type: string
                      chatId:
                        type: 'null'
                      sla:
                        type: object
                        properties:
                          cycleStartedAt:
                            type: string
                          firstReplyAt:
                            type: string
                          reopenCount:
                            type: integer
                          firstResponse:
                            type: object
                            properties:
                              targetMs:
                                type: integer
                              elapsedMs:
                                type: integer
                              breached:
                                type: boolean
                            required:
                              - targetMs
                              - elapsedMs
                              - breached
                            x-apidog-orders:
                              - targetMs
                              - elapsedMs
                              - breached
                            x-apidog-ignore-properties: []
                          resolution:
                            type: object
                            properties:
                              targetMs:
                                type: integer
                              elapsedMs:
                                type: 'null'
                              breached:
                                type: boolean
                            required:
                              - targetMs
                              - elapsedMs
                              - breached
                            x-apidog-orders:
                              - targetMs
                              - elapsedMs
                              - breached
                            x-apidog-ignore-properties: []
                        required:
                          - cycleStartedAt
                          - firstReplyAt
                          - reopenCount
                          - firstResponse
                          - resolution
                        x-apidog-orders:
                          - cycleStartedAt
                          - firstReplyAt
                          - reopenCount
                          - firstResponse
                          - resolution
                        x-apidog-ignore-properties: []
                      owner:
                        type: string
                      participants:
                        type: array
                        items:
                          type: string
                    required:
                      - caseNo
                      - subject
                      - description
                      - categoryId
                      - stageId
                      - customerCode
                      - source
                      - sourceName
                      - dateCase
                      - dateDue
                      - caseTag
                      - activityNo
                      - dealNo
                      - chatId
                      - sla
                      - owner
                      - participants
                    x-apidog-orders:
                      - caseNo
                      - subject
                      - description
                      - categoryId
                      - stageId
                      - customerCode
                      - source
                      - sourceName
                      - dateCase
                      - dateDue
                      - caseTag
                      - activityNo
                      - dealNo
                      - chatId
                      - sla
                      - owner
                      - participants
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  caseNo: CaseNo
                  subject: Subject
                  description: Description
                  categoryId: 1
                  stageId: 1
                  customerCode: CustomerCode
                  source: '1'
                  sourceName: อีเมล
                  dateCase: '2026-06-01T09:00:00Z'
                  dateDue: '2026-06-01T23:00:00Z'
                  caseTag:
                    - CaseTag
                  activityNo: []
                  dealNo: []
                  chatId: null
                  sla:
                    cycleStartedAt: '2026-06-01T09:00:05Z'
                    firstReplyAt: '2026-06-01T09:20:00Z'
                    reopenCount: 0
                    firstResponse:
                      targetMs: 1800000
                      elapsedMs: 1195000
                      breached: false
                    resolution:
                      targetMs: 86400000
                      elapsedMs: null
                      breached: false
                  owner: StaffCode
                  participants: []
          headers: {}
          x-apidog-name: Success
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            subCode:
                              type: string
                            description:
                              type: string
                            metadata:
                              type: 'null'
                          x-apidog-orders:
                            - subCode
                            - description
                            - metadata
                          x-apidog-ignore-properties: []
                    required:
                      - errors
                    x-apidog-orders:
                      - errors
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '4001'
                  description: Business error with 1 or more errors
                data:
                  errors:
                    - subCode: '403'
                      description: Invalid access rights.
                      metadata: null
          headers: {}
          x-apidog-name: Forbidden
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            subCode:
                              type: string
                            description:
                              type: string
                            metadata:
                              type: 'null'
                          x-apidog-orders:
                            - subCode
                            - description
                            - metadata
                          x-apidog-ignore-properties: []
                    required:
                      - errors
                    x-apidog-orders:
                      - errors
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '4001'
                  description: Business error with 1 or more errors
                data:
                  errors:
                    - subCode: '404'
                      description: >-
                        Case "CaseNo0" not found or does not belong to your
                        company.
                      metadata: null
          headers: {}
          x-apidog-name: Case Not Found
        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.
        5XX:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            subCode:
                              type: string
                            description:
                              type: string
                            metadata:
                              type: 'null'
                          x-apidog-orders:
                            - subCode
                            - description
                            - metadata
                          x-apidog-ignore-properties: []
                    required:
                      - errors
                    x-apidog-orders:
                      - errors
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              examples:
                '4':
                  summary: Example 1
                  value:
                    status:
                      code: '4001'
                      description: Business error with 1 or more errors
                    data:
                      errors:
                        - subCode: '500'
                          description: >-
                            [DEBUG] HttpRequestException: No connection could be
                            made because the target machine actively refused it.
                          metadata: null
                '5':
                  summary: Example 2
                  value:
                    status:
                      code: '4001'
                      description: Business error with 1 or more errors
                    data:
                      errors:
                        - subCode: '502'
                          description: 'CaseManagement returned 502: (empty body)'
                          metadata: null
          headers: {}
          x-apidog-name: Server Error
      security:
        - bearer: []
      x-apidog-folder: Venio/Case Management
      x-apidog-status: developing
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-38557712-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: []

```
