# Get Contract By No

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/contract/{no}:
    get:
      summary: Get Contract By No
      deprecated: false
      description: ''
      tags:
        - Venio/Contract
      parameters:
        - name: 'no'
          in: path
          description: หมายเลขสัญญา
          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: ''
          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--orders:
                      - code
                      - description
                    x--ignore-properties: []
                  data:
                    properties: {}
                    x-apidog-orders:
                      - 01JYH1VM0TCY7AQFBZS64FZZKD
                    type: object
                    x-apidog-refs:
                      01JYH1VM0TCY7AQFBZS64FZZKD:
                        $ref: '#/components/schemas/ContractDto'
                        x-apidog-overrides: {}
                        required:
                          - contractServices
                    x--orders: []
                    x--ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x--orders:
                  - status
                  - data
                x--ignore-properties: []
              example:
                status:
                  code: '1000'
                  description: Success
                data:
                  contractNo: string
                  contractType: 3204
                  statusId: 1602
                  contractName: string
                  owner: string
                  dateStart: 2025-06-18T00:00:00+0700
                  dateEnd: 2026-06-18T00:00:00+0700
                  contractValue: 2000
                  contractServices:
                    - contractServiceId: 37881
                      frequency: 260001
                      subject: string
                      numberOfTimes: 1
                      isActive: true
                    - contractServiceId: 37902
                      frequency: 260001
                      subject: string
                      numberOfTimes: 1
                      isActive: true
                    - contractServiceId: 37903
                      frequency: 260001
                      subject: string
                      numberOfTimes: 1
                      isActive: true
                  attachments: []
                  contractTypeName: string
                  customerCode: string
                  customerName: string
                  statusTypeId: 1
                  customerType: 0
          headers: {}
          x-apidog-name: Success
        '404':
          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--orders:
                      - code
                      - description
                    x--ignore-properties: []
                required:
                  - status
                x-apidog-orders:
                  - status
                x--orders:
                  - status
                x--ignore-properties: []
              example:
                status:
                  code: '1104'
                  description: Contract No "CONT25060000" doesn't exist or is inactive.
          headers: {}
          x-apidog-name: Not Found
        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--orders:
                  - data
                  - status
                x--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-18392899-run
