> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openapi.pluuug.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 계약 단일 조회

> 단일 계약의 상세 정보를 조회합니다. 연결된 의뢰, 고객, 카테고리, 정산 관련 필드를 모두 포함합니다.



## OpenAPI

````yaml GET /v1/contract/{contract_id}
openapi: 3.1.0
info:
  title: pluuug openapi
  version: 1.0.0
  description: >-
    플러그에서 제공하는 REST API의 상세 내용을 확인하고 직접 테스트할 수 있는 인터페이스입니다.<br>이 문서를 통해 API의
    엔드포인트, 요청 및 응답 형식 등을 확인할 수 있습니다.
servers:
  - url: https://openapi.pluuug.com
security: []
paths:
  /v1/contract/{contract_id}:
    get:
      tags:
        - contract
      summary: 계약 상세
      description: 단일 계약의 상세 정보를 조회합니다. 연결된 의뢰, 고객, 카테고리, 정산 관련 필드를 모두 포함합니다.
      operationId: contract_retrieve
      parameters:
        - in: path
          name: contract_id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenapiContractRetrieveUpdate'
          description: ''
      security:
        - ApiKeyAuth: []
          Signature: []
components:
  schemas:
    OpenapiContractRetrieveUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        contractNumber:
          type:
            - string
            - 'null'
          description: 계약 번호
          maxLength: 128
        title:
          type: string
          description: 계약 제목
          maxLength: 128
        amount:
          type: integer
          minimum: 0
          description: 계약 금액
        type:
          enum:
            - I
            - S
            - G
          type: string
          x-spec-enum-id: 4b039ce324ed7b8c
          description: |-
            계약 타입

            * `I` - 회차 정산형
            * `S` - 정기 결제형
            * `G` - 단건 정산
          x-enumNames:
            - 회차 정산형
            - 정기 결제형
            - 단건 정산
        status:
          enum:
            - P
            - I
            - C
            - T
          type: string
          x-spec-enum-id: 81c3becab4b92e5c
          readOnly: true
          description: |-
            계약 상태

            * `P` - 계약 준비 중
            * `I` - 정산 진행 중
            * `C` - 계약 종료
            * `T` - 계약 중단
          x-enumNames:
            - 계약 준비 중
            - 정산 진행 중
            - 계약 종료
            - 계약 중단
        startDate:
          type:
            - string
            - 'null'
          format: date
          description: 계약 착수일
        endDate:
          type:
            - string
            - 'null'
          format: date
          description: 계약 종료일
        vatType:
          enum:
            - E
            - I
            - 'N'
          type: string
          x-spec-enum-id: 839644a558705e80
          default: E
          description: |-
            부가세 타입

            * `E` - 부가세 별도
            * `I` - 부가세 포함
            * `N` - 부가세 없음
          x-enumNames:
            - 부가세 별도
            - 부가세 포함
            - 부가세 없음
        settlementFrequency:
          type: integer
          minimum: 1
          default: 1
          description: 결제 주기 빈도(정기 결제형 계약에서만 사용)
        settlementCycle:
          enum:
            - W
            - M
          type: string
          x-spec-enum-id: a76d2bf4e5f53946
          default: M
          description: |-
            결제 주기(정기 결제형 계약에서만 사용)

            * `W` - 주
            * `M` - 개월
          x-enumNames:
            - 주
            - 개월
        settlementDay:
          type: integer
          maximum: 30
          minimum: 0
          default: 1
          description: |-
            **결제일** (정기 결제형 계약에서만 사용)

            **주 단위 계약**일 경우, 요일에 해당하는 숫자를 입력하세요:
            - 일요일: `0`
            - 월요일: `1`
            - 화요일: `2`
            - 수요일: `3`
            - 목요일: `4`
            - 금요일: `5`
            - 토요일: `6`

            **월 단위 계약**일 경우, 1일부터 30일 중 원하는 날짜를 숫자로 입력하세요:
            - 예: 매월 10일 결제 → `10`
            - 최소값: `1`, 최대값: `30`

            ⚠️ * 주의: 월 단위에서 31일은 허용되지 않습니다.* 
        created:
          type: string
          format: date-time
          readOnly: true
          description: 생성일시
        inquiry:
          description: 의뢰
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OpenapiNestedContractInquiry'
        client:
          description: 고객
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OpenapiNestedClient'
        categorySet:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/OpenapiNestedContractCategory'
          description: 카테고리
        fieldSet:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/OpenapiContractFields'
          description: 커스텀 필드
      required:
        - amount
        - created
        - id
        - status
        - title
        - type
    OpenapiNestedContractInquiry:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        uniqueId:
          type:
            - string
            - 'null'
          readOnly: true
          description: 의뢰 고유번호
        status:
          allOf:
            - $ref: '#/components/schemas/OpenapiNestedInquiryStatus'
          readOnly: true
          description: 의뢰 상태
        name:
          type: string
          readOnly: true
          description: 의뢰 이름
        estimate:
          type: string
          format: decimal
          pattern: ^-?\d{0,28}(?:\.\d{0,2})?$
          readOnly: true
          description: 예상 견적
        inquiryDate:
          type: string
          format: date
          readOnly: true
          description: 문의 일시
      required:
        - estimate
        - id
        - inquiryDate
        - name
        - status
        - uniqueId
    OpenapiNestedClient:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        status:
          readOnly: true
          description: 고객 상태
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OpenapiNestedClientStatus'
        companyName:
          type: string
          readOnly: true
          description: 회사명
        inCharge:
          type:
            - string
            - 'null'
          readOnly: true
          description: 담당자
        position:
          type:
            - string
            - 'null'
          readOnly: true
          description: 직책
        contact:
          type:
            - string
            - 'null'
          readOnly: true
          description: 연락처
        email:
          type:
            - string
            - 'null'
          format: email
          readOnly: true
          description: 이메일
      required:
        - companyName
        - contact
        - email
        - id
        - inCharge
        - position
        - status
    OpenapiNestedContractCategory:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        title:
          type: string
          readOnly: true
          description: 제목
      required:
        - id
        - title
    OpenapiContractFields:
      type: object
      properties:
        field:
          allOf:
            - $ref: '#/components/schemas/OpenapiNestedField'
          description: 커스텀 필드
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: object
            - type: array
              items:
                type: object
          description: 값
      required:
        - field
        - value
    OpenapiNestedInquiryStatus:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        title:
          type: string
          readOnly: true
        folder:
          allOf:
            - $ref: '#/components/schemas/OpenapiNestedFolder'
          readOnly: true
      required:
        - folder
        - id
        - title
    OpenapiNestedClientStatus:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        title:
          type: string
          readOnly: true
          description: 상태 제목
      required:
        - id
        - title
    OpenapiNestedField:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
          description: 커스텀 필드 이름
        dataType:
          enum:
            - S
            - 'N'
            - M
            - D
            - T
            - B
            - SL
            - ML
          type: string
          x-spec-enum-id: 382c397735902283
          readOnly: true
          description: |-
            데이터 타입

            * `S` - String
            * `N` - Number
            * `M` - Member
            * `D` - Date
            * `T` - Time
            * `B` - Boolean
            * `SL` - Single List(단수 선택)
            * `ML` - Multi List(복수 선택)
          x-enumNames:
            - String
            - Number
            - Member
            - Date
            - Time
            - Boolean
            - Single List(단수 선택)
            - Multi List(복수 선택)
        optionSet:
          type: array
          items:
            $ref: '#/components/schemas/OpenapiNestedFieldOption'
          readOnly: true
          description: 커스텀 필드 옵션 목록 (단수선택(SL), 복수선택(ML) 타입에서만 데이터 존재)
        memberSet:
          type: array
          items:
            $ref: '#/components/schemas/OpenapiNestedMember'
          readOnly: true
          description: 멤버 목록 (멤버(M) 타입에서만 데이터 존재)
      required:
        - dataType
        - id
        - memberSet
        - name
        - optionSet
    OpenapiNestedFolder:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
      required:
        - id
        - name
    OpenapiNestedFieldOption:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        title:
          type: string
          readOnly: true
      required:
        - id
        - title
    OpenapiNestedMember:
      type: object
      description: |-
        nested 아이템이 제공되면 선언된 required 필드를 모두 가져야 함을 강제한다.

        부모 레벨 partial(미전송 필드 생략)은 유지하되, nested 아이템은 object-level
        validate에서 required 필드 존재를 재확인해 누락 시 400을 반환한다.
      properties:
        id:
          type: integer
        nickname:
          type:
            - string
            - 'null'
          readOnly: true
          description: 닉네임
        email:
          type: string
          readOnly: true
          description: 이메일
        isActive:
          type: boolean
          readOnly: true
          description: 활성화 여부
        grade:
          allOf:
            - $ref: '#/components/schemas/OpenapiNestedMemberGrade'
          readOnly: true
          description: 등급
      required:
        - email
        - grade
        - id
        - isActive
        - nickname
    OpenapiNestedMemberGrade:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          readOnly: true
      required:
        - id
        - title
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    Signature:
      type: apiKey
      in: header
      name: X-Signature
      description: |-
        HMAC-SHA256 방식으로 body를 secret key로 해싱하여 생성한 서명을 넣어야 합니다.
        서버는 X-API-Key와 대응되는 secret key로 서명을 검증합니다.

````