# Get Contract Templates

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/contract/templates:
    get:
      summary: Get Contract Templates
      deprecated: false
      description: ''
      tags:
        - Venio/Contract
      parameters:
        - name: .Data;
          in: query
          description: ''
          required: false
          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: ''
          required: true
          example: <Your-Subscription-Key>
          schema:
            type: string
      responses:
        '200':
          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: array
                    items:
                      properties:
                        contractTemplateId:
                          type: integer
                          description: Id template เอกสารสัญญา
                        isActive:
                          type: boolean
                          description: สถานะ
                        title:
                          type: string
                          description: ชื่อเอกสารสัญญา
                        contractTemplateDetails:
                          type: array
                          items: &ref_0
                            properties:
                              contractTemplateDetailId:
                                type: integer
                              title:
                                type: string
                                description: ชื่อเอกสารสัญญา (แยกตามภาษา)
                              language:
                                type: string
                                description: ภาษา
                              content:
                                type: string
                                description: เนื้อหาเอกสาร (HTML)
                            x-apidog-orders:
                              - contractTemplateDetailId
                              - title
                              - content
                              - language
                            $ref: '#/components/schemas/ContractTemplateDetailDto'
                            type: object
                        contractSignatures:
                          type: array
                          items:
                            properties: {}
                            x-apidog-orders:
                              - 01JYHA2R2ZYWQSXT078S8MN4SJ
                            type: object
                            x-apidog-refs:
                              01JYHA2R2ZYWQSXT078S8MN4SJ: &ref_5
                                $ref: '#/components/schemas/ContractSignatureDto'
                                x-apidog-overrides:
                                  userId: null
                                  contractTemplateId: null
                        contractDocumentType:
                          type: string
                          description: ชื่อประเภท template เอกสารสัญญา
                        contractDocumentTypeEn:
                          type: string
                          description: ชื่อประเภท template เอกสารสัญญา (EN)
                      x-apidog-orders:
                        - contractTemplateId
                        - contractDocumentType
                        - contractDocumentTypeEn
                        - isActive
                        - title
                        - contractTemplateDetails
                        - contractSignatures
                      $ref: '#/components/schemas/ContractTemplateDto'
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  - contractTemplateId: 1
                    contractDocumentType: string
                    contractDocumentTypeEn: string
                    isActive: true
                    title: string
                    titleEn: string
                    isSealedEnabled: true
                    contractTemplateDetails:
                      - contractTemplateDetailId: 1
                        title: string
                        content: string
                        language: th-TH
                    contractSignatures:
                      - contractSignatureId: 1
                        authorizedSignatoryName: string
                        authorizedSignatoryNameEn: string
                        roleName: string
          headers: {}
          x-apidog-name: Success
        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:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: Venio/Contract
      x-apidog-status: developing
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-18409366-run
components:
  schemas:
    ContractSignatureDto:
      type: object
      properties:
        contractSignatureId: &ref_1
          type: integer
        contractTemplateId:
          type: integer
        userId:
          type: string
        authorizedSignatoryName: &ref_2
          type: string
          description: ชื่อ Staff ผู้เซ็นเอกสารสัญญา
        authorizedSignatoryNameEn: &ref_3
          type: string
          description: ชื่อ Staff ผู้เซ็นเอกสารสัญญา (EN)
        roleName: &ref_4
          type: string
          description: ตำแหน่งผู้เซ็นเอกสารสัญญา
      x-apidog-orders:
        - contractSignatureId
        - contractTemplateId
        - userId
        - authorizedSignatoryName
        - authorizedSignatoryNameEn
        - roleName
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ContractTemplateDetailDto:
      type: object
      properties:
        contractTemplateDetailId:
          type: integer
        title:
          type: string
          description: ชื่อเอกสารสัญญา (แยกตามภาษา)
        content:
          type: string
          description: เนื้อหาเอกสาร (HTML)
        language:
          type: string
          description: ภาษา
      x-apidog-orders:
        - contractTemplateDetailId
        - title
        - content
        - language
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ContractTemplateDto:
      type: object
      properties:
        contractTemplateId:
          type: integer
          description: Id template เอกสารสัญญา
        contractDocumentType:
          type: string
          description: ชื่อประเภท template เอกสารสัญญา
        contractDocumentTypeEn:
          type: string
          description: ชื่อประเภท template เอกสารสัญญา (EN)
        isActive:
          type: boolean
          description: สถานะ
        title:
          type: string
          description: ชื่อเอกสารสัญญา
        titleEn:
          type: string
          description: ชื่อเอกสารสัญญา (EN)
        isSealedEnabled:
          type: boolean
        contractTemplateDetails:
          type: array
          items: *ref_0
        contractSignatures:
          type: array
          items:
            properties:
              contractSignatureId: *ref_1
              authorizedSignatoryName: *ref_2
              authorizedSignatoryNameEn: *ref_3
              roleName: *ref_4
            x-apidog-orders:
              - 01JYHA2R2ZYWQSXT078S8MN4SJ
            type: object
            x-apidog-refs:
              01JYHA2R2ZYWQSXT078S8MN4SJ: *ref_5
            x-apidog-ignore-properties:
              - contractSignatureId
              - authorizedSignatoryName
              - authorizedSignatoryNameEn
              - roleName
      x-apidog-orders:
        - contractTemplateId
        - contractDocumentType
        - contractDocumentTypeEn
        - isActive
        - title
        - titleEn
        - isSealedEnabled
        - contractTemplateDetails
        - contractSignatures
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    '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: 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: []

```
