# Create or Update Activity

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/activities:
    post:
      summary: Create or Update Activity
      deprecated: false
      description: ''
      tags:
        - Venio/Activity
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscriptionของลูกค้า
          required: true
          example: <Your-Subscription-Key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                activityNo:
                  type: string
                  description: หมายเลขกิจกรรม
                  nullable: true
                subject:
                  type: string
                  description: หัวข้อ
                keyActivity:
                  type: string
                  description: ประเภทกิจกรรม
                activityTypeId:
                  type: string
                  description: รหัสประเภทกิจกรรม
                  nullable: true
                activityDetails:
                  type: array
                  items:
                    type: string
                  description: รายละเอียดกิจกรรม
                  nullable: true
                activityDetailIds:
                  type: array
                  items:
                    type: integer
                  description: รหัสรายละเอียดกิจกรรม
                  nullable: true
                customerCode:
                  type: string
                  description: รหัสลูกค้า
                contacts:
                  type: array
                  items:
                    type: string
                  description: รายชื่อผู้ติดต่อ
                  nullable: true
                note:
                  type: string
                  description: บันทึกเพิ่มเติม
                  nullable: true
                reviseReason:
                  type: string
                  description: เหตุผลการเปลี่ยนแปลงกิจกรรม
                  nullable: true
                dateAppointmentStart:
                  type: string
                  description: วันที่นัดเริ่มงาน
                dateAppointmentEnd:
                  type: string
                  description: วันที่นัดจบงาน
                assignTos:
                  type: array
                  items:
                    type: string
                  description: มอบหมายงานให้ Staff
                startLocation:
                  type: string
                  description: สถานที่เริ่มต้น
                  nullable: true
                startLocationName:
                  type: string
                  description: ชื่อสถานที่เริ่มต้น
                  nullable: true
                visitLocation:
                  type: string
                  description: สถานที่ปฏิบัติงาน
                  nullable: true
                visitLocationName:
                  type: string
                  description: ชื่อสถานที่ปฏิบัติงาน
                  nullable: true
                isAllDay:
                  type: boolean
                  description: เป็นกิจกรรมทั้งวันหรือไม่
                isRecurringPlan:
                  type: boolean
                  description: สร้างกิจกรรมซ้ำหรือไม่
                isEditAllSeries:
                  type: boolean
                  description: แก้ไขกิจกรรมทุกรายการวนซ้ำหรือไม่
                recurringPlanType:
                  type: integer
                  description: >-
                    <p>ประเภทกิจกรรมวนซ้ำ<br>Weekday = 1701<br>Daily =
                    1702<br>Weekly = 1703<br>Monthly = 1704<br>Yearly =
                    1705<br>Custom = 1706</p>
                  nullable: true
                recurringEndDate:
                  type: string
                  description: วันที่สิ้นสุดการวนซ้ำ
                  nullable: true
                customRecurring:
                  type: object
                  properties:
                    customRecurringNumber:
                      type: integer
                      description: จำนวนกิจกรรมที่ต้องการจะสร้าง
                    customRecurringType:
                      type: integer
                      description: >-
                        <p>ประเภทกิจกรรมวนซ้ำแบบปรับแต่ง<br>Day = 1801<br>Week =
                        1802<br>Month = 1803</p>
                  x-apidog-orders:
                    - customRecurringNumber
                    - customRecurringType
                  required:
                    - customRecurringNumber
                    - customRecurringType
                  description: สำหรับตั้งค่ากิจกรรมวนซ้ำประเภท Custom
                  x-apidog-ignore-properties: []
                  nullable: true
              required:
                - subject
                - keyActivity
                - customerCode
                - dateAppointmentStart
                - dateAppointmentEnd
                - assignTos
                - isAllDay
                - isRecurringPlan
                - isEditAllSeries
              x-apidog-orders:
                - activityNo
                - subject
                - keyActivity
                - activityTypeId
                - activityDetails
                - activityDetailIds
                - customerCode
                - contacts
                - note
                - reviseReason
                - dateAppointmentStart
                - dateAppointmentEnd
                - assignTos
                - startLocation
                - startLocationName
                - visitLocation
                - visitLocationName
                - isAllDay
                - isRecurringPlan
                - isEditAllSeries
                - recurringPlanType
                - recurringEndDate
                - customRecurring
              x-apidog-ignore-properties: []
            example:
              activityNo: string
              subject: string
              keyActivity: string
              activityTypeId: 1
              activityDetails:
                - string
              activityDetailIds:
                - 1
              customerCode: string
              contacts:
                - string
              note: string
              reviseReason: string
              dateAppointmentStart: '2025-06-17 15:00:00'
              dateAppointmentEnd: '2025-06-17 16:00:00'
              assignTos:
                - string
              startLocation: string
              startLocationName: string
              visitLocation: string
              visitLocationName: string
              isAllDay: false
              isRecurringPlan: false
              isEditAllSeries: false
              recurringPlanType: 1706
              recurringEndDate: '2025-06-19'
              customRecurring:
                customRecurringNumber: 1
                customRecurringType: 1801
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      value:
                        properties:
                          activityId:
                            type: integer
                          teamId:
                            type: integer
                          activityNo:
                            type: string
                          subject:
                            type: string
                          groupId:
                            type: integer
                          activityTypeId:
                            type: integer
                          customerId:
                            type: integer
                          customerState:
                            type: integer
                          latitude:
                            type: integer
                          longitude:
                            type: integer
                          location:
                            type: string
                          locationName:
                            type: string
                          dateCheckin:
                            type: string
                          dateCheckout:
                            type: string
                          isActive:
                            type: boolean
                          statusId:
                            type: integer
                          isAdHoc:
                            type: boolean
                          assignToUserId:
                            type: string
                          dateAppointmentStart:
                            type: string
                          dateAppointmentEnd:
                            type: string
                          startLatitude:
                            type: integer
                          startLongitude:
                            type: integer
                          startLocation:
                            type: string
                          startLocationName:
                            type: string
                          startPlaceId:
                            type: string
                          visitLatitude:
                            type: integer
                          visitLongitude:
                            type: integer
                          visitLocation:
                            type: string
                          visitLocationName:
                            type: string
                          visitPlaceId:
                            type: string
                          totalDistance:
                            type: integer
                          dateAppointmented:
                            type: string
                          appointmentedByUserId:
                            type: string
                          dateApproved:
                            type: string
                          approvedByUserId:
                            type: string
                          userRoleId:
                            type: string
                          userOrgString:
                            type: string
                          userOrgLevel:
                            type: integer
                          checkoutLatitude:
                            type: integer
                          checkoutLongitude:
                            type: integer
                          checkoutLocation:
                            type: string
                          checkoutLocationName:
                            type: string
                          activityReport:
                            type: string
                          addressId:
                            type: integer
                          refActivityId:
                            type: integer
                          dateCreated:
                            type: string
                          createdByUserId:
                            type: string
                          dateModified:
                            type: string
                          modifiedByUserId:
                            type: string
                          customer:
                            type: object
                            properties:
                              customerId:
                                type: integer
                              companyId:
                                type: integer
                              customerCode:
                                type: string
                              customerName:
                                type: string
                              type:
                                type: integer
                              customerType:
                                type: integer
                              branch:
                                type: string
                              addressPart1:
                                type: string
                              phone:
                                type: string
                              mobile:
                                type: string
                              fax:
                                type: string
                              notes:
                                type: string
                              isActive:
                                type: boolean
                              dateChangeToCustomer:
                                type: string
                              createdByUserId:
                                type: string
                              dateCreated:
                                type: string
                              modifiedByUserId:
                                type: string
                              dateModified:
                                type: string
                              customerGroupId:
                                type: integer
                              leadStatus:
                                type: integer
                              email:
                                type: string
                              customerStateId:
                                type: integer
                              hasOwner:
                                type: boolean
                              dateAcquired:
                                type: string
                              uniqueName:
                                type: string
                              isRequireSoundex:
                                type: boolean
                              status:
                                type: integer
                              dateFollowUp:
                                type: string
                              dateLatestUpdated:
                                type: string
                              pictureUrl:
                                type: string
                            required:
                              - customerId
                              - companyId
                              - customerCode
                              - customerName
                              - type
                              - customerType
                              - branch
                              - addressPart1
                              - phone
                              - mobile
                              - fax
                              - notes
                              - isActive
                              - dateChangeToCustomer
                              - createdByUserId
                              - dateCreated
                              - modifiedByUserId
                              - dateModified
                              - customerGroupId
                              - leadStatus
                              - email
                              - customerStateId
                              - hasOwner
                              - dateAcquired
                              - uniqueName
                              - isRequireSoundex
                              - status
                              - dateFollowUp
                              - dateLatestUpdated
                              - pictureUrl
                            x-apidog-orders:
                              - customerId
                              - companyId
                              - customerCode
                              - customerName
                              - type
                              - customerType
                              - branch
                              - addressPart1
                              - phone
                              - mobile
                              - fax
                              - notes
                              - isActive
                              - dateChangeToCustomer
                              - createdByUserId
                              - dateCreated
                              - modifiedByUserId
                              - dateModified
                              - customerGroupId
                              - leadStatus
                              - email
                              - customerStateId
                              - hasOwner
                              - dateAcquired
                              - uniqueName
                              - isRequireSoundex
                              - status
                              - dateFollowUp
                              - dateLatestUpdated
                              - pictureUrl
                          activityStates:
                            type: array
                            items:
                              type: object
                              properties:
                                activityStateId:
                                  type: integer
                                activityId:
                                  type: integer
                                statusId:
                                  type: integer
                                createdByUserId:
                                  type: string
                                dateCreated:
                                  type: string
                                approveLevel:
                                  type: integer
                                seq:
                                  type: integer
                              required:
                                - activityStateId
                                - activityId
                                - statusId
                                - createdByUserId
                                - dateCreated
                                - approveLevel
                                - seq
                              x-apidog-orders:
                                - activityStateId
                                - activityId
                                - statusId
                                - createdByUserId
                                - dateCreated
                                - approveLevel
                                - seq
                          activitySubtypes:
                            type: array
                            items:
                              type: object
                              properties:
                                activityTypeId:
                                  type: integer
                                typeName:
                                  type: string
                              x-apidog-orders:
                                - activityTypeId
                                - typeName
                          createType:
                            type: integer
                          isVisibleCustomerDetail:
                            type: boolean
                          staffName:
                            type: string
                          detailActivities:
                            type: array
                            items:
                              type: integer
                          detailActivity:
                            type: string
                          detailActivityModels:
                            type: array
                            items:
                              type: object
                              properties:
                                activityTypeId:
                                  type: integer
                                activityTypeName:
                                  type: string
                              x-apidog-orders:
                                - activityTypeId
                                - activityTypeName
                          assignToUser:
                            type: object
                            properties:
                              userId:
                                type: string
                              username:
                                type: string
                              companyId:
                                type: integer
                              companyName:
                                type: string
                              teamId:
                                type: integer
                              teamName:
                                type: string
                              staffCode:
                                type: string
                              title:
                                type: string
                              firstname:
                                type: string
                              lastname:
                                type: string
                              fullname:
                                type: string
                              position:
                                type: string
                              email:
                                type: string
                              phoneNumber:
                                type: string
                              orgString:
                                type: string
                              orgLevel:
                                type: integer
                              latitude:
                                type: integer
                              longitude:
                                type: integer
                              location:
                                type: string
                              locationName:
                                type: string
                              isActive:
                                type: boolean
                              createdByUserId:
                                type: string
                              dateCreated:
                                type: string
                              modifiedByUserId:
                                type: string
                              dateModified:
                                type: string
                              hasPicture:
                                type: boolean
                              role:
                                type: string
                              roleId:
                                type: string
                              siteId:
                                type: integer
                              isAgreementPdpa:
                                type: boolean
                              dateAgreementPdpa:
                                type: string
                              emailSubscription:
                                type: integer
                              identityUserId:
                                type: string
                              uniqueName:
                                type: string
                              inAppSubscription:
                                type: integer
                              userType:
                                type: integer
                              platformId:
                                type: integer
                              isActiveEmpeo:
                                type: boolean
                              refCompanyId:
                                type: integer
                              refClientId:
                                type: integer
                              signatureUrl:
                                type: string
                              emailSupscriptionFlag:
                                type: integer
                              inAppSupscriptionFlag:
                                type: integer
                              pictureUrl:
                                type: string
                            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
                              - dateModified
                              - hasPicture
                              - role
                              - roleId
                              - siteId
                              - isAgreementPdpa
                              - dateAgreementPdpa
                              - emailSubscription
                              - identityUserId
                              - uniqueName
                              - inAppSubscription
                              - userType
                              - platformId
                              - isActiveEmpeo
                              - refCompanyId
                              - refClientId
                              - signatureUrl
                              - emailSupscriptionFlag
                              - inAppSupscriptionFlag
                              - pictureUrl
                            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
                              - dateModified
                              - hasPicture
                              - role
                              - roleId
                              - siteId
                              - isAgreementPdpa
                              - dateAgreementPdpa
                              - emailSubscription
                              - identityUserId
                              - uniqueName
                              - inAppSubscription
                              - userType
                              - platformId
                              - isActiveEmpeo
                              - refCompanyId
                              - refClientId
                              - signatureUrl
                              - emailSupscriptionFlag
                              - inAppSupscriptionFlag
                              - pictureUrl
                          assignToUsers:
                            type: array
                            items:
                              type: object
                              properties:
                                userId:
                                  type: string
                                fullname:
                                  type: string
                                dateModified:
                                  type: string
                                pictureUrl:
                                  type: string
                                statusUser:
                                  type: integer
                              x-apidog-orders:
                                - userId
                                - fullname
                                - dateModified
                                - pictureUrl
                                - statusUser
                          contact:
                            type: string
                          contacts:
                            type: array
                            items:
                              type: object
                              properties:
                                contactId:
                                  type: integer
                                contactName:
                                  type: string
                                position:
                                  type: string
                              x-apidog-orders:
                                - contactId
                                - contactName
                                - position
                          keyActivity:
                            type: string
                          assignTo:
                            type: string
                          statusName:
                            type: string
                          assignedBy:
                            type: string
                          attachments:
                            type: array
                            items:
                              type: object
                              x-apidog-refs:
                                01JYH0M5GZZA3TXTP582Y0FVZ3: &ref_0
                                  $ref: '#/components/schemas/AttachmentDto'
                                  x-apidog-overrides:
                                    filename: null
                                    extension: null
                                    fileSize: null
                                    createdByUserId: null
                                    companyId: null
                                    isProcessed: null
                                    data: null
                                    timeStamp: null
                                    'no': null
                                    url: null
                                    urlUpload: null
                                    localFileURL: null
                                    uuid: null
                                    publicUrl: null
                                    seq: null
                                    isCover: null
                              x-apidog-orders:
                                - 01JYH0M5GZZA3TXTP582Y0FVZ3
                              properties: {}
                          customerName:
                            type: string
                          pictureUrl:
                            type: string
                          canAddMember:
                            type: boolean
                        required:
                          - activityId
                          - teamId
                          - activityNo
                          - subject
                          - groupId
                          - activityTypeId
                          - customerId
                          - customerState
                          - latitude
                          - longitude
                          - location
                          - locationName
                          - dateCheckin
                          - dateCheckout
                          - isActive
                          - statusId
                          - isAdHoc
                          - assignToUserId
                          - dateAppointmentStart
                          - dateAppointmentEnd
                          - startLatitude
                          - startLongitude
                          - startLocation
                          - startLocationName
                          - startPlaceId
                          - visitLatitude
                          - visitLongitude
                          - visitLocation
                          - visitLocationName
                          - visitPlaceId
                          - totalDistance
                          - dateAppointmented
                          - appointmentedByUserId
                          - dateApproved
                          - approvedByUserId
                          - userRoleId
                          - userOrgString
                          - userOrgLevel
                          - checkoutLatitude
                          - checkoutLongitude
                          - checkoutLocation
                          - checkoutLocationName
                          - activityReport
                          - addressId
                          - refActivityId
                          - dateCreated
                          - createdByUserId
                          - dateModified
                          - modifiedByUserId
                          - customer
                          - activityStates
                          - activitySubtypes
                          - createType
                          - isVisibleCustomerDetail
                          - staffName
                          - detailActivities
                          - detailActivity
                          - detailActivityModels
                          - assignToUser
                          - assignToUsers
                          - contact
                          - contacts
                          - keyActivity
                          - assignTo
                          - statusName
                          - assignedBy
                          - attachments
                          - customerName
                          - pictureUrl
                          - canAddMember
                        x-apidog-orders:
                          - activityId
                          - teamId
                          - activityNo
                          - subject
                          - groupId
                          - activityTypeId
                          - customerId
                          - customerState
                          - latitude
                          - longitude
                          - location
                          - locationName
                          - dateCheckin
                          - dateCheckout
                          - isActive
                          - statusId
                          - isAdHoc
                          - assignToUserId
                          - dateAppointmentStart
                          - dateAppointmentEnd
                          - startLatitude
                          - startLongitude
                          - startLocation
                          - startLocationName
                          - startPlaceId
                          - visitLatitude
                          - visitLongitude
                          - visitLocation
                          - visitLocationName
                          - visitPlaceId
                          - totalDistance
                          - dateAppointmented
                          - appointmentedByUserId
                          - dateApproved
                          - approvedByUserId
                          - userRoleId
                          - userOrgString
                          - userOrgLevel
                          - checkoutLatitude
                          - checkoutLongitude
                          - checkoutLocation
                          - checkoutLocationName
                          - activityReport
                          - addressId
                          - refActivityId
                          - dateCreated
                          - createdByUserId
                          - dateModified
                          - modifiedByUserId
                          - customer
                          - activityStates
                          - activitySubtypes
                          - createType
                          - isVisibleCustomerDetail
                          - staffName
                          - detailActivities
                          - detailActivity
                          - detailActivityModels
                          - assignToUser
                          - assignToUsers
                          - contact
                          - contacts
                          - keyActivity
                          - assignTo
                          - statusName
                          - assignedBy
                          - attachments
                          - customerName
                          - pictureUrl
                          - canAddMember
                        $ref: '#/components/schemas/Activity'
                      statusCode:
                        type: integer
                    required:
                      - value
                      - statusCode
                    x-apidog-orders:
                      - value
                      - statusCode
                    x-apidog-ignore-properties: []
                  statusCode:
                    type: integer
                  httpStatusCode:
                    type: integer
                required:
                  - data
                  - statusCode
                  - httpStatusCode
                x-apidog-orders:
                  - data
                  - statusCode
                  - httpStatusCode
                x-apidog-ignore-properties: []
              example:
                data:
                  value:
                    activityId: 1
                    teamId: 1
                    activityNo: string
                    subject: string
                    groupId: 1
                    activityTypeId: 1
                    customerId: 1
                    customerState: 1
                    latitude: 0
                    longitude: 0
                    location: string
                    locationName: string
                    dateCheckin: 2020-11-17T18:30:09+0700
                    dateCheckout: 2020-11-17T18:31:07+0700
                    isActive: true
                    statusId: 1
                    isAdHoc: false
                    assignToUserId: string
                    dateAppointmentStart: 2020-11-17T18:00:46+0700
                    dateAppointmentEnd: 2020-11-17T20:00:46+0700
                    startLatitude: 0
                    startLongitude: 0
                    startLocation: string
                    startLocationName: string
                    startPlaceId: string
                    visitLatitude: 0
                    visitLongitude: 0
                    visitLocation: string
                    visitLocationName: string
                    visitPlaceId: string
                    totalDistance: 0
                    dateAppointmented: 2020-11-17T17:56:59+0700
                    appointmentedByUserId: string
                    dateApproved: 2020-11-17T17:56:59+0700
                    approvedByUserId: string
                    userRoleId: string
                    userOrgString: string
                    userOrgLevel: 1
                    checkoutLatitude: 0
                    checkoutLongitude: 0
                    checkoutLocation: string
                    checkoutLocationName: string
                    activityReport: string
                    addressId: 1
                    refActivityId: 1
                    dateCreated: 2020-11-17T17:56:59+0700
                    createdByUserId: string
                    dateModified: 2022-11-21T18:48:18+0700
                    modifiedByUserId: string
                    customer:
                      customerId: 1
                      companyId: 1
                      customerCode: string
                      customerName: string
                      type: 1
                      customerType: 1
                      branch: string
                      addressPart1: string
                      phone: string
                      mobile: string
                      fax: string
                      notes: string
                      isActive: true
                      dateChangeToCustomer: 2022-07-06T16:26:21+0700
                      createdByUserId: string
                      dateCreated: 2020-07-18T12:30:57+0700
                      modifiedByUserId: string
                      dateModified: 2022-09-08T17:38:21+0700
                      customerGroupId: 1
                      leadStatus: 1
                      email: string
                      customerStateId: 1
                      hasOwner: true
                      dateAcquired: 2022-07-06T16:26:21+0700
                      uniqueName: string
                      isRequireSoundex: true
                      status: 1
                      dateFollowUp: 2022-05-17T09:00:00+0700
                      dateLatestUpdated: 2022-12-10T21:00:00+0700
                      pictureUrl: string
                    activityStates:
                      - activityStateId: 1
                        activityId: 1
                        statusId: 1
                        createdByUserId: string
                        dateCreated: 2020-11-17T18:30:09+0700
                        approveLevel: 1
                        seq: 0
                      - activityStateId: 1
                        activityId: 1
                        statusId: 1
                        createdByUserId: string
                        dateCreated: 2020-11-17T17:56:59+0700
                        approveLevel: 1
                        seq: 0
                    activitySubtypes:
                      - activityTypeId: 1
                        typeName: string
                    createType: 3
                    isVisibleCustomerDetail: true
                    staffName: string
                    detailActivities:
                      - 0
                    detailActivity: string
                    detailActivityModels:
                      - activityTypeId: 1
                        activityTypeName: string
                    assignToUser:
                      userId: string
                      username: string
                      companyId: 1
                      companyName: string
                      teamId: 1
                      teamName: string
                      staffCode: string
                      title: ''
                      firstname: string
                      lastname: string
                      fullname: string
                      position: string
                      email: string
                      phoneNumber: string
                      orgString: string
                      orgLevel: 1
                      latitude: 0
                      longitude: 0
                      location: string
                      locationName: string
                      isActive: true
                      createdByUserId: string
                      dateCreated: 2018-11-05T10:13:59+0700
                      modifiedByUserId: string
                      dateModified: 2023-01-13T10:26:26+0700
                      hasPicture: true
                      role: string
                      roleId: string
                      siteId: 1
                      isAgreementPdpa: true
                      dateAgreementPdpa: 2020-08-26T07:13:22+0700
                      emailSubscription: 1
                      identityUserId: string
                      uniqueName: string
                      inAppSubscription: 1
                      userType: 1
                      platformId: 0
                      isActiveEmpeo: true
                      refCompanyId: 1
                      refClientId: 1
                      signatureUrl: string
                      emailSupscriptionFlag: 1
                      inAppSupscriptionFlag: 1
                      pictureUrl: string
                    assignToUsers:
                      - userId: string
                        fullname: string
                        dateModified: 2021-11-17T18:05:16+0700
                        pictureUrl: string
                        statusUser: 601
                    contact: ''
                    contacts:
                      - contactId: 1
                        contactName: string
                        position: string
                    keyActivity: string
                    assignTo: string
                    statusName: string
                    assignedBy: string
                    attachments:
                      - attachmentId: 1
                        refId: 1
                        type: 1
                        dateCreated: 2023-01-25T15:26:54+0700
                        url: string
                        urlResponseUpload: string
                        thumbnail: string
                    customerName: string
                    pictureUrl: string
                    canAddMember: true
                  statusCode: 200
                statusCode: 1000
                httpStatusCode: 200
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            subCode:
                              type: string
                            description:
                              type: string
                          x-apidog-orders:
                            - subCode
                            - description
                          x-apidog-ignore-properties: []
                      value:
                        type: string
                      statusCode:
                        type: integer
                    required:
                      - errors
                      - value
                      - statusCode
                    x-apidog-orders:
                      - errors
                      - value
                      - statusCode
                    x-apidog-ignore-properties: []
                  hasError:
                    type: boolean
                  errorMessage:
                    type: string
                  statusCode:
                    type: integer
                  httpStatusCode:
                    type: integer
                required:
                  - status
                  - data
                  - hasError
                  - errorMessage
                  - statusCode
                  - httpStatusCode
                x-apidog-orders:
                  - status
                  - data
                  - hasError
                  - errorMessage
                  - statusCode
                  - httpStatusCode
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '4001'
                  description: Business error with 1 or more errors
                data:
                  errors:
                    - subCode: E1101
                      description: Subject field is required.
          headers: {}
          x-apidog-name: Bad Request
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: Venio/Activity
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-18104598-run
components:
  schemas:
    AttachmentDto:
      type: object
      properties:
        attachmentId: &ref_1
          type: integer
          format: int64
        refId: &ref_2
          type: integer
          format: int64
        type: &ref_3
          type: integer
          format: int32
        filename:
          type: string
          nullable: true
        extension:
          type: string
          nullable: true
        fileSize:
          type: integer
          format: int32
        isActive: &ref_4
          type: boolean
        createdByUserId:
          type: string
          nullable: true
        dateCreated: &ref_5
          type: string
          format: date-time
        resourceUrl: &ref_6
          type: string
          nullable: true
        companyId:
          type: integer
          format: int32
          nullable: true
        isProcessed:
          type: boolean
        data:
          type: string
          format: byte
          nullable: true
        timeStamp:
          type: integer
          format: int64
        'no':
          type: string
          nullable: true
        url:
          type: string
          nullable: true
        urlUpload:
          type: string
          nullable: true
        urlResponseUpload: &ref_7
          type: string
          readOnly: true
          nullable: true
        localFileURL:
          type: string
          nullable: true
        thumbnail: &ref_8
          type: string
          readOnly: true
          nullable: true
        uuid:
          type: string
          format: uuid
        publicUrl:
          type: string
          nullable: true
        seq:
          type: integer
          format: int32
        isCover:
          type: boolean
      additionalProperties: false
      x-apidog-orders:
        - attachmentId
        - refId
        - type
        - filename
        - extension
        - fileSize
        - isActive
        - createdByUserId
        - dateCreated
        - resourceUrl
        - companyId
        - isProcessed
        - data
        - timeStamp
        - 'no'
        - url
        - urlUpload
        - urlResponseUpload
        - localFileURL
        - thumbnail
        - uuid
        - publicUrl
        - seq
        - isCover
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Activity:
      type: object
      properties:
        activityId:
          type: integer
        teamId:
          type: integer
        activityNo:
          type: string
        subject:
          type: string
        groupId:
          type: integer
        activityTypeId:
          type: integer
        customerId:
          type: integer
        customerState:
          type: integer
        latitude:
          type: integer
        longitude:
          type: integer
        location:
          type: string
        locationName:
          type: string
        dateCheckin:
          type: string
        dateCheckout:
          type: string
        isActive:
          type: boolean
        statusId:
          type: integer
        isAdHoc:
          type: boolean
        assignToUserId:
          type: string
        dateAppointmentStart:
          type: string
        dateAppointmentEnd:
          type: string
        startLatitude:
          type: integer
        startLongitude:
          type: integer
        startLocation:
          type: string
        startLocationName:
          type: string
        startPlaceId:
          type: string
        visitLatitude:
          type: integer
        visitLongitude:
          type: integer
        visitLocation:
          type: string
        visitLocationName:
          type: string
        visitPlaceId:
          type: string
        totalDistance:
          type: integer
        dateAppointmented:
          type: string
        appointmentedByUserId:
          type: string
        dateApproved:
          type: string
        approvedByUserId:
          type: string
        userRoleId:
          type: string
        userOrgString:
          type: string
        userOrgLevel:
          type: integer
        checkoutLatitude:
          type: integer
        checkoutLongitude:
          type: integer
        checkoutLocation:
          type: string
        checkoutLocationName:
          type: string
        activityReport:
          type: string
        addressId:
          type: integer
        refActivityId:
          type: integer
        dateCreated:
          type: string
        createdByUserId:
          type: string
        dateModified:
          type: string
        modifiedByUserId:
          type: string
        customer:
          type: object
          properties:
            customerId:
              type: integer
            companyId:
              type: integer
            customerCode:
              type: string
            customerName:
              type: string
            type:
              type: integer
            customerType:
              type: integer
            branch:
              type: string
            addressPart1:
              type: string
            phone:
              type: string
            mobile:
              type: string
            fax:
              type: string
            notes:
              type: string
            isActive:
              type: boolean
            dateChangeToCustomer:
              type: string
            createdByUserId:
              type: string
            dateCreated:
              type: string
            modifiedByUserId:
              type: string
            dateModified:
              type: string
            customerGroupId:
              type: integer
            leadStatus:
              type: integer
            email:
              type: string
            customerStateId:
              type: integer
            hasOwner:
              type: boolean
            dateAcquired:
              type: string
            uniqueName:
              type: string
            isRequireSoundex:
              type: boolean
            status:
              type: integer
            dateFollowUp:
              type: string
            dateLatestUpdated:
              type: string
            pictureUrl:
              type: string
          required:
            - customerId
            - companyId
            - customerCode
            - customerName
            - type
            - customerType
            - branch
            - addressPart1
            - phone
            - mobile
            - fax
            - notes
            - isActive
            - dateChangeToCustomer
            - createdByUserId
            - dateCreated
            - modifiedByUserId
            - dateModified
            - customerGroupId
            - leadStatus
            - email
            - customerStateId
            - hasOwner
            - dateAcquired
            - uniqueName
            - isRequireSoundex
            - status
            - dateFollowUp
            - dateLatestUpdated
            - pictureUrl
          x-apidog-orders:
            - customerId
            - companyId
            - customerCode
            - customerName
            - type
            - customerType
            - branch
            - addressPart1
            - phone
            - mobile
            - fax
            - notes
            - isActive
            - dateChangeToCustomer
            - createdByUserId
            - dateCreated
            - modifiedByUserId
            - dateModified
            - customerGroupId
            - leadStatus
            - email
            - customerStateId
            - hasOwner
            - dateAcquired
            - uniqueName
            - isRequireSoundex
            - status
            - dateFollowUp
            - dateLatestUpdated
            - pictureUrl
          x-apidog-ignore-properties: []
        activityStates:
          type: array
          items:
            type: object
            properties:
              activityStateId:
                type: integer
              activityId:
                type: integer
              statusId:
                type: integer
              createdByUserId:
                type: string
              dateCreated:
                type: string
              approveLevel:
                type: integer
              seq:
                type: integer
            required:
              - activityStateId
              - activityId
              - statusId
              - createdByUserId
              - dateCreated
              - approveLevel
              - seq
            x-apidog-orders:
              - activityStateId
              - activityId
              - statusId
              - createdByUserId
              - dateCreated
              - approveLevel
              - seq
            x-apidog-ignore-properties: []
        activitySubtypes:
          type: array
          items:
            type: object
            properties:
              activityTypeId:
                type: integer
              typeName:
                type: string
            x-apidog-orders:
              - activityTypeId
              - typeName
            x-apidog-ignore-properties: []
        createType:
          type: integer
        isVisibleCustomerDetail:
          type: boolean
        staffName:
          type: string
        detailActivities:
          type: array
          items:
            type: integer
        detailActivity:
          type: string
        detailActivityModels:
          type: array
          items:
            type: object
            properties:
              activityTypeId:
                type: integer
              activityTypeName:
                type: string
            x-apidog-orders:
              - activityTypeId
              - activityTypeName
            x-apidog-ignore-properties: []
        assignToUser:
          type: object
          properties:
            userId:
              type: string
            username:
              type: string
            companyId:
              type: integer
            companyName:
              type: string
            teamId:
              type: integer
            teamName:
              type: string
            staffCode:
              type: string
            title:
              type: string
            firstname:
              type: string
            lastname:
              type: string
            fullname:
              type: string
            position:
              type: string
            email:
              type: string
            phoneNumber:
              type: string
            orgString:
              type: string
            orgLevel:
              type: integer
            latitude:
              type: integer
            longitude:
              type: integer
            location:
              type: string
            locationName:
              type: string
            isActive:
              type: boolean
            createdByUserId:
              type: string
            dateCreated:
              type: string
            modifiedByUserId:
              type: string
            dateModified:
              type: string
            hasPicture:
              type: boolean
            role:
              type: string
            roleId:
              type: string
            siteId:
              type: integer
            isAgreementPdpa:
              type: boolean
            dateAgreementPdpa:
              type: string
            emailSubscription:
              type: integer
            identityUserId:
              type: string
            uniqueName:
              type: string
            inAppSubscription:
              type: integer
            userType:
              type: integer
            platformId:
              type: integer
            isActiveEmpeo:
              type: boolean
            refCompanyId:
              type: integer
            refClientId:
              type: integer
            signatureUrl:
              type: string
            emailSupscriptionFlag:
              type: integer
            inAppSupscriptionFlag:
              type: integer
            pictureUrl:
              type: string
          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
            - dateModified
            - hasPicture
            - role
            - roleId
            - siteId
            - isAgreementPdpa
            - dateAgreementPdpa
            - emailSubscription
            - identityUserId
            - uniqueName
            - inAppSubscription
            - userType
            - platformId
            - isActiveEmpeo
            - refCompanyId
            - refClientId
            - signatureUrl
            - emailSupscriptionFlag
            - inAppSupscriptionFlag
            - pictureUrl
          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
            - dateModified
            - hasPicture
            - role
            - roleId
            - siteId
            - isAgreementPdpa
            - dateAgreementPdpa
            - emailSubscription
            - identityUserId
            - uniqueName
            - inAppSubscription
            - userType
            - platformId
            - isActiveEmpeo
            - refCompanyId
            - refClientId
            - signatureUrl
            - emailSupscriptionFlag
            - inAppSupscriptionFlag
            - pictureUrl
          x-apidog-ignore-properties: []
        assignToUsers:
          type: array
          items:
            type: object
            properties:
              userId:
                type: string
              fullname:
                type: string
              dateModified:
                type: string
              pictureUrl:
                type: string
              statusUser:
                type: integer
            x-apidog-orders:
              - userId
              - fullname
              - dateModified
              - pictureUrl
              - statusUser
            x-apidog-ignore-properties: []
        contact:
          type: string
        contacts:
          type: array
          items:
            type: object
            properties:
              contactId:
                type: integer
              contactName:
                type: string
              position:
                type: string
            x-apidog-orders:
              - contactId
              - contactName
              - position
            x-apidog-ignore-properties: []
        keyActivity:
          type: string
        assignTo:
          type: string
        statusName:
          type: string
        assignedBy:
          type: string
        attachments:
          type: array
          items:
            type: object
            x-apidog-refs:
              01JYH0M5GZZA3TXTP582Y0FVZ3: *ref_0
            x-apidog-orders:
              - 01JYH0M5GZZA3TXTP582Y0FVZ3
            properties:
              attachmentId: *ref_1
              refId: *ref_2
              type: *ref_3
              isActive: *ref_4
              dateCreated: *ref_5
              resourceUrl: *ref_6
              urlResponseUpload: *ref_7
              thumbnail: *ref_8
            x-apidog-ignore-properties:
              - attachmentId
              - refId
              - type
              - isActive
              - dateCreated
              - resourceUrl
              - urlResponseUpload
              - thumbnail
        customerName:
          type: string
        pictureUrl:
          type: string
        canAddMember:
          type: boolean
      required:
        - activityId
        - teamId
        - activityNo
        - subject
        - groupId
        - activityTypeId
        - customerId
        - customerState
        - latitude
        - longitude
        - location
        - locationName
        - dateCheckin
        - dateCheckout
        - isActive
        - statusId
        - isAdHoc
        - assignToUserId
        - dateAppointmentStart
        - dateAppointmentEnd
        - startLatitude
        - startLongitude
        - startLocation
        - startLocationName
        - startPlaceId
        - visitLatitude
        - visitLongitude
        - visitLocation
        - visitLocationName
        - visitPlaceId
        - totalDistance
        - dateAppointmented
        - appointmentedByUserId
        - dateApproved
        - approvedByUserId
        - userRoleId
        - userOrgString
        - userOrgLevel
        - checkoutLatitude
        - checkoutLongitude
        - checkoutLocation
        - checkoutLocationName
        - activityReport
        - addressId
        - refActivityId
        - dateCreated
        - createdByUserId
        - dateModified
        - modifiedByUserId
        - customer
        - activityStates
        - activitySubtypes
        - createType
        - isVisibleCustomerDetail
        - staffName
        - detailActivities
        - detailActivity
        - detailActivityModels
        - assignToUser
        - assignToUsers
        - contact
        - contacts
        - keyActivity
        - assignTo
        - statusName
        - assignedBy
        - attachments
        - customerName
        - pictureUrl
        - canAddMember
      x-apidog-orders:
        - activityId
        - teamId
        - activityNo
        - subject
        - groupId
        - activityTypeId
        - customerId
        - customerState
        - latitude
        - longitude
        - location
        - locationName
        - dateCheckin
        - dateCheckout
        - isActive
        - statusId
        - isAdHoc
        - assignToUserId
        - dateAppointmentStart
        - dateAppointmentEnd
        - startLatitude
        - startLongitude
        - startLocation
        - startLocationName
        - startPlaceId
        - visitLatitude
        - visitLongitude
        - visitLocation
        - visitLocationName
        - visitPlaceId
        - totalDistance
        - dateAppointmented
        - appointmentedByUserId
        - dateApproved
        - approvedByUserId
        - userRoleId
        - userOrgString
        - userOrgLevel
        - checkoutLatitude
        - checkoutLongitude
        - checkoutLocation
        - checkoutLocationName
        - activityReport
        - addressId
        - refActivityId
        - dateCreated
        - createdByUserId
        - dateModified
        - modifiedByUserId
        - customer
        - activityStates
        - activitySubtypes
        - createType
        - isVisibleCustomerDetail
        - staffName
        - detailActivities
        - detailActivity
        - detailActivityModels
        - assignToUser
        - assignToUsers
        - contact
        - contacts
        - keyActivity
        - assignTo
        - statusName
        - assignedBy
        - attachments
        - customerName
        - pictureUrl
        - canAddMember
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
