# Get Appointment By Id

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/calendio/appointments/{appointmentId}:
    get:
      summary: Get Appointment By Id
      deprecated: false
      description: Get a specific appointment by Calendio appointment ID
      operationId: GetAppointmentByCalendioAppointmentIdAsync
      tags:
        - Venio/Calendio
        - Calendio
      parameters:
        - name: appointmentId
          in: path
          description: Unique Id ของนัดหมาย
          required: true
          example: 0
          schema:
            type: integer
            format: int64
        - 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
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ServiceResponseV2OfAppointmentDetailsBffDto
          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 GET "https://api.gofive.co.th/v1/calendio/appointments/1" \
              -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
      x-apidog-folder: Venio/Calendio
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-28505052-run
components:
  schemas:
    ServiceResponseV2OfAppointmentDetailsBffDto:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/StatusResponse'
        data:
          $ref: '#/components/schemas/AppointmentDetailsBffDto'
      x-apidog-orders:
        - status
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AppointmentDetailsBffDto:
      type: object
      properties:
        appointmentId:
          type: integer
          format: int64
          description: Unique Id ของการนัดหมาย
        appointmentName:
          type: string
          description: ชื่อของการนัดหมาย
          nullable: true
        eventId:
          type: integer
          format: int64
          description: Unique Id ของ Event ที่ใช้สำหรับนัดหมาย
        duration:
          type: integer
          description: ระยะเวลาการนัดหมาย (นาที)
        activityTypeId:
          type: integer
          description: Unique Id ของประเภทกิจกรรมที่ใช้สำหรับนัดหมาย
        description:
          type: string
          description: รายละเอียดของการนัดหมาย
          nullable: true
        bookingLink:
          type: string
          description: ลิงก์จองนัดหมาย
          nullable: true
        responsibleAssignmentType:
          $ref: '#/components/schemas/ResponsibleAssignmentType'
          description: เงื่อนไขการเข้าร่วมของผู้รับผิดชอบนัดหมาย
        responsibleStaffCodes:
          type: array
          items:
            type: string
            description: รหัสพนักงาน
          description: ผู้รับผิดชอบนัดหมาย
          nullable: true
        isAllowMultipleAttendees:
          type: boolean
          description: อนุญาตให้มีผู้เข้าร่วม (จากการจอง) หลายคนใน slot เวลาเดียวกันหรือไม่
        maxAttendees:
          type: integer
          description: >-
            จำนวนผู้เข้าร่วม (จากการจอง) สูงสุดใน slot เวลาเดียวกัน,
            จำเป็นหากเปิดการใช้งานอนุญาตให้มีผู้เข้าร่วมหลายคนใน slot
            เวลาเดียวกันได้ (isAllowMultipleAttendees = true)
          nullable: true
      x-apidog-orders:
        - appointmentId
        - appointmentName
        - eventId
        - duration
        - activityTypeId
        - description
        - bookingLink
        - responsibleAssignmentType
        - responsibleStaffCodes
        - isAllowMultipleAttendees
        - maxAttendees
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ResponsibleAssignmentType:
      type: integer
      description: 1 = เข้าร่วมทุกคน, 2 = เข้าร่วมเพียงคนใดคนหนึ่ง
      enum:
        - 1
        - 2
      x-enum-varnames:
        - All
        - Any
      x-apidog-enum:
        - value: 1
          name: เข้าร่วมทุกคน
          description: ''
        - value: 2
          name: เข้าร่วมเพียงคนใดคนหนึ่ง
          description: ''
      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: []

```
