# Get Case Categories

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/cases/categories:
    get:
      summary: Get Case Categories
      deprecated: false
      description: ดึงประเภทของเคสที่มีในระบบ
      tags:
        - Venio/Case Management
      parameters:
        - 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: array
                    items:
                      type: object
                      properties:
                        categoryId:
                          type: integer
                        categoryName:
                          type: string
                        description:
                          type: string
                          nullable: true
                        firstResponseTime:
                          type: integer
                        firstResponseTimeUnit:
                          type: string
                          nullable: true
                        resolveTime:
                          type: integer
                        resolveTimeUnit:
                          type: string
                          nullable: true
                        nearDueAlert:
                          type: integer
                        nearDueAlertUnit:
                          type: string
                          nullable: true
                        isActive:
                          type: boolean
                      required:
                        - categoryId
                        - categoryName
                        - description
                        - firstResponseTime
                        - firstResponseTimeUnit
                        - resolveTime
                        - resolveTimeUnit
                        - nearDueAlert
                        - nearDueAlertUnit
                        - isActive
                      x-apidog-orders:
                        - categoryId
                        - categoryName
                        - description
                        - firstResponseTime
                        - firstResponseTimeUnit
                        - resolveTime
                        - resolveTimeUnit
                        - nearDueAlert
                        - nearDueAlertUnit
                        - isActive
                      x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  - categoryId: 12
                    categoryName: ปัญหาการใช้งานระบบ
                    description: เคสที่เกี่ยวกับการใช้งานระบบ
                    firstResponseTime: 30
                    firstResponseTimeUnit: minute
                    resolveTime: 1
                    resolveTimeUnit: day
                    nearDueAlert: 15
                    nearDueAlertUnit: minute
                    isActive: true
                  - categoryId: 13
                    categoryName: คำขอทั่วไป
                    description: null
                    firstResponseTime: 0
                    firstResponseTimeUnit: null
                    resolveTime: 0
                    resolveTimeUnit: null
                    nearDueAlert: 0
                    nearDueAlertUnit: null
                    isActive: false
          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: company_not_found
                      metadata: null
          headers: {}
          x-apidog-name: Forbidden
        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:
                '3':
                  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
                '4':
                  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-38557607-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: []

```
