# Create Expense

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/Expenses:
    post:
      summary: Create Expense
      deprecated: false
      description: เพิ่มข้อมูล expense
      tags:
        - Venio/Expense
      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:
                ExpenseDetails:
                  type: array
                  items:
                    type: object
                    properties:
                      expenseDetailId:
                        type: integer
                        description: รหัสรายละเอียดค่าใช้จ่าย
                        nullable: true
                      expenseTypeId:
                        type: integer
                        description: |-
                          รหัสประเภทexpenseเช่น:
                          0 = none
                          1001 = accomadation
                          1002 = entertainment
                          1003 = fuel
                          1004 = other
                          1005 = training
                          1006 = travelling
                          1007= meeting with staff
                          1008 = meeting with sales
                      amount:
                        type: number
                        description: จำนวน
                      night:
                        type: integer
                        description: |-
                          จำนวนคืน
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท accomadation
                        nullable: true
                      milesStart:
                        type: integer
                        description: >-
                          เลขไมล์เริ่มต้น

                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท fuel
                          และต้องน้อยกว่า milesend
                        nullable: true
                      milesEnd:
                        type: integer
                        description: >-
                          เลขไมล์สุดท้าย

                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท fuel
                          และต้องมากว่า milesStart
                        nullable: true
                      trainingTitle:
                        type: string
                        description: |
                          หัวข้ออบรม
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท training
                        nullable: true
                      hours:
                        type: integer
                        description: |-
                          จำนวนชั่วโมง
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท training
                        nullable: true
                      minutes:
                        type: integer
                        description: |-
                          จำนวนนาที
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท training
                        nullable: true
                      taxi:
                        type: number
                        description: |-
                          ค่า taxi
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท travelling
                        nullable: true
                      tollway:
                        type: string
                        description: |-
                          ค่าทางด่วน
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท travelling
                        nullable: true
                      parking:
                        type: string
                        description: |-
                          ค่าที่จอด
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท travelling
                        nullable: true
                      person:
                        type: string
                        description: >-
                          จำนวนคน

                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท entertainment
                          หรือ meetingwithstaff หรือ training
                        nullable: true
                      note:
                        type: string
                        description: |-
                          เพิ่มเติม
                          ** จำเป็นใส่กรณี expenseTypeIdเป็นประเภท other
                        nullable: true
                      usedFuelCard:
                        type: string
                        description: |-
                          ใช้บัตรเติมนำ้มันหรือไม่
                          true = ใช่
                          false  = ไม่ใช่
                      expenseTypeName:
                        type: string
                        description: >-
                          ประเภทค่าใช้จ่ายแบบกำหนดเอง **กรณีเลือก expenseTypeId
                          เป็นประเภท none
                    x-apidog-orders:
                      - expenseDetailId
                      - expenseTypeId
                      - amount
                      - night
                      - milesStart
                      - milesEnd
                      - trainingTitle
                      - hours
                      - minutes
                      - taxi
                      - tollway
                      - parking
                      - person
                      - note
                      - usedFuelCard
                      - expenseTypeName
                    required:
                      - expenseTypeId
                      - amount
                      - usedFuelCard
                  description: รายละเอียค่าใช้จ่าย
                subject:
                  type: string
                  description: เรื่อง
                activityId:
                  type: string
                  description: รหัสกิจกรรม
                  nullable: true
                dateTransaction:
                  type: string
                  description: เวลาธุรกรรม
                  nullable: true
                remark:
                  type: string
                  description: หมายเหตุ
                  nullable: true
                staffCode:
                  type: string
                  description: รหัสพนักงาน ที่ต้องการให้เป็นเจ้าของ
              x-apidog-orders:
                - ExpenseDetails
                - subject
                - activityId
                - dateTransaction
                - remark
                - staffCode
              required:
                - ExpenseDetails
                - subject
            example:
              expenseDetails:
                - expenseDetailId: 0
                  expenseTypeId: 1001
                  amount: 0
                  night: 0
                  milesStart: 0
                  milesEnd: 0
                  trainingTitle: string
                  hours: 0
                  minutes: 0
                  taxi: 0
                  tollway: 0
                  parking: 0
                  person: 0
                  note: string
                  usedFuelCard: true
                  expenseTypeName: string
              subject: string
              activityId: string
              dateTransaction: '2021-09-17T08:47:23.771Z'
              remark: string
              staffCode: string
      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:
                          expenseId:
                            type: integer
                            description: รหัสidของ expense
                          teamId:
                            type: integer
                            description: รหัสidของทีม
                          activityId:
                            type: integer
                            description: รหัสกิจกรรม
                          statusId:
                            type: integer
                            description: รหัสสถานะ
                          dateTransaction:
                            type: string
                            description: เวลาทำธุรกรรม
                          createdByUserId:
                            type: string
                            description: รหัสuserIdของผู้สร้าง
                          dateCreated:
                            type: string
                            description: เวลาสร้าง
                          updateByUserId:
                            type: string
                            description: รหัสuseridของผู้แก้ไข
                          dateUpdated:
                            type: string
                            description: เวลาแก้ไข
                          waitingApproveByUserId:
                            type: string
                            description: รหัสuseridผู้รออนุมัติ
                          waitingApproveByRoleId:
                            type: string
                            description: รหัสหน้าทีของผู้รออนุมัติ
                          waitingApproveByRankNo:
                            type: string
                            description: RankNoของผู้รออนุมัติ
                          ApprovedByUserId:
                            type: string
                            description: รหัสuseridผู้อนุมัติ
                          dateApproved:
                            type: string
                            description: เวลาอนุมัติ
                          modifiedByUserId:
                            type: string
                            description: รหัสuseridผู้แก้ไข
                          remark:
                            type: string
                            description: หมายเหตุ
                          subject:
                            type: string
                            description: เรื่อง
                          currencyCode:
                            type: string
                            description: >-
                              สกุลเงิน เช่น "THB" , "USD" [ถ้าไม่ส่ง หรือ null
                              ระบบจะหยิบ System Currency ของ Company นั้นๆให้]
                              optional
                          exchangeRate:
                            type: string
                            description: อัตราแลกเปลี่ยน
                          totalBaht:
                            type: number
                            description: ยอดร่วมคิดเป็นบาท
                          nextApproveType:
                            type: string
                            description: approve condition enum
                          nextApproveData:
                            type: string
                            description: ข้อมูล next approve
                          activityExpenses:
                            type: array
                            items:
                              type: object
                              properties:
                                activityId:
                                  type: integer
                                  description: รหัสกิจกรรม
                                expenseId:
                                  type: integer
                                  description: รหัสexpense
                                createdByUserId:
                                  type: string
                                  description: รหัสuseridของผู้สร้าง
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                              x-apidog-orders:
                                - activityId
                                - expenseId
                                - createdByUserId
                                - dateCreated
                              required:
                                - activityId
                                - expenseId
                                - createdByUserId
                                - dateCreated
                            description: กิจกรรมที่เชื่อมกับexpense
                          expenseStates:
                            type: array
                            items:
                              type: object
                              properties:
                                expenseStateId:
                                  type: integer
                                  description: รหัส expenseStateId
                                expenseId:
                                  type: integer
                                  description: รหัสexpense
                                statusId:
                                  type: integer
                                  description: รหัสสถานะ
                                createdByUserId:
                                  type: string
                                  description: รหัสuserIdของผู้สร้าง
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                                approveLevel:
                                  type: integer
                                  description: ระดับการอนุมัติ
                                seq:
                                  type: integer
                                  description: ลำดับ
                              x-apidog-orders:
                                - expenseStateId
                                - expenseId
                                - statusId
                                - createdByUserId
                                - dateCreated
                                - approveLevel
                                - seq
                              required:
                                - expenseStateId
                                - expenseId
                                - statusId
                                - createdByUserId
                                - dateCreated
                                - approveLevel
                                - seq
                            description: รายการขั้นตอนค่าใช้จ่าย
                          expenseDetails:
                            type: array
                            items:
                              type: object
                              properties:
                                expenseDetailId:
                                  type: integer
                                  description: รหัส expensedetailId
                                expenseId:
                                  type: integer
                                  description: รหัสexpense
                                expenseTypeId:
                                  type: integer
                                  description: |-
                                    รหัสประเภทexpenseเช่น:
                                    0 = none
                                    1001 = accomadation
                                    1002 = entertainment
                                    1003 = fuel
                                    1004 = other
                                    1005 = training
                                    1006 = travelling
                                    1007= meeting with staff
                                    1008 = meeting with sales
                                categoryId:
                                  type: integer
                                  description: รหัสหมวดหมู่
                                quantity:
                                  type: integer
                                  description: จำนวน
                                amount1:
                                  type: number
                                  description: จำนวนเงินที่ 1
                                amount2:
                                  type: number
                                  description: จำนวนเงินที่2
                                amount3:
                                  type: number
                                  description: จำนวนเงินที่3
                                note:
                                  type: string
                                  description: รายละเอียดเพิ่มเติม
                                hours:
                                  type: integer
                                  description: ชั่วโมง
                                minutes:
                                  type: integer
                                  description: นาที
                                usedFuelCard:
                                  type: boolean
                                  description: |-
                                    ใช้บัตรเติมนำ้มันหรือไม่
                                    false = สำรองจ่าย
                                    true = ใช้บัตรเติมนำ้มัน
                                estimatedDistance:
                                  type: integer
                                  description: ระยะทางโดยประมาณ
                                documentId:
                                  type: integer
                                  description: รหัสเอกสาร
                                expenseLimitRangesId:
                                  type: integer
                                  description: expenseLimitRangeId
                              x-apidog-orders:
                                - expenseDetailId
                                - expenseId
                                - expenseTypeId
                                - categoryId
                                - quantity
                                - amount1
                                - amount2
                                - amount3
                                - note
                                - hours
                                - minutes
                                - usedFuelCard
                                - estimatedDistance
                                - documentId
                                - expenseLimitRangesId
                              required:
                                - expenseDetailId
                                - expenseId
                                - expenseTypeId
                                - categoryId
                                - quantity
                                - amount1
                                - amount2
                                - amount3
                                - note
                                - hours
                                - minutes
                                - usedFuelCard
                                - estimatedDistance
                                - documentId
                                - expenseLimitRangesId
                            description: รายการรายละเอียดexpense
                          workflowId:
                            type: string
                            description: รหัส workflow
                          canApprove:
                            type: boolean
                            description: |-
                              สามารถอนุมัติได้ไหม
                              true = ไม่ได้
                              false = ได้
                          isEdit:
                            type: boolean
                            description: |-
                              แก้ไขได้ไหม
                              true = แก้ได้
                              false = แก้ไม่ได้
                          deletable:
                            type: boolean
                            description: |-
                              ลบได้ไหม
                              true = ลบได้
                              false = ลบไม่ได้
                          total:
                            type: number
                            description: ยอดร่วม
                          attachments:
                            type: array
                            items:
                              type: object
                              properties:
                                attachmentId:
                                  type: integer
                                  description: |
                                    รหัสfileแนบ
                                refId:
                                  type: integer
                                  description: >-
                                    รหัสอ้างอิงจากตาราง activity, feedback,
                                    inventory,purchaseRequisition
                                type:
                                  type: integer
                                  description: |-
                                    ประเภท file:
                                    1 = activity
                                    2 = expense
                                    3 = customer
                                filename:
                                  type: string
                                  description: ไฟล์แนบ
                                extension:
                                  type: string
                                  description: นามสกุลไฟล์
                                fileSize:
                                  type: integer
                                  description: ขนาดไฟล์
                                isActive:
                                  type: boolean
                                  description: |-
                                    ใช้งานอยู่หรือไม่
                                    true = ใช้งานอยู่
                                    false = ไม่ได้ใช้งานอยู่
                                createdByUserId:
                                  type: string
                                  description: รหัส userid ผู้สร้าง
                                  nullable: true
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                                resourceUrl:
                                  type: string
                                  description: urlที่มา
                                  nullable: true
                                companyId:
                                  type: integer
                                  description: รหัสบริษัท
                                  nullable: true
                                isProcessed:
                                  type: boolean
                                  description: |-
                                    ดำเนินการแล้วหรือยัง
                                    true = ดำเนินการแล้ว
                                    false = ยังไม่ดำเนินการ
                                  nullable: true
                                url:
                                  type: string
                                  description: url
                                urlResponseUpload:
                                  type: string
                                  description: urlResponseUpload
                                thumbnail:
                                  type: string
                                  description: thumbnail
                              x-apidog-orders:
                                - attachmentId
                                - refId
                                - type
                                - filename
                                - extension
                                - fileSize
                                - isActive
                                - createdByUserId
                                - dateCreated
                                - resourceUrl
                                - companyId
                                - isProcessed
                                - url
                                - urlResponseUpload
                                - thumbnail
                              required:
                                - attachmentId
                                - refId
                                - type
                                - filename
                                - extension
                                - fileSize
                                - isActive
                                - dateCreated
                                - url
                                - urlResponseUpload
                                - thumbnail
                            description: รายการไฟล์แนบ
                          dateCheckout:
                            type: string
                            description: เวลา checkout
                          customerName:
                            type: string
                            description: ชื่อลูกค้า
                          dateCheckin:
                            type: string
                            description: เวลา checkin
                          pictureUrl:
                            type: string
                            description: url รูปภาพ
                          activityLogs:
                            type: array
                            items:
                              type: object
                              properties:
                                activityLogId:
                                  type: integer
                                  description: รหัส activitylog
                                refId:
                                  type: integer
                                  description: >-
                                    รหัสแต่ละประเภทของ Activity Log เช่น
                                    ActivityId,ExpensId,CaseId,etc
                                comment:
                                  type: string
                                  description: comment
                                jsonLog:
                                  type: string
                                  description: jsonlog
                                logType:
                                  type: integer
                                  description: >-
                                    ประเภทของ Activity Log เช่น
                                    Activity,Expens,Case,etc
                                status:
                                  type: integer
                                  description: สถานะรายการ
                                dateCreated:
                                  type: string
                                  description: เวลาสร้าง
                                createdByUserId:
                                  type: string
                                  description: useridผู้สร้าง
                                activity:
                                  type: object
                                  properties:
                                    activityId:
                                      type: integer
                                      description: รหัส id ของกิจกรรม
                                    teamId:
                                      type: integer
                                      description: รหัส teamหรือchannelที่สังกัด
                                    activityNo:
                                      type: string
                                      description: รหัสกิจกรรม
                                    subject:
                                      type: string
                                      description: หัวข้อ
                                    groupId:
                                      type: integer
                                      description: รหัสกลุ่ม
                                    activityTypeId:
                                      type: integer
                                      description: |
                                        รหัสประเภทกิจกรรม
                                    isActive:
                                      type: boolean
                                      description: กำหนดการใช้งาน 1 ใช้งาน 0 ไม่ใช้งาน
                                    statusId:
                                      type: integer
                                      description: รหัสสถานะ
                                    isAdHoc:
                                      type: boolean
                                      description: กรณี checkin โดยไม่มีการวางแผน
                                      nullable: true
                                    assignToUserId:
                                      type: string
                                      description: มอบหมายงานให้ staff
                                    dateAppointmentStart:
                                      type: string
                                      description: วันที่นัดเริ่มงาน
                                      nullable: true
                                    appointmentedByUserId:
                                      type: string
                                      description: ผู้นัดหมาย
                                    userRoleId:
                                      type: string
                                      description: รหัส role เพื่อกำหนดสิทธิการใช้งาน
                                    usesrOrgString:
                                      type: string
                                      description: โครงสร้างตามสายงาน
                                    userOrgLevel:
                                      type: integer
                                      description: ลำดับโครงสร้างตามสายงาน
                                    isRecurringPlan:
                                      type: boolean
                                      description: แผนที่มีการทำซ้ำ
                                      nullable: true
                                    recurringId:
                                      type: integer
                                      description: รหัสแผนที่มีการทำซ้ำ
                                      nullable: true
                                    isAllday:
                                      type: boolean
                                      description: |-
                                        กิจกรรมทุกวันไหม
                                        true = ใช่
                                        false = ไม่ใช่
                                      nullable: true
                                    source:
                                      type: integer
                                      description: 1 calendly
                                      nullable: true
                                    sourceEvent:
                                      type: integer
                                      description: |-
                                        1 = create 
                                        2 = delete 
                                        3 = rescheduled
                                      nullable: true
                                    dateCreated:
                                      type: string
                                      description: วันที่เวลาสร้าง
                                    createdByUserId:
                                      type: string
                                      description: รหัสของผู้สร้าง
                                    activitiesDeals:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: |
                                        รายการ deal ที่เชื่อมโยงกับ activity
                                    activityContacts:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: รายการ contact ที่เชื่อมโยงกับ activity
                                    activityExpenses:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: รายการ expense ที่เชื่อมโยงกับ activity
                                    activityParticipants:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: รายการของผู้ที่เข้าร่วมเกี่ยวกับกิจกรรม
                                    activityStates:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          activityId:
                                            type: integer
                                            description: รหัสกิจกรรม
                                          statusId:
                                            type: integer
                                            description: รหัสสถานะ
                                          createdByUserId:
                                            type: string
                                            description: รหัสuserid ของผู้สร้าง
                                          approveLevel:
                                            type: integer
                                            description: ลำดับขึ้นในการอนุมัติ
                                          seq:
                                            type: integer
                                            description: ลำดับ
                                          dateCreated:
                                            type: string
                                            description: เวลาสร้าง
                                          activityStateId:
                                            type: integer
                                            description: รหัส id ของ activity state
                                        x-apidog-orders:
                                          - activityStateId
                                          - activityId
                                          - statusId
                                          - createdByUserId
                                          - dateCreated
                                          - approveLevel
                                          - seq
                                        required:
                                          - activityStateId
                                          - activityId
                                          - statusId
                                          - createdByUserId
                                          - approveLevel
                                          - seq
                                          - dateCreated
                                      description: >-
                                        รายละเอียด state ต่างๆ
                                        ที่เชื่อมกับกิจกรรมนั้นๆ
                                    activitySubtypes:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          activityTypeId:
                                            type: integer
                                            description: รหัสประเภทกิจกรรม
                                          typeName:
                                            type: string
                                            description: ชื่อประเภท
                                        x-apidog-orders:
                                          - activityTypeId
                                          - typeName
                                        required:
                                          - activityTypeId
                                          - typeName
                                      description: >-
                                        รายการรายละเอียด  subtypes
                                        ที่เชื่อมกับกิจกรรม
                                    expenses:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: >-
                                        รายละเอียดรายการค่าใช้จ่าย expense
                                        ที่เชื่อมกับกิจกรรม
                                    feedbacks:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: รายการข้อเสนอแนะ
                                    createType:
                                      type: integer
                                      description: ประเภทการสร้าง
                                    isVisibleCustomerDetail:
                                      type: boolean
                                      description: |-
                                        สามารถมองเห็นรายละเอียดลูกค้าได้ไหม
                                        true = ได้
                                        false = ไม่ได้
                                    staffName:
                                      type: string
                                      description: ผู้รับหน้าที
                                    detailActivities:
                                      type: array
                                      items:
                                        type: integer
                                      description: รายการรหัส detail activity
                                    detailActivity:
                                      type: string
                                      description: ชื่อ detail activity "detail1, detail2"
                                    detailActivityModels:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          activityTypeId:
                                            type: integer
                                            description: รหัสประเภทกิจกรรม
                                          groupTypeId:
                                            type: integer
                                            description: |-
                                              Activity Group Type:
                                              1 = visit
                                              2 = woring
                                              3 = online conference
                                          seq:
                                            type: integer
                                            description: ลำดับ
                                          activityTypeName:
                                            type: array
                                            items:
                                              type: string
                                            description: ประเภทกิจกรรม
                                          contractTypeActivityDetails:
                                            type: array
                                            items:
                                              type: string
                                            description: >-
                                              รายการรายละเอียดประเภทสัญญาที่เกี่ยวกับกิจกรรม
                                          contractTypes:
                                            type: array
                                            items:
                                              type: string
                                            description: |
                                              ประเภทสัญญา
                                        x-apidog-orders:
                                          - activityTypeId
                                          - groupTypeId
                                          - seq
                                          - activityTypeName
                                          - contractTypeActivityDetails
                                          - contractTypes
                                        required:
                                          - activityTypeId
                                          - groupTypeId
                                          - seq
                                          - activityTypeName
                                          - contractTypeActivityDetails
                                          - contractTypes
                                      description: รายการ detail activity
                                    assignToUser:
                                      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: ชื่อเต็ม
                                        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: |-
                                            ใช้งานอยู่หรือไม่
                                            true = ใช้
                                            false = ไม่ใช้
                                        createdByUserId:
                                          type: string
                                          description: รหัสผู้สร้าง
                                        dateCreated:
                                          type: string
                                          description: เวลาสร้าง
                                        modifiedByUserId:
                                          type: string
                                          description: รหัสuseridของผู้แก้ไข
                                        hasPicture:
                                          type: boolean
                                          description: |-
                                            มีรูปหรือไหม 
                                            true = 1
                                            false = 2
                                        role:
                                          type: string
                                          description: หน้าที
                                        roleId:
                                          type: string
                                          description: รหัสหน้าที
                                        siteId:
                                          type: string
                                          description: รหัสงาน
                                        isAgreementPdpa:
                                          type: boolean
                                          description: |-
                                            ข้อตกลง PDPA
                                            true = ตกลง
                                            false = ไม่ตกลง
                                        dateAgreementPdpa:
                                          type: string
                                          description: เวลาตกลง PDPA
                                        emailSubscription:
                                          type: integer
                                          description: email สมัครสมาชิก
                                        identityUserId:
                                          type: string
                                          description: รหัสยืนยันตัวตน
                                        uniqueName:
                                          type: string
                                          description: ชื่อเฉพาะ
                                        inAppSubscription:
                                          type: integer
                                          description: สมัครสมาชิกในแอพ
                                        userType:
                                          type: integer
                                          description: ประเภทผู้ใช้
                                        platformId:
                                          type: integer
                                          description: รหัส id ของ platform
                                        isActiveEmpeo:
                                          type: boolean
                                          description: |-
                                            ใช้งาน empeo อยู่หรือไม่
                                            true = ใช้อยู่
                                            false = ไม่ได้ใช้งานอยู่
                                        refCompanyId:
                                          type: integer
                                          description: เลขอ้างอิงรหัสcompanyId
                                        refClientId:
                                          type: integer
                                          description: เลขอ้างอิงรหัส clientid
                                        signatureUrl:
                                          type: string
                                          description: urlรูปภาพลายแซ้น
                                        emailSupscriptionFlag:
                                          type: integer
                                          description: >-
                                            รหัส
                                            subscriptionflagของemailที่สมัครสมาชิกsubscriptionflag
                                        inAppSupscriptionFlag:
                                          type: integer
                                          description: >-
                                            รหัส subscriptionflag ที่ในการสมัครบนแอพ
                                            subscriptionflag
                                        pictureUrl:
                                          type: string
                                          description: url รูปภาพ
                                      x-apidog-orders:
                                        - userId
                                        - username
                                        - companyId
                                        - companyName
                                        - teamId
                                        - teamName
                                        - staffCode
                                        - title
                                        - firstname
                                        - lastname
                                        - fullname
                                        - position
                                        - email
                                        - phoneNumber
                                        - orgString
                                        - orgLevel
                                        - latitude
                                        - longitude
                                        - location
                                        - locationName
                                        - isActive
                                        - createdByUserId
                                        - dateCreated
                                        - modifiedByUserId
                                        - hasPicture
                                        - role
                                        - roleId
                                        - siteId
                                        - isAgreementPdpa
                                        - dateAgreementPdpa
                                        - emailSubscription
                                        - identityUserId
                                        - uniqueName
                                        - inAppSubscription
                                        - userType
                                        - platformId
                                        - isActiveEmpeo
                                        - refCompanyId
                                        - refClientId
                                        - signatureUrl
                                        - emailSupscriptionFlag
                                        - inAppSupscriptionFlag
                                        - pictureUrl
                                      required:
                                        - userId
                                        - username
                                        - companyId
                                        - companyName
                                        - teamId
                                        - teamName
                                        - staffCode
                                        - title
                                        - firstname
                                        - lastname
                                        - fullname
                                        - position
                                        - email
                                        - phoneNumber
                                        - orgString
                                        - orgLevel
                                        - latitude
                                        - longitude
                                        - location
                                        - locationName
                                        - isActive
                                        - createdByUserId
                                        - dateCreated
                                        - modifiedByUserId
                                        - hasPicture
                                        - role
                                        - roleId
                                        - siteId
                                        - isAgreementPdpa
                                        - emailSubscription
                                        - identityUserId
                                        - uniqueName
                                        - inAppSubscription
                                        - userType
                                        - platformId
                                        - isActiveEmpeo
                                        - refCompanyId
                                        - refClientId
                                        - signatureUrl
                                        - emailSupscriptionFlag
                                        - inAppSupscriptionFlag
                                        - pictureUrl
                                        - dateAgreementPdpa
                                      description: ข้อมูลผู้ที่ได้รับมอบหมาย
                                    assignToUsers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          userId:
                                            type: string
                                            description: 'รหัส userid '
                                          fullname:
                                            type: string
                                            description: ชื่อเต็ม
                                          dateModified:
                                            type: string
                                            description: เวลาแก้ไข
                                          pictureUrl:
                                            type: string
                                            description: Url รูปภาพ
                                          statusUser:
                                            type: integer
                                            description: รหัสสถานะงาน
                                        x-apidog-orders:
                                          - userId
                                          - fullname
                                          - dateModified
                                          - pictureUrl
                                          - statusUser
                                        required:
                                          - userId
                                          - fullname
                                          - dateModified
                                          - pictureUrl
                                          - statusUser
                                      description: >-
                                        ข้อมูลผู้เข้าร่วมที่อยู่ในทีม หรือ
                                        บริษัท
                                    contact:
                                      type: string
                                      description: ชื่อผู้ติดต่อทั้งหมด คั่นด้วย (,)
                                    contacts:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          contactId:
                                            type: integer
                                            description: รหัสid ของผู้ติดต่อ
                                          contactName:
                                            type: string
                                            description: ชื่อผู้ติดต่อ
                                          position:
                                            type: string
                                            description: ตำแหน่ง
                                          activityContacts:
                                            type: array
                                            items:
                                              type: string
                                            description: รายการกิจกรรมของผู้ติดต่อ
                                          contactProfiles:
                                            type: array
                                            items:
                                              type: string
                                            description: profileของผู้ติดต่อ
                                          contactSocialChats:
                                            type: array
                                            items:
                                              type: string
                                            description: >-
                                              รายการแชทของผู้ติดต่อ
                                              [](ไม่มีข้อมูลมาให้ในเส้นนี้) -1
                                          taskContacts:
                                            type: array
                                            items:
                                              type: string
                                            description: รายการงานของผู้ติดต่อ[]
                                        x-apidog-orders:
                                          - contactId
                                          - contactName
                                          - position
                                          - activityContacts
                                          - contactProfiles
                                          - contactSocialChats
                                          - taskContacts
                                        required:
                                          - contactId
                                          - contactName
                                          - position
                                          - activityContacts
                                          - contactProfiles
                                          - contactSocialChats
                                          - taskContacts
                                      description: รายการผู้ติดต่อ
                                    keyActivity:
                                      type: string
                                      description: ชื่อ key activity
                                    assignTo:
                                      type: string
                                      description: |-

                                        มอบหมายให้
                                    statusName:
                                      type: string
                                      description: |-

                                        ชื่อสถานะ
                                    assignedBy:
                                      type: string
                                      description: |-

                                        มอบหมายโดย
                                    attachments:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                        x-apidog-orders: []
                                      description: รายการไฟล์แนบ
                                    picureUrl:
                                      type: string
                                      description: |-

                                        Url รูปภาพ
                                    notes:
                                      type: string
                                      description: บันทึกรายละเอียด
                                      nullable: true
                                    visitLatitude:
                                      type: number
                                      description: ละติจูดที่นัดพบ
                                      nullable: true
                                    visitLongitude:
                                      type: number
                                      description: ลองติจูดที่นัดพบ
                                      nullable: true
                                    visitLocation:
                                      type: string
                                      description: สถานที่นัดพบ
                                      nullable: true
                                    visitLocationName:
                                      type: string
                                      description: ชื่อสถานที่นัดพบ
                                      nullable: true
                                    visitPlaceId:
                                      type: string
                                      description: รหัสสถานทีนัดพบ
                                      nullable: true
                                    dateAppointmentend:
                                      type: string
                                      description: วันที่นัดจบงาน
                                      nullable: true
                                    dateAppointmented:
                                      type: string
                                      description: วันที่เวลาสร้างนัดหมาย
                                      nullable: true
                                    isEdit:
                                      type: boolean
                                      description: |-
                                        สามารถแก้ไขได้ไหม
                                        true = แก้ไขได้
                                        false = ไม่สามารถแก้ไขได้
                                    isCancel:
                                      type: boolean
                                      description: |-
                                        สามารถยกเลิกได้ไหม
                                        true= ยกเลิกได้
                                        false=ไม่สามารถยกเลือกได้
                                    customerId:
                                      type: integer
                                      description: รหัส id ของลูกค้า
                                      nullable: true
                                    customerType:
                                      type: integer
                                      description: >-
                                        ประเภทลูกค้า Prospect=11200,
                                        Customer=11300, Lead=11100
                                      nullable: true
                                    customerState:
                                      type: integer
                                      description: >-
                                        <p>สถานะของลูกค้า Required : <br>1 =
                                        Lead ,<br> 2 = Prospect , <br>3 =
                                        Customer</p>
                                      nullable: true
                                    projectId:
                                      type: integer
                                      description: รหัสโปรแจค
                                      nullable: true
                                    latitude:
                                      type: number
                                      description: ละติจูดจริงที่ปฏิบัติงาน
                                      nullable: true
                                    longitude:
                                      type: number
                                      description: ลองติดจูดจริงที่ปฏิบัติงาน
                                      nullable: true
                                    location:
                                      type: string
                                      description: สถานที่จริงที่ปฏิบัติงาน
                                    locationName:
                                      type: string
                                      description: ชื่อสถานที่จริงที่ปฏิบัติงาน
                                    dateCheckin:
                                      type: string
                                      description: วันที่ทำการ Checkin
                                      nullable: true
                                    dateCheckout:
                                      type: string
                                      description: วันที่ทำการ checkout
                                      nullable: true
                                    isSelectLocation:
                                      type: boolean
                                      description: true เลือกสถานที่เอง
                                      nullable: true
                                    startLatitude:
                                      type: number
                                      description: ละติจูดเริ่มต้น
                                      nullable: true
                                    startLongitude:
                                      type: number
                                      description: ลองติจูดเริ่มต้น
                                      nullable: true
                                    startLocation:
                                      type: string
                                      description: สถานทีเริ่มต้น
                                      nullable: true
                                    startLocationName:
                                      type: string
                                      description: ชื่อสถานทีเริ่มต้น
                                      nullable: true
                                    startPlacaeId:
                                      type: string
                                      description: รหัสสถานทีเริ่มต้น
                                      nullable: true
                                    returnLatitude:
                                      type: number
                                      description: ละติจูดขากลับ
                                      nullable: true
                                    returnLongitude:
                                      type: number
                                      description: ลองติจูดขากลับ
                                      nullable: true
                                    returnLocation:
                                      type: string
                                      description: สถานที่ขากลับ
                                      nullable: true
                                    returnLocationName:
                                      type: string
                                      description: ชื่อสถานที่ขากลับ
                                      nullable: true
                                    returnPlaceId:
                                      type: string
                                      description: รหัสสถานทีขากลับ
                                      nullable: true
                                    totalDistance:
                                      type: number
                                      description: จำนวนระยะทาง
                                      nullable: true
                                    estimatedTravelAmount:
                                      type: number
                                      description: จำนวนค่าเดินทั้งหมด
                                      nullable: true
                                    totalExpenseAmount:
                                      type: number
                                      description: จำนวนค่าใช้จ่ายทั้งหมด
                                      nullable: true
                                    dateApproved:
                                      type: string
                                      description: วันที่เวลาอนุมัติ
                                      nullable: true
                                    approvedByUserId:
                                      type: string
                                      description: ผู้อนุมัติ
                                      nullable: true
                                    dateRejected:
                                      type: string
                                      description: วันที่เวลายกเลิก
                                      nullable: true
                                    rejectedByUserId:
                                      type: string
                                      description: ผู้ยกเลิก
                                      nullable: true
                                    userHeadUserId:
                                      type: string
                                      description: รหัสของหัวหน้า
                                      nullable: true
                                    checkoutLatitude:
                                      type: number
                                      description: ละติจูดจริงที่ปฏิบัติงาน
                                      nullable: true
                                    checkoutLognitude:
                                      type: number
                                      description: ลองติจูดที่ปฏิบัติงาน
                                      nullable: true
                                    checkoutLocation:
                                      type: string
                                      description: สถานทีจริงที่ปฏิบัติงาน
                                      nullable: true
                                    checkoutLocationName:
                                      type: string
                                      description: ชื่อสถานทีจริงที่ปฏิบัติงาน
                                      nullable: true
                                    waitingApproveByUserId:
                                      type: string
                                      description: รหัสidของผู้รออนุมัติ
                                      nullable: true
                                    waitingApproveByRoleId:
                                      type: string
                                      description: รหัส roleId ของผู้รออนุมัติ
                                      nullable: true
                                    type:
                                      type: integer
                                      description: >-
                                        ประเภทของกิจกรรม 1=checkin
                                        เพื่อพบลูกค้า, 2=checkin
                                        เพื่อทำงานนอกสถานทีแต่ไม่ได้เข้าพบลูกค้า,
                                        3= การทำงานใจสถานที (workin), 4=
                                        การทำงานอยู่บ้าน (Work from home)
                                      nullable: true
                                    siteId:
                                      type: integer
                                      description: รหัส Id สถานที
                                      nullable: true
                                    siteLocationName:
                                      type: string
                                      description: ชื่อสถานที
                                      nullable: true
                                    activityReport:
                                      type: string
                                      description: 'การบันทึกผลการเข้าพบลูกค้าในครั้งนั้น '
                                      nullable: true
                                    activityServiceId:
                                      type: integer
                                      description: >-
                                        รหัส id ของ service
                                        ที่มีเชื่อมกับกิจกรรม
                                      nullable: true
                                    adressId:
                                      type: integer
                                      description: รหัสที่อยู่
                                      nullable: true
                                    refActivityId:
                                      type: integer
                                      description: เลขที่อ้างอิงรหัส activity id
                                      nullable: true
                                    historyId:
                                      type: integer
                                      description: รหัส id ของประวัติการ call
                                      nullable: true
                                    dateModified:
                                      type: string
                                      description: วันที่เวลาแก้ไข
                                      nullable: true
                                    modifiedByUserId:
                                      type: string
                                      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: >-
                                            <p>ประเภทลูกค้า<br> Prospect=11200,
                                            <br>Customer=11300,<br> Lead=11100</p>
                                        customerType:
                                          type: integer
                                          description: |-
                                            ประเภท customer state ของลูกค้า
                                            prospect = 11200
                                            customer = 11300
                                            lead = 11100
                                        taxId:
                                          type: string
                                          description: รหัสภาษีของลูกค้า
                                        phone:
                                          type: string
                                          description: เบอร์โทรศัพท์
                                        mobile:
                                          type: string
                                          description: เบอร์มือถือ
                                        notes:
                                          type: string
                                          description: รายละเอียดเพิ่มเติม
                                        isActive:
                                          type: boolean
                                          description: |-
                                            ใช้งานอยู่หรือไม่
                                            true = ใช้งานอยู่
                                            false = ไม่ใช้งานอยู่
                                        createdByUserId:
                                          type: string
                                          description: userid ของผู้สร้าง
                                        dateCreated:
                                          type: string
                                          description: เวลาสร้าง
                                        customerGroupId:
                                          type: integer
                                          description: รหัสกลุ่มลูกค้า
                                        leadStatus:
                                          type: integer
                                          description: |-
                                            สถานะของ leadstateของลูกค้า:
                                            New = 110061
                                                         Followup = 110062
                                                         Unqualifed = 110063
                                                         Interested = 110064
                                        hasPicture:
                                          type: boolean
                                          description: |-
                                            มีรูปหรือไม่
                                            true = มี
                                            false = ไม่มี
                                        email:
                                          type: string
                                          description: อีเมล์ลูกค้า
                                        sourceOfLead:
                                          type: integer
                                          description: แหล่งที่มา
                                        classificationId:
                                          type: integer
                                          description: ชื่อหมวดหมู่
                                        hasOwner:
                                          type: boolean
                                          description: |-
                                            มีหัวหน้าหรือไม่
                                            true= มี owner
                                            false = ไม่มี
                                        uniqueName:
                                          type: string
                                          description: ชื่อเฉพาะ
                                        isRequireSoundex:
                                          type: boolean
                                          description: |-
                                            ต้องการ soundexไหม
                                            true = ต้องการ 
                                            fals = ไม่ต้องการ
                                        status:
                                          type: integer
                                          description: รหัสสถานะ
                                        dateFollowUp:
                                          type: string
                                          description: เวลาติดตาม
                                        dateLatestUpdated:
                                          type: string
                                          description: เวลาแก้ไขล่าสุด
                                        activities:
                                          type: array
                                          items:
                                            type: string
                                          description: กิจกรรม
                                        addresses:
                                          type: array
                                          items:
                                            type: string
                                          description: ที่อยู่
                                        contactSocialChats:
                                          type: array
                                          items:
                                            type: string
                                          description: socialChats ติดต่อของลูกค้า
                                        contacts:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการผู้ติดต่อ
                                        conversations:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการข้อมูลการสื่อสารกัน
                                        customerActivityLogs:
                                          type: array
                                          items:
                                            type: string
                                          description: >-
                                            รายการข้อมูลของลูกค้าที่เกี่ยวกับ
                                            activitylogเช่น activity,expense
                                        customerProfiles:
                                          type: array
                                          items:
                                            type: string
                                          description: profileของ ลูกค้า
                                        customerStatistics:
                                          type: array
                                          items:
                                            type: string
                                          description: สถิติของลูกค้า
                                        customerTargets:
                                          type: array
                                          items:
                                            type: string
                                          description: target ของลูกค้า
                                        customerWallets:
                                          type: array
                                          items:
                                            type: string
                                          description: walletของลูกค้า
                                        deals:
                                          type: array
                                          items:
                                            type: string
                                          description: ดีล
                                        inventories:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการเบิกค่าใช้จ่ายสำนักงาน
                                        leadStates:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการสถานะของลูกค้า
                                        reminderTasks:
                                          type: array
                                          items:
                                            type: string
                                          description: ข้อมูลงานที่เกี่ยวข้อง
                                        tagCustomers:
                                          type: array
                                          items:
                                            type: string
                                          description: แท็กลูกค้า
                                        userMapToCustomers:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการผู้ที่รับผิดชอบลูกค้า []
                                        pictureUrl:
                                          type: string
                                          description: รูปของลูกค้า โดยรับเป็น URL
                                        customerInterests:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการสิ่งที่สนใจของลูกค้า
                                        branchCode:
                                          type: string
                                          description: รหัสสาขา
                                        customDatas:
                                          type: string
                                          description: ข้อมูลลูกค้าแบบ กำหนดเอง
                                        leadAutoAssignRecords:
                                          type: array
                                          items:
                                            type: string
                                          description: รายการ
                                        customerTypeHistories:
                                          type: array
                                          items:
                                            type: string
                                          description: log การเปลี่ยน
                                      description: ข้อมูลลูกค้า
                                      x-apidog-orders:
                                        - customerId
                                        - companyId
                                        - customerCode
                                        - customerName
                                        - customerNameEn
                                        - type
                                        - customerType
                                        - taxId
                                        - branchCode
                                        - phone
                                        - mobile
                                        - notes
                                        - isActive
                                        - createdByUserId
                                        - dateCreated
                                        - customerGroupId
                                        - leadStatus
                                        - hasPicture
                                        - email
                                        - sourceOfLead
                                        - classificationId
                                        - hasOwner
                                        - uniqueName
                                        - customDatas
                                        - isRequireSoundex
                                        - status
                                        - dateFollowUp
                                        - dateLatestUpdated
                                        - activities
                                        - addresses
                                        - contactSocialChats
                                        - contacts
                                        - conversations
                                        - customerActivityLogs
                                        - customerInterests
                                        - customerProfiles
                                        - customerStatistics
                                        - customerTargets
                                        - customerWallets
                                        - customerTypeHistories
                                        - deals
                                        - inventories
                                        - leadAutoAssignRecords
                                        - leadStates
                                        - reminderTasks
                                        - tagCustomers
                                        - userMapToCustomers
                                        - pictureUrl
                                      required:
                                        - customerId
                                        - companyId
                                        - customerCode
                                        - customerName
                                        - customerNameEn
                                        - type
                                        - customerType
                                        - taxId
                                        - branchCode
                                        - phone
                                        - mobile
                                        - notes
                                        - isActive
                                        - createdByUserId
                                        - dateCreated
                                        - customerGroupId
                                        - leadStatus
                                        - hasPicture
                                        - email
                                        - sourceOfLead
                                        - classificationId
                                        - hasOwner
                                        - uniqueName
                                        - customDatas
                                        - isRequireSoundex
                                        - status
                                        - dateFollowUp
                                        - dateLatestUpdated
                                        - activities
                                        - addresses
                                        - contactSocialChats
                                        - contacts
                                        - conversations
                                        - customerActivityLogs
                                        - customerInterests
                                        - customerProfiles
                                        - customerStatistics
                                        - customerTargets
                                        - customerWallets
                                        - deals
                                        - inventories
                                        - leadStates
                                        - reminderTasks
                                        - tagCustomers
                                        - userMapToCustomers
                                        - pictureUrl
                                        - leadAutoAssignRecords
                                        - customerTypeHistories
                                      nullable: true
                                    canAddMember:
                                      type: boolean
                                      description: |-
                                        สามารถเพิ่มสมาชิกได้ไหม
                                        true = เพิ่มสมาชิกได้
                                        false = ไม่สามารถเพิ่มสมาชิกได้
                                  x-apidog-orders:
                                    - activityId
                                    - teamId
                                    - activityNo
                                    - subject
                                    - groupId
                                    - activityTypeId
                                    - customerId
                                    - customerType
                                    - customerState
                                    - projectId
                                    - latitude
                                    - longitude
                                    - location
                                    - locationName
                                    - notes
                                    - dateCheckin
                                    - dateCheckout
                                    - isActive
                                    - statusId
                                    - isSelectLocation
                                    - isAdHoc
                                    - assignToUserId
                                    - dateAppointmentStart
                                    - dateAppointmentend
                                    - startLatitude
                                    - startLongitude
                                    - startLocation
                                    - startLocationName
                                    - startPlacaeId
                                    - visitLatitude
                                    - visitLongitude
                                    - visitLocation
                                    - visitLocationName
                                    - visitPlaceId
                                    - returnLatitude
                                    - returnLongitude
                                    - returnLocation
                                    - returnLocationName
                                    - returnPlaceId
                                    - totalDistance
                                    - estimatedTravelAmount
                                    - totalExpenseAmount
                                    - dateAppointmented
                                    - appointmentedByUserId
                                    - dateApproved
                                    - approvedByUserId
                                    - dateRejected
                                    - rejectedByUserId
                                    - userRoleId
                                    - usesrOrgString
                                    - userOrgLevel
                                    - userHeadUserId
                                    - checkoutLatitude
                                    - checkoutLognitude
                                    - checkoutLocation
                                    - checkoutLocationName
                                    - waitingApproveByUserId
                                    - waitingApproveByRoleId
                                    - type
                                    - siteId
                                    - siteLocationName
                                    - activityReport
                                    - activityServiceId
                                    - adressId
                                    - refActivityId
                                    - historyId
                                    - isRecurringPlan
                                    - recurringId
                                    - isAllday
                                    - source
                                    - sourceEvent
                                    - dateCreated
                                    - createdByUserId
                                    - dateModified
                                    - modifiedByUserId
                                    - Customer
                                    - activitiesDeals
                                    - activityContacts
                                    - activityExpenses
                                    - activityParticipants
                                    - activityStates
                                    - activitySubtypes
                                    - expenses
                                    - feedbacks
                                    - createType
                                    - isEdit
                                    - isCancel
                                    - isVisibleCustomerDetail
                                    - staffName
                                    - detailActivities
                                    - detailActivity
                                    - detailActivityModels
                                    - assignToUser
                                    - assignToUsers
                                    - contact
                                    - contacts
                                    - keyActivity
                                    - assignTo
                                    - statusName
                                    - assignedBy
                                    - attachments
                                    - picureUrl
                                    - canAddMember
                                  required:
                                    - activityId
                                    - teamId
                                    - activityNo
                                    - subject
                                    - groupId
                                    - activityTypeId
                                    - isActive
                                    - statusId
                                    - assignToUserId
                                    - appointmentedByUserId
                                    - userRoleId
                                    - usesrOrgString
                                    - userOrgLevel
                                    - dateCreated
                                    - createdByUserId
                                    - activitiesDeals
                                    - activityContacts
                                    - activityExpenses
                                    - activityParticipants
                                    - activityStates
                                    - activitySubtypes
                                    - expenses
                                    - feedbacks
                                    - createType
                                    - isVisibleCustomerDetail
                                    - staffName
                                    - detailActivities
                                    - detailActivity
                                    - detailActivityModels
                                    - assignToUser
                                    - assignToUsers
                                    - contact
                                    - contacts
                                    - keyActivity
                                    - assignTo
                                    - statusName
                                    - assignedBy
                                    - attachments
                                    - picureUrl
                                    - canAddMember
                                    - isEdit
                                    - isCancel
                                    - location
                                    - locationName
                                  description: รายละเอียดกิจกรรม
                                userInfo:
                                  type: object
                                  properties:
                                    userId:
                                      type: string
                                      description: รหัสuserid
                                    fullname:
                                      type: string
                                      description: ชื่อเต็ม
                                    dateCreated:
                                      type: string
                                      description: เวลาสร้าง
                                    dateModified:
                                      type: string
                                      description: เวลาแก้ไข
                                    identityUserId:
                                      type: string
                                      description: รหัสยืนยันตัวตน
                                    pictureUrl:
                                      type: string
                                      description: urlรูปภาพ
                                  x-apidog-orders:
                                    - userId
                                    - fullname
                                    - dateCreated
                                    - dateModified
                                    - identityUserId
                                    - pictureUrl
                                  required:
                                    - userId
                                    - fullname
                                    - dateCreated
                                    - dateModified
                                    - identityUserId
                                    - pictureUrl
                                  description: รายละเอียดผู้สร้าง
                                refGroupId:
                                  type: integer
                                  description: เก็บ id กลุ่มของ Activity Participants
                                activityId:
                                  type: object
                                  properties:
                                    activityId:
                                      type: integer
                                      description: รหัสกิจกรรม
                                  description: รายการรหัสกิจกรรม
                                  x-apidog-orders:
                                    - activityId
                                  required:
                                    - activityId
                              x-apidog-orders:
                                - activityLogId
                                - refId
                                - refGroupId
                                - comment
                                - jsonLog
                                - logType
                                - status
                                - dateCreated
                                - createdByUserId
                                - activity
                                - userInfo
                                - activityId
                              required:
                                - activityLogId
                                - refId
                                - comment
                                - jsonLog
                                - logType
                                - status
                                - dateCreated
                                - createdByUserId
                                - activity
                                - userInfo
                                - activityId
                                - refGroupId
                            description: รายการ activitylog
                          expenseNo:
                            type: string
                            description: รหัสexpense
                        x-apidog-orders:
                          - expenseId
                          - teamId
                          - activityId
                          - expenseNo
                          - statusId
                          - dateTransaction
                          - createdByUserId
                          - dateCreated
                          - updateByUserId
                          - dateUpdated
                          - waitingApproveByUserId
                          - waitingApproveByRoleId
                          - waitingApproveByRankNo
                          - ApprovedByUserId
                          - dateApproved
                          - modifiedByUserId
                          - remark
                          - subject
                          - currencyCode
                          - exchangeRate
                          - totalBaht
                          - nextApproveType
                          - nextApproveData
                          - workflowId
                          - activityExpenses
                          - expenseDetails
                          - expenseStates
                          - canApprove
                          - isEdit
                          - deletable
                          - total
                          - attachments
                          - dateCheckout
                          - customerName
                          - dateCheckin
                          - pictureUrl
                          - activityLogs
                        required:
                          - teamId
                          - statusId
                          - dateTransaction
                          - createdByUserId
                          - dateCreated
                          - subject
                          - totalBaht
                          - activityExpenses
                          - expenseDetails
                          - expenseStates
                          - attachments
                          - pictureUrl
                          - expenseId
                          - expenseNo
                      statusCode:
                        type: integer
                        description: >-
                          <p>สถานะ statusCode ของ httpเช่น<br>200 Ok<br>201
                          Created<br>400 BadRequest<br>401 Unauthorized<br>404
                          Record not found<br>500 Internal Server Error</p>
                    x-apidog-orders:
                      - value
                      - statusCode
                    required:
                      - value
                      - statusCode
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - data
                required:
                  - statusCode
                  - httpStatusCode
                  - data
              example:
                data:
                  value:
                    expenseId: 1
                    teamId: 1
                    expenseNo: string
                    statusId: 302
                    dateTransaction: 2023-01-22T08:47:23+0700
                    createdByUserId: string
                    dateCreated: 2023-01-22T12:54:25+0700
                    remark: string
                    subject: string
                    totalBaht: 2
                    activityExpenses: []
                    expenseDetails:
                      - expenseDetailId: 1
                        expenseId: 1
                        expenseTypeId: 1
                        categoryId: 1
                        quantity: 1
                        amount1: 1
                    expenseStates:
                      - expenseStatesId: 1
                        expenseId: 1
                        statusId: 302
                        createdByUserId: string
                        dateCreated: 2023-01-22T12:54:25+0700
                        approveLevel: 1
                        seq: 1
                    canApprove: false
                    isEdit: true
                    deletable: true
                    total: 2
                    attachments: []
                    pictureUrl: string
                    activityLogs:
                      - activityLogId: 1
                        refId: 1
                        comment: string
                        logType: 270002
                        status: 1020
                        dateCreated: 2023-01-22T12:54:25+0700
                        createdByUserId: string
                        userInfo:
                          userId: string
                          fullname: string
                          dateCreated: 2018-11-05T10:13:59+0700
                          dateModified: 2023-01-20T11:38:34+0700
                          identityUserId: string
                          pictureUrl: string
                        activityId: {}
                  statusCode: 200
                statusCode: 1000
                httpStatusCode: 200
          headers: {}
          x-apidog-name: OK
        '400':
          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 = ไม่มี
                  validationErrors:
                    type: object
                    properties:
                      expenseTypeId:
                        type: string
                        description: รายละเอียด error ที่เกี่ยวกับ expenseTypeId
                        nullable: true
                      night:
                        type: string
                        description: รายละเอียดเกี่ยวกับ error ของ night
                        nullable: true
                    x-apidog-orders:
                      - expenseTypeId
                      - night
                    description: รายละเอียดรายการที่เกิดerror ของ validationErros
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - validationErrors
                description: ' กรณีที่คนที่request bodyมีข้อผิดพลาด'
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - validationErrors
              example:
                hasError: true
                errorMessage: Missing required parameters
                validationErrors:
                  expenseTypeId: The ExpenseTypeId field is required.
                statusCode: 1101
                httpStatusCode: 400
          headers: {}
          x-apidog-name: Bad Request
        '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
              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-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่ดูไม่มี permission view data '
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
              example:
                data:
                  authenticationSchemes: []
                hasError: true
                errorMessage: Invalid access rights
                statusCode: 9503
                httpStatusCode: 403
          headers: {}
          x-apidog-name: Forbidden
      security:
        - bearer: []
      x-apidog-folder: Venio/Expense
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3606568-run
components:
  schemas: {}
  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: []

```
