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

# 청구서 수정

> 청구서를 수정할 때 호출합니다. 파라미터로 전달된 정보로 청구서가 치환됩니다.



## OpenAPI

````yaml /steppay_v1.json put /api/v1/invoices/{id}
openapi: 3.0.1
info:
  title: STEPPAY
  version: '1.0'
  contact:
    name: Steppay
    url: https://www.steppay.kr
    email: contact@steppay.kr
servers:
  - url: https://api.steppay.kr
    description: Generated server url
security:
  - Secret-Token: []
paths:
  /api/v1/invoices/{id}:
    put:
      tags:
        - 청구서 API
      summary: 청구서 수정
      description: 청구서를 수정할 때 호출합니다. 파라미터로 전달된 정보로 청구서가 치환됩니다.
      operationId: v1_updateInvoice
      parameters:
        - name: id
          in: path
          description: 청구서 번호
          required: true
          schema:
            type: integer
            format: int64
        - name: temporary
          in: query
          required: false
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceUpdateDTO'
        required: true
      responses:
        '200':
          description: 정상적으로 수정됨
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ProductErrorresponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ProductErrorresponse'
        '404':
          description: 청구서를 찾지 못 함
components:
  schemas:
    InvoiceUpdateDTO:
      title: 청구서 수정 데이터
      required:
        - customerId
        - discount
        - id
        - products
        - publishMethods
        - publishType
        - purchaseDeadline
      type: object
      properties:
        id:
          type: integer
          description: 청구서 번호
          format: int64
        customerId:
          type: integer
          description: 청구서 받을 고객 번호
          format: int64
        products:
          type: array
          description: 청구서 상품 및 가격 플랜 목록
          items:
            $ref: '#/components/schemas/InvoiceProductDTO'
        publishType:
          type: string
          description: 청구서 발행 타입
          enum:
            - NOW
            - RESERVATION
        purchaseDeadline:
          type: string
          description: 구매 가능 기한
          format: date-time
        reservationAt:
          type: string
          description: 예약 발송 시점
          format: date-time
        publishMethods:
          uniqueItems: true
          type: array
          description: 발송 수단 목록
          items:
            type: string
            description: 발송 수단 목록
            enum:
              - KAKAO
              - SMS
              - EMAIL
        invoicePayMethods:
          uniqueItems: true
          type: array
          description: 지정 결제 수단
          items:
            type: string
            description: 지정 결제 수단
            enum:
              - CARD
              - VBANK
              - BANK
              - BANK_TRANSFER
              - CELLPHONE
              - SIMPLE_PAY
              - CMS
              - CARD_BILL
              - CELLPHONE_BILL
              - CMS_BILL
              - PAYPAL
        discount:
          minimum: 0
          exclusiveMinimum: false
          type: number
          description: 할인 금액
        memoToCustomer:
          type: string
          description: 청구서 메모
      description: 청구서 수정 데이터
    ProductErrorresponse:
      required:
        - errorCode
      type: object
      properties:
        traceId:
          type: string
        errorCode:
          type: string
        errorMessage:
          type: string
        details:
          $ref: '#/components/schemas/ReturnError'
    InvoiceProductDTO:
      title: 청구서 상품 및 가격플랜 정보
      required:
        - minimumQuantity
        - priceCode
        - productCode
      type: object
      properties:
        productCode:
          type: string
          description: 상품 코드
        priceCode:
          type: string
          description: 가격 플랜 코드
        minimumQuantity:
          type: integer
          description: 최소 수량. 청구서를 받은 고객은 이 수량보다 적은 수량으로 구매할 수 없습니다.
          format: int32
        maximumQuantity:
          type: integer
          description: 최대 수량. 청구서를 받은 고객은 이 수량보다 많은 수량으로 구매할 수 없습니다.
          format: int32
        productName:
          type: string
          description: 상품명
        price:
          type: number
          description: 가격
      description: 청구서 상품 및 가격 플랜 목록
    ReturnError:
      type: object
  securitySchemes:
    Secret-Token:
      type: apiKey
      in: header
      name: Secret-Token

````