# CreateTask

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/tasks:
    post:
      summary: CreateTask
      deprecated: false
      description: ''
      tags:
        - Venio/Task
      parameters:
        - 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:
                subject:
                  type: string
                  description: ชื่อ Task
                dateDue:
                  type: string
                  description: วันที่แจ้งเตือน
                note:
                  type: string
                  description: Note เพิ่มเติม
                customerId:
                  type: integer
                  description: รหัสลูกค้า
                contactIds:
                  type: array
                  items:
                    type: integer
                checkList:
                  type: array
                  items:
                    type: object
                    properties:
                      subject:
                        type: string
                      isCheck:
                        type: boolean
                    required:
                      - subject
                      - isCheck
                    x-apidog-orders:
                      - subject
                      - isCheck
                AssignStaffCodes:
                  type: array
                  items:
                    type: string
              required:
                - subject
                - dateDue
                - note
                - customerId
                - AssignStaffCodes
              x-apidog-orders:
                - subject
                - dateDue
                - note
                - customerId
                - contactIds
                - AssignStaffCodes
                - checkList
            example:
              subject: task test 4
              dateDue: 2023-09-12 15:00
              note: api test bff
              customerId: 142056
              assignStaffCodes:
                - '00003'
              checkList:
                - subject: 1. XXXXX
                  isCheck: false
                - subject: 2. SSSS
                  isCheck: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        ownerUserId:
                          type: string
                        dateCreated:
                          type: string
                        createdByUserId:
                          type: string
                        isActive:
                          type: boolean
                        checkList:
                          type: array
                          items:
                            type: string
                        taskId:
                          type: integer
                        statusId:
                          type: integer
                        subject:
                          type: string
                        dateDue:
                          type: string
                        customerId:
                          type: integer
                        assignType:
                          type: integer
                        note:
                          type: string
                      x-apidog-orders:
                        - ownerUserId
                        - dateCreated
                        - createdByUserId
                        - isActive
                        - checkList
                        - taskId
                        - statusId
                        - subject
                        - dateDue
                        - customerId
                        - assignType
                        - note
                  hasError:
                    type: boolean
                  statusCode:
                    type: integer
                  totalRecords:
                    type: integer
                  httpStatusCode:
                    type: integer
                required:
                  - data
                  - hasError
                  - statusCode
                  - totalRecords
                  - httpStatusCode
                x-apidog-orders:
                  - data
                  - hasError
                  - statusCode
                  - totalRecords
                  - httpStatusCode
              example:
                data:
                  - ownerUserId: 7eab0d54-57a8-4206-86f9-57b4822d8640
                    dateCreated: '2023-08-31T15:36:47.7944+07:00'
                    createdByUserId: 7eab0d54-57a8-4206-86f9-57b4822d8640
                    isActive: true
                    checkList: []
                    taskId: 12632
                    statusId: 1701
                    subject: Test Task
                    dateDue: '2023-09-01T09:00:00+07:00'
                    customerId: 142394
                    assignType: 1
                    note: Test
                hasError: false
                statusCode: 1000
                totalRecords: 0
                httpStatusCode: 201
          headers: {}
          x-apidog-name: Success
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: Venio/Task
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-4152572-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      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: []

```