components:
  schemas:
    ContractDto:
      type: object
      properties:
        contractNo:
          type: string
          description: หมายเลขสัญญา
        contractType:
          type: string
          description: ประเภทสัญญา
        statusId:
          type: integer
          description: >-
            <p>สถานะสัญญา<br>Open = 1601<br>Active = 1602<br>Completed =
            1603<br>Cancel = 1604</p>
        contractName:
          type: string
          description: ชื่อสัญญา
        owner:
          type: string
          description: ผู้รับผิดชอบ
        dateStart:
          type: string
          description: วันที่เริ่ม
        dateEnd:
          type: string
          description: วันที่สิ้นสุด
        contractValue:
          type: integer
          description: มูลค่าสัญญา
        contractServices:
          type: array
          items:
            properties: {}
            x-apidog-orders:
              - 01JYH1WVWE6SCP88NAZA4QRGC8
            type: object
            x-apidog-refs:
              01JYH1WVWE6SCP88NAZA4QRGC8:
                $ref: '#/components/schemas/ContractServiceDto'
                x-apidog-overrides:
                  contractNo: null
                  activityServices: null
            x--orders: []
            x--ignore-properties: []
          description: Service Agreement
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
          description: ไฟล์แนบ
        customerCode:
          type: string
          description: รหัสลูกค้า
        customerName:
          type: string
          description: ชื่อลูกค้า
        customerType:
          type: integer
          description: <p>ประเภทลูกค้า<br>Individual = 13001<br>Business = 13002</p>
        dealNo:
          type: string
          description: รหัสดีล
      required:
        - contractNo
        - contractType
        - statusId
        - contractName
        - owner
        - dateStart
        - dateEnd
        - contractValue
        - contractServices
        - attachments
        - customerCode
        - customerName
        - customerType
      x-apidog-orders:
        - contractNo
        - contractType
        - statusId
        - contractName
        - owner
        - dateStart
        - dateEnd
        - contractValue
        - contractServices
        - attachments
        - customerCode
        - customerName
        - customerType
        - dealNo
      x--orders:
        - contractNo
        - contractType
        - statusId
        - contractName
        - owner
        - dateStart
        - dateEnd
        - contractValue
        - contractServices
        - attachments
        - customerCode
        - customerName
        - customerType
        - dealNo
      x--ignore-properties: []
      x-apidog-folder: ''
    AttachmentDto:
      type: object
      properties:
        attachmentId:
          type: integer
          format: int64
        refId:
          type: integer
          format: int64
        type:
          type: integer
          format: int32
        filename:
          type: string
          nullable: true
        extension:
          type: string
          nullable: true
        fileSize:
          type: integer
          format: int32
        isActive:
          type: boolean
        createdByUserId:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
        resourceUrl:
          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:
          type: string
          readOnly: true
          nullable: true
        localFileURL:
          type: string
          nullable: true
        thumbnail:
          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--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--ignore-properties: []
      x-apidog-folder: ''
    ContractServiceDto:
      type: object
      properties:
        contractServiceId:
          type: integer
        frequency:
          type: integer
          description: >-
            <p>ประเภทความถี่<br>Yearly = 260001<br>Quarterly = 260002<br>Monthly
            = 260003<br>Weekly = 26000</p>
        subject:
          type: string
          description: หัวข้อ Service Agreement
        numberOfTimes:
          type: integer
          description: จำนวนครั้ง
        agreementNote:
          type: string
          description: บันทึก
          nullable: true
        contractNo:
          type: string
          description: หมายเลขสัญญา
        activityServices:
          type: array
          items:
            properties:
              title:
                type: string
              dateStart:
                type: string
              dateEnd:
                type: string
            x-apidog-orders:
              - title
              - dateStart
              - dateEnd
            required:
              - title
              - dateStart
              - dateEnd
            $ref: '#/components/schemas/ActivityServiceDto'
          description: รายการกิจกรรมสัญญา
      required:
        - contractServiceId
        - frequency
        - subject
        - numberOfTimes
        - contractNo
        - activityServices
      x-apidog-orders:
        - contractNo
        - contractServiceId
        - subject
        - frequency
        - numberOfTimes
        - agreementNote
        - activityServices
      x--orders:
        - contractServiceId
        - frequency
        - subject
        - numberOfTimes
        - agreementNote
        - contractNo
        - activityServices
      x--ignore-properties: []
      x-apidog-folder: ''
    ActivityServiceDto:
      type: object
      properties:
        title:
          type: string
          description: หัวข้อ
        dateStart:
          type: string
          description: วันที่เริ่ม
        dateEnd:
          type: string
          description: วันที่สิ้นสุด
      x-apidog-orders:
        - title
        - dateStart
        - dateEnd
      required:
        - title
        - dateStart
        - dateEnd
      x--orders:
        - title
        - dateStart
        - dateEnd
      x--ignore-properties: []
      x-apidog-folder: ''
    'Response Error Msg ':
      type: object
      properties:
        code:
          type: string
          x--mock: '4001'
        description:
          type: string
          x--mock: Business error with 1 errors
      required:
        - code
        - description
      x-apidog-orders:
        - code
        - description
      x--orders:
        - code
        - description
      x--ignore-properties: []
      x-apidog-folder: ''
    Required authorization:
      type: object
      properties:
        subCode:
          type: string
          x--mock: E9103
        description:
          type: string
          x--mock: Authorization credentials required
        metadata:
          type: object
          properties: {}
          x-apidog-orders: []
          x--orders: []
          x--ignore-properties: []
      required:
        - subCode
        - description
        - metadata
      x-apidog-orders:
        - subCode
        - description
        - metadata
      x--orders:
        - subCode
        - description
        - metadata
      x--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: []

```
