> ## 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/customers/{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/customers/{id}:
    put:
      tags:
        - 고객 API
      summary: 고객 수정
      description: 고객 정보를 수정할 때 호출합니다. 파라미터로 전달된 정보로 고객 정보가 치환됩니다.
      operationId: v1_updateCustomer
      parameters:
        - name: id
          in: path
          description: 수정할 고객 번호
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerUpdateDTO'
            examples:
              테스트 고객 수정:
                value:
                  name: 고객 수정
                  email: test_modify@gmail.com
                  phone: 010-1234-1234
        required: true
      responses:
        '200':
          description: 정상적으로 수정됨
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountCustomerv1dto'
              examples:
                응답 예시:
                  value:
                    id: 1
                    username: test@gmail.com
                    name: 고객 수정
                    email: test_modify@gmail.com
                    phone: '01012341234'
                    code: null
                    marketingSms: null
                    marketingEmail: null
                    marketingKakao: null
                    createdAt: '9999-01-01T00:00:00'
        '400':
          description: 파라미터 검증 실패
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountErrorresponse'
        '404':
          description: 수정할 고객 정보를 찾지 못 함
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountCustomerv1dto'
components:
  schemas:
    CustomerUpdateDTO:
      title: 고객 수정 데이터
      required:
        - name
      type: object
      properties:
        email:
          type: string
          description: 이메일
        name:
          type: string
          description: 이름
        phone:
          pattern: >-
            ^(0\d{1,2}-?\d{3,4}-?\d{4}|(\+\d{2,3}|\d{2,3}\)|\d{2,3})[
            -]?\d{1,2}[ -]?\d{3,4}[ -]?\d{4})$
          type: string
          description: 전화번호
        shipping:
          $ref: '#/components/schemas/ShippingAddressDTO'
        marketingEmail:
          type: boolean
          description: '고객이 허가한 마케팅 채널 - Email (기본값: false)'
        marketingSms:
          type: boolean
          description: '고객이 허가한 마케팅 채널 - SMS (기본값: false)'
        marketingKakao:
          type: boolean
          description: '고객이 허가한 마케팅 채널 - Kakao (기본값: false)'
        attributes:
          type: object
          additionalProperties:
            type: string
            description: 고객의 추가 정보 (커스텀 필드)
          description: 고객의 추가 정보 (커스텀 필드)
      description: 고객 수정 데이터
    AccountCustomerv1dto:
      title: 고객 상세 정보 데이터
      required:
        - createdAt
        - id
        - username
      type: object
      properties:
        id:
          type: integer
          description: 고객 번호
          format: int64
        username:
          type: string
          description: 고객 아이디
        name:
          type: string
          description: 고객 이름
        email:
          type: string
          description: 고객 이메일
        phone:
          type: string
          description: 고객 전화번호
        code:
          type: string
          description: 고객 코드
        marketingSms:
          type: boolean
          description: 고객이 허가한 마케팅 채널 - SMS
        marketingEmail:
          type: boolean
          description: 고객이 허가한 마케팅 채널 - Email
        marketingKakao:
          type: boolean
          description: 고객이 허가한 마케팅 채널 - Kakao
        createdAt:
          type: string
          description: 고객 생성 시점
          format: date-time
    AccountErrorresponse:
      required:
        - errorCode
      type: object
      properties:
        traceId:
          type: string
        errorCode:
          type: string
        errorMessage:
          type: string
        details:
          $ref: '#/components/schemas/ReturnError'
    ShippingAddressDTO:
      title: 배송지 정보 데이터
      required:
        - address1
        - address2
        - postcode
      type: object
      properties:
        postcode:
          type: string
          description: 우편번호
        address1:
          type: string
          description: 주소
        address2:
          type: string
          description: 세부 주소
        state:
          type: string
          description: 주 정보
        city:
          type: string
          description: 도시 정보
        countryCode:
          type: string
          description: 국가 코드
      description: 배송지 정보
    ReturnError:
      type: object
  securitySchemes:
    Secret-Token:
      type: apiKey
      in: header
      name: Secret-Token

````