# Create Venio Calendio Event

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/calendio/events/venio:
    post:
      summary: Create Venio Calendio Event
      deprecated: false
      description: Create a Venio event in Calendio integration
      operationId: CreateEventVenioAsync
      tags:
        - Venio/Calendio
        - Calendio
      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:
              $ref: >-
                #/components/schemas/CalendioVenioIntegrationDetailSettingCreateDto
            examples: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ServiceResponseV2OfCalendioVenioIntegrationDetailSettingDto
          headers: {}
          x-apidog-name: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ServiceResponseV2Error'
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: *ref_0
          headers: {}
          x-apidog-name: Server Error
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: |
            curl -X POST "https://api.gofive.co.th/v1/calendio/events/venio" \
              -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{}'
      x-apidog-folder: Venio/Calendio
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-28505041-run
components:
  schemas:
    CalendioVenioIntegrationDetailSettingCreateDto:
      properties:
        name:
          type: string
          description: ชื่อการนัดหมาย
          nullable: true
        meetingPlatform: &ref_1
          $ref: '#/components/schemas/CalendioMeetingPlatform'
          description: Platform (รูปแบบหรือประเภท) ของการนัดหมาย
        setLocationBy: &ref_2
          $ref: '#/components/schemas/AppointmentSetLocationBy'
          description: >-
            กำหนดสถานที่นัดหมายโดย (0 = ลูกค้า, 1 = ผู้สร้างอีเวนต์),
            จำเป็นสำหรับการนัดหมายประเภท Onsite
        mapLink:
          type: string
          description: ลิงก์แผนที่ สำหรับการนัดหมายประเภท Onsite
          nullable: true
        meetingLocation:
          type: string
          description: สถานที่นัดหมาย จำเป็นสำหรับการนัดหมายประเภท Onsite
          nullable: true
        isUseShiftEmpeo:
          type: boolean
          description: ใช้เวลาทำการเดียวกันกับกะการทำงานหรือไม่
        manualTimeSets:
          type: array
          items: &ref_3
            $ref: '#/components/schemas/ManualTimeSet'
          description: >-
            ตั้งค่าเวลาทำงานสำหรับการนัดหมาย
            จำเป็นหากไม่ใช้เวลาทำการเดียวกันกับกะการทำงาน (IsUseShiftEmpeo =
            false)
            ส่งการตั้งค่าหลายอันได้สำหรับการตั้งค่าเวลาที่ต่างกันในแต่ละวันในสัปดาห์
          nullable: true
        incrementTime:
          type: integer
          description: กำหนดให้นัดหมายจาก Event นี้ เปิดให้นัดหมายได้ทุกกี่นาที
          enum:
            - 15
            - 30
            - 45
            - 60
          x-apidog-enum:
            - value: 15
              name: ''
              description: ''
            - value: 30
              name: ''
              description: ''
            - value: 45
              name: ''
              description: ''
            - value: 60
              name: ''
              description: ''
        bufferTime:
          type: integer
          description: >-
            กำหนดให้นัดหมายจาก Event
            นี้ต้องห่างจากนัดหมายก่อนหน้าอย่างน้อยกี่นาที
        isLimitBookingPerDay:
          type: boolean
          description: จำกัดจำนวนนัดหมายต่อวันหรือไม่
        maxBookingsPerDay:
          type: integer
          description: >-
            จำนวนนัดหมายต่อวันที่จำกัด
            จำเป็นเมื่อเปิดใช้งานการจำกัดจำนวนนัดหมายต่อวัน
          nullable: true
        isBookingCondition:
          type: boolean
          description: จำกัดจำนวนวันที่ต้องนัดหมายล่วงหน้าหรือไม่
        minAdvanceBookingDays:
          type: integer
          description: จำนวนวันที่ต้องนัดหมายล่วงหน้าอย่างน้อย
          nullable: true
        maxAdvanceBookingDays:
          type: integer
          description: จำนวนนัดหมายล่วงหน้าได้สูงสุด
          nullable: true
        customFields:
          type: array
          items: &ref_4
            $ref: '#/components/schemas/CalendioCustomFieldJsonDto'
          description: การตั้งค่ากล่องกรอกข้อมูลที่จะแสดงในหน้าการจองนัดหมาย
          nullable: true
      x-apidog-orders:
        - name
        - meetingPlatform
        - setLocationBy
        - mapLink
        - meetingLocation
        - isUseShiftEmpeo
        - manualTimeSets
        - incrementTime
        - bufferTime
        - isLimitBookingPerDay
        - maxBookingsPerDay
        - isBookingCondition
        - minAdvanceBookingDays
        - maxAdvanceBookingDays
        - customFields
      type: object
      x-apidog-refs: {}
      required:
        - setLocationBy
        - isUseShiftEmpeo
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CalendioCustomFieldJsonDto:
      type: object
      properties:
        calendioCustomFieldId:
          type: integer
          format: int64
          description: Unique Id ของ Custom Field
        isRequired:
          type: boolean
          description: ตั้งค่ากล่องกรอกข้อมูลว่าจำเป็นต้องระบุหรือไม่
        seq:
          type: integer
          description: ลำดับการแสดงผลของกล่องกรอกข้อมูล
      x-apidog-orders:
        - calendioCustomFieldId
        - isRequired
        - seq
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ManualTimeSet:
      type: object
      properties:
        breakEndTime:
          type: string
          description: เวลาสิ้นสุดของการพัก (Format HH:mm)
          x-apidog-mock: '13:00'
          examples:
            - '13:00'
            - '09:00'
        breakStartTime:
          type: string
          description: เวลาเริ่มต้นของการพัก (Format HH:mm)
          x-apidog-mock: '12:00'
          examples:
            - '13:00'
            - '09:00'
        endTime:
          type: string
          description: เวลาสิ้นสุดของการทำงาน (Format HH:mm)
          x-apidog-mock: '18:00'
          examples:
            - '13:00'
            - '09:00'
        startTime:
          type: string
          description: เวลาเริ่มต้นของการทำงาน (Format HH:mm)
          x-apidog-mock: '09:00'
          examples:
            - '13:00'
            - '09:00'
        selectedDayOfWeeks:
          type: array
          items:
            type: integer
            enum:
              - 0
              - 1
              - 2
              - 3
              - 4
              - 5
              - 6
            x-apidog-enum:
              - value: 0
                name: วันอาทิตย์
                description: ''
              - value: 1
                name: วันจันทร์
                description: ''
              - value: 2
                name: วันอังคาร
                description: ''
              - value: 3
                name: วันพุธ
                description: ''
              - value: 4
                name: วันพฤหัส
                description: ''
              - value: 5
                name: วันศุกร์
                description: ''
              - value: 6
                name: วันเสาร์
                description: ''
          description: วันในสัปดาห์ทั้งหมดที่กำหนดว่าทำงาน
      x-apidog-orders:
        - breakEndTime
        - breakStartTime
        - endTime
        - startTime
        - selectedDayOfWeeks
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AppointmentSetLocationBy:
      type: integer
      enum:
        - 0
        - 1
      x-enum-varnames:
        - Customer
        - EventCreator
      description: 0 = Customer, 1 = EventCreator
      x-apidog-folder: ''
    CalendioMeetingPlatform:
      type: integer
      enum:
        - 1000
        - 1001
        - 1002
        - 1003
      x-enum-varnames:
        - Unknown
        - Onsite
        - GoogleMeet
        - MicrosoftTeam
        - Zoom
      x-apidog-enum:
        - value: 1000
          name: Onsite
          description: ''
        - value: 1001
          name: Google Meet
          description: ''
        - value: 1002
          name: Microsoft Team
          description: ''
        - value: 1003
          name: Zoom
          description: ''
      x-apidog-folder: ''
    ServiceResponseV2OfCalendioVenioIntegrationDetailSettingDto:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/StatusResponse'
        data:
          $ref: '#/components/schemas/CalendioVenioIntegrationDetailSettingDto'
      x-apidog-orders:
        - status
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    CalendioVenioIntegrationDetailSettingDto:
      properties:
        eventId:
          type: integer
          format: int64
          description: Unique Id ของ Event
        name:
          type: string
          description: ชื่อการนัดหมาย
          nullable: true
        meetingPlatform: *ref_1
        setLocationBy:
          description: >-
            กำหนดสถานที่นัดหมายโดย (0 = ลูกค้า, 1 = ผู้สร้างอีเวนต์),
            จำเป็นสำหรับการนัดหมายประเภท Onsite
          anyOf:
            - *ref_2
            - type: 'null'
        mapLink:
          type: string
          description: ลิงก์แผนที่ สำหรับการนัดหมายประเภท Onsite
          nullable: true
        meetingLocation:
          type: string
          description: สถานที่นัดหมาย จำเป็นสำหรับการนัดหมายประเภท Onsite
          nullable: true
        isUseShiftEmpeo:
          type: boolean
          description: ใช้เวลาทำการเดียวกันกับกะการทำงานหรือไม่
        manualTimeSets:
          type: array
          items: *ref_3
          description: >-
            ตั้งค่าเวลาทำงานสำหรับการนัดหมาย
            จำเป็นหากไม่ใช้เวลาทำการเดียวกันกับกะการทำงาน (IsUseShiftEmpeo =
            false)
            ส่งการตั้งค่าหลายอันได้สำหรับการตั้งค่าเวลาที่ต่างกันในแต่ละวันในสัปดาห์
          nullable: true
        incrementTime:
          type: integer
          description: กำหนดให้นัดหมายจาก Event นี้ เปิดให้นัดหมายได้ทุกกี่นาที
          enum:
            - 15
            - 30
            - 45
            - 60
          x-apidog-enum:
            - value: 15
              name: ''
              description: ''
            - value: 30
              name: ''
              description: ''
            - value: 45
              name: ''
              description: ''
            - value: 60
              name: ''
              description: ''
        bufferTime:
          type: integer
          description: >-
            กำหนดให้นัดหมายจาก Event
            นี้ต้องห่างจากนัดหมายก่อนหน้าอย่างน้อยกี่นาที
        isLimitBookingPerDay:
          type: boolean
          description: จำกัดจำนวนนัดหมายต่อวันหรือไม่
        maxBookingsPerDay:
          type: integer
          description: >-
            จำนวนนัดหมายต่อวันที่จำกัด
            จำเป็นเมื่อเปิดใช้งานการจำกัดจำนวนนัดหมายต่อวัน
          nullable: true
        isBookingCondition:
          type: boolean
          description: จำกัดจำนวนวันที่ต้องนัดหมายล่วงหน้าหรือไม่
        minAdvanceBookingDays:
          type: integer
          description: จำนวนวันที่ต้องนัดหมายล่วงหน้าอย่างน้อย
          nullable: true
        maxAdvanceBookingDays:
          type: integer
          description: จำนวนนัดหมายล่วงหน้าได้สูงสุด
          nullable: true
        customFields:
          type: array
          items: *ref_4
          description: การตั้งค่ากล่องกรอกข้อมูลที่จะแสดงในหน้าการจองนัดหมาย
          nullable: true
      x-apidog-orders:
        - eventId
        - name
        - meetingPlatform
        - setLocationBy
        - mapLink
        - meetingLocation
        - isUseShiftEmpeo
        - manualTimeSets
        - incrementTime
        - bufferTime
        - isLimitBookingPerDay
        - maxBookingsPerDay
        - isBookingCondition
        - minAdvanceBookingDays
        - maxAdvanceBookingDays
        - customFields
      type: object
      x-apidog-refs: {}
      required:
        - isUseShiftEmpeo
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    StatusResponse:
      type: object
      properties:
        code:
          type: string
          description: >-
            <p>สถานะของ Business Code ถ้า<br>Success = 1000<br>Error 1 ตัว =
            4001<br>Error มากกว่า 1 ตัว = 4002    <br>หรือเป็น Subcode
            ที่ต้องการจะแสดงเพื่อสื่อความหมายของ Error โดย subcode
            จะเป็นตัวเดียวกับ business error code หรือไม่ก็ได้
            เพื่อความสะดวกในการแสดงผล<p>
          examples:
            - '1000'
        description:
          type: string
          description: คำอธิบายข้อความที่จะแสดง
          examples:
            - Success
      x-apidog-orders:
        - code
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ServiceResponseV2Error:
      type: object
      properties:
        status:
          type: object
          properties:
            code:
              type: string
              examples:
                - '4002'
            description:
              type: string
              examples:
                - Business error with 1 or more errors
          x-apidog-orders:
            - code
            - description
          x-apidog-ignore-properties: []
        data:
          type: object
          properties:
            errors:
              type: array
              items:
                $ref: '#/components/schemas/ErrorResponse'
          x-apidog-orders:
            - errors
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - status
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        subCode:
          type: string
          description: Error sub-code (e.g., 'E1101', 'E1102')
          examples:
            - E1101
        description:
          type: string
          description: Error description
          examples:
            - Take is required
        metadata:
          type: object
          description: Additional error metadata
          properties: {}
          x-apidog-orders: []
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - subCode
        - description
        - metadata
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: 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: []

```
