# Get a Employee 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/Employees/{code}:
    get:
      summary: 'Get a Employee '
      deprecated: false
      description: ดึงข้อมูลพนักงานโดย รหัสพนักงาน staffCode
      tags:
        - Venio/Employee
      parameters:
        - name: code
          in: path
          description: รหัสพนักงาน staffCode
          required: true
          schema:
            type: string
        - 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: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      value:
                        type: object
                        properties:
                          userId:
                            type: string
                            description: รหัสผู้ใช้งาน
                          username:
                            type: string
                            description: ชื่อผู้ใช้งาน
                          companyId:
                            type: integer
                            description: รหัสบริษัท
                          companyName:
                            type: string
                            description: ชื่อบริษัท
                          teamId:
                            type: integer
                            description: รหัสทีม
                          teamName:
                            type: string
                            description: ชื่อทีม
                          staffCode:
                            type: string
                            description: รหัสพนักงาน
                          firstname:
                            type: string
                            description: ชื่อต้น
                          lastname:
                            type: string
                            description: นามสกุล
                          fullname:
                            type: string
                            description: ชื่อเต็ม
                          position:
                            type: string
                            description: ตำแหน่ง
                          email:
                            type: string
                            description: email
                          extensionNo:
                            type: string
                            description: หมายเลขโทรศัพท์ ต่อ
                          phoneNumber:
                            type: string
                            description: หมายเลขโทรศัพท์
                          orgString:
                            type: string
                            description: โครงสร้างตามสายงาน
                          orgLevel:
                            type: integer
                            description: ระดับองค์กร
                          isActive:
                            type: boolean
                            description: |-
                              ใช้งานอยู่หรือไม่
                              true = ใช้
                              false = ไม่ใช้
                          createdByUserId:
                            type: string
                            description: รหัสผู้สร้าง
                          dateCreated:
                            type: string
                            description: เวลาสร้าง
                          modifiedByUserId:
                            type: string
                            description: รหัสuseridของผู้แก้ไข
                          dateModified:
                            type: string
                          head1:
                            type: string
                          headUserId:
                            type: string
                          role:
                            type: string
                            description: หน้าที
                          roleId:
                            type: string
                            description: รหัสหน้าที
                          emailSubscription:
                            type: integer
                            description: email สมัครสมาชิก
                          identityUserId:
                            type: string
                            description: รหัสยืนยันตัวตน
                          uniqueName:
                            type: string
                            description: ชื่อเฉพาะ
                          inAppSubscription:
                            type: integer
                            description: สมัครสมาชิกในแอพ
                          userType:
                            type: integer
                            description: ประเภทผู้ใช้
                          platformId:
                            type: integer
                            description: รหัส id ของ platform
                          isLoginSsoOnly:
                            type: boolean
                          isActiveEmpeo:
                            type: boolean
                            description: ใช้งาน empeoอยู่ไหม
                          refCompanyId:
                            type: integer
                            description: เลขอ้างอิงcompanyId
                          refClientId:
                            type: integer
                            description: |
                              เลขอ้างอิง clientid
                          emailSupscriptionFlag:
                            type: integer
                            description: >-
                              รหัส
                              subscriptionflagของemailที่สมัครสมาชิกsubscriptionflag
                          inAppSupscriptionFlag:
                            type: integer
                            description: >-
                              รหัส subscriptionflag ที่ในการสมัครบนแอพ
                              subscriptionflag
                          pictureUrl:
                            type: string
                            description: url รูปภาพ
                          title:
                            type: string
                            description: หัวข้อ
                          latitude:
                            type: number
                            description: ละติจูด
                          longitude:
                            type: number
                            description: ลองจิจูด
                          location:
                            type: string
                            description: ที่ตั้ง
                          locationName:
                            type: string
                            description: ชื่อที่ตั้ง
                          hasPicture:
                            type: boolean
                            description: |-
                              มีรูปหรือไหม 
                              true = 1
                              false = 2
                          siteId:
                            type: integer
                            description: รหัสงาน
                          isAgreementPdpa:
                            type: boolean
                            description: |-
                              ข้อตกลง PDPA
                              true = ตกลง
                              false = ไม่ตกลง
                          dateAgreementPdpa:
                            type: string
                            description: เวลาตกลง PDPA
                          signatureUrl:
                            type: string
                            description: urlรูปภาพลายแซ้น
                        required:
                          - userId
                          - username
                          - companyId
                          - companyName
                          - teamId
                          - teamName
                          - staffCode
                          - firstname
                          - lastname
                          - fullname
                          - position
                          - email
                          - extensionNo
                          - phoneNumber
                          - orgString
                          - orgLevel
                          - isActive
                          - createdByUserId
                          - dateCreated
                          - modifiedByUserId
                          - dateModified
                          - head1
                          - headUserId
                          - role
                          - roleId
                          - emailSubscription
                          - identityUserId
                          - uniqueName
                          - inAppSubscription
                          - userType
                          - platformId
                          - isLoginSsoOnly
                          - isActiveEmpeo
                          - refCompanyId
                          - refClientId
                          - emailSupscriptionFlag
                          - inAppSupscriptionFlag
                          - pictureUrl
                          - title
                          - latitude
                          - longitude
                          - location
                          - locationName
                          - hasPicture
                          - siteId
                          - isAgreementPdpa
                          - dateAgreementPdpa
                          - signatureUrl
                        x-apidog-orders:
                          - userId
                          - username
                          - companyId
                          - companyName
                          - teamId
                          - teamName
                          - staffCode
                          - firstname
                          - lastname
                          - fullname
                          - position
                          - email
                          - extensionNo
                          - phoneNumber
                          - orgString
                          - orgLevel
                          - isActive
                          - createdByUserId
                          - dateCreated
                          - modifiedByUserId
                          - dateModified
                          - head1
                          - headUserId
                          - role
                          - roleId
                          - emailSubscription
                          - identityUserId
                          - uniqueName
                          - inAppSubscription
                          - userType
                          - platformId
                          - isLoginSsoOnly
                          - isActiveEmpeo
                          - refCompanyId
                          - refClientId
                          - emailSupscriptionFlag
                          - inAppSupscriptionFlag
                          - pictureUrl
                          - title
                          - latitude
                          - longitude
                          - location
                          - locationName
                          - hasPicture
                          - siteId
                          - isAgreementPdpa
                          - dateAgreementPdpa
                          - signatureUrl
                        x-apidog-ignore-properties: []
                      statusCode:
                        type: integer
                        description: |-
                          สถานะ code ของ httpเช่น
                          200 Ok
                          201 Created
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    required:
                      - value
                      - statusCode
                    x-apidog-orders:
                      - value
                      - statusCode
                    x-apidog-ignore-properties: []
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                required:
                  - data
                  - statusCode
                  - httpStatusCode
                x-apidog-orders:
                  - data
                  - statusCode
                  - httpStatusCode
                x-apidog-ignore-properties: []
              example:
                data:
                  value:
                    userId: string
                    username: string
                    companyId: 1
                    companyName: string
                    teamId: 1
                    teamName: string
                    staffCode: string
                    firstname: string
                    lastname: string
                    fullname: string
                    position: string
                    email: string
                    extensionNo: string
                    phoneNumber: string
                    orgString: string
                    orgLevel: 2
                    isActive: true
                    createdByUserId: string
                    dateCreated: 2023-01-06T12:49:44+0700
                    modifiedByUserId: string
                    dateModified: 2023-01-19T11:56:16+0700
                    head1: string
                    headUserId: string
                    role: string
                    roleId: string
                    emailSubscription: 1
                    identityUserId: string
                    uniqueName: string
                    inAppSubscription: 1
                    userType: 1
                    platformId: 1
                    isLoginSsoOnly: true
                    isActiveEmpeo: true
                    refCompanyId: 1
                    refClientId: 1
                    emailSupscriptionFlag: 1
                    inAppSupscriptionFlag: 1
                    pictureUrl: string
                  statusCode: 200
                statusCode: 1000
                httpStatusCode: 200
          headers: {}
          x-apidog-name: OK
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  message:
                    type: string
                    description: คำบรรยาย error
                x-apidog-orders:
                  - statusCode
                  - message
                required:
                  - statusCode
                  - message
                x-apidog-ignore-properties: []
              example:
                statusCode: 401
                message: >-
                  Access denied due to invalid subscription key. Make sure to
                  provide a valid key for an active subscription.
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ  code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  errorMessage:
                    type: string
                    description: คำอธิบายเกี่ยวกับ error
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไหม
                      true = มี
                      false = ไม่มี
                  data:
                    type: object
                    properties:
                      authenticationSchemes:
                        type: array
                        items:
                          type: string
                        description: ค่า Enum ของ authenticationSchemes
                    x-apidog-orders:
                      - authenticationSchemes
                    required:
                      - authenticationSchemes
                    description: |-
                      ข้อมูลที่จะแสดง ไม่จำกัดรูปแบบว่าจะเป็นเช่นไร 
                      ตอนเรียกออกมาสามารเป็น Array และ Object ได้
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่ดูไม่มี permission view data '
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                x-apidog-ignore-properties: []
              example:
                data:
                  authenticationSchemes: []
                hasError: true
                errorMessage: Invalid access rights
                statusCode: 9503
                httpStatusCode: 403
          headers: {}
          x-apidog-name: Forbidden
        x-200:Bad Request:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                  httpStatusCode:
                    type: integer
                    description: |-
                      สถานะ  code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  errorMessage:
                    type: string
                    description: คำอธิบายเกี่ยวกับ error
                  hasError:
                    type: boolean
                    description: |-
                      มี error ไหม
                      true = มี
                      false = ไม่มี
                  data:
                    type: object
                    properties:
                      value:
                        type: string
                        description: valueที่พบerror
                      statusCode:
                        type: integer
                        description: |-
                          สถานะ  code ของ httpเช่น
                          200 Ok
                          201 Created
                          400 BadRequest
                          401 Unauthorized
                          404 Record not found
                          500 Internal Server Error
                    x-apidog-orders:
                      - value
                      - statusCode
                    description: 'รายละเอียดรายการที่เกิดerror '
                    required:
                      - value
                      - statusCode
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                description: ' กรณีที่คนที่request bodyมีข้อผิดพลาด'
                required:
                  - statusCode
                  - httpStatusCode
                  - errorMessage
                  - hasError
                  - data
                x-apidog-ignore-properties: []
              example:
                data:
                  value: Employee Code "System1999" doesn't exist.
                  statusCode: 400
                hasError: true
                errorMessage: Invalid parameters entered
                statusCode: 1102
                httpStatusCode: 400
          headers: {}
          x-apidog-name: Bad Request
        x-200:User authentication required V2.:
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Required%20authorization'
                  status:
                    $ref: '#/components/schemas/Response%20Error%20Msg%20'
                required:
                  - data
                  - status
                x-apidog-orders:
                  - data
                  - status
                x-apidog-ignore-properties: []
              example:
                data:
                  subCode: E9103
                  description: Authorization credentials required
                  metadata: {}
                status:
                  code: '4001'
                  description: Business error with 1 errors
          headers: {}
          x-apidog-name: User authentication required V2.
      security:
        - bearer: []
      x-apidog-folder: Venio/Employee
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3604991-run
components:
  schemas:
    'Response Error Msg ':
      type: object
      properties:
        code:
          type: string
          x-apidog-mock: '4001'
        description:
          type: string
          x-apidog-mock: Business error with 1 errors
      required:
        - code
        - description
      x-apidog-orders:
        - code
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Required authorization:
      type: object
      properties:
        subCode:
          type: string
          x-apidog-mock: E9103
        description:
          type: string
          x-apidog-mock: Authorization credentials required
        metadata:
          type: object
          properties: {}
          x-apidog-orders: []
          x-apidog-ignore-properties: []
      required:
        - subCode
        - description
        - metadata
      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: http
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
