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

# 카탈로그 아이템 교체

> URL의 itemId에 해당하는 아이템 전체를 교체합니다. 없으면 생성합니다.



## OpenAPI

````yaml /ko/api-reference/openapi.yaml put /v1/projects/{projectId}/catalogs/{catalogName}/items/{itemId}
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: 노티플라이 API 서버입니다
security: []
paths:
  /v1/projects/{projectId}/catalogs/{catalogName}/items/{itemId}:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
      - name: catalogName
        in: path
        description: 카탈로그를 만들 때 지정한 고유한 이름입니다.
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
      - name: itemId
        in: path
        description: 카탈로그 안에서 아이템을 식별하는 고유한 ID입니다.
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
    put:
      tags:
        - 카탈로그
      summary: replace-api-catalog-item
      description: URL의 itemId에 해당하는 아이템 전체를 교체합니다. 없으면 생성합니다.
      operationId: replaceApiCatalogItem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CatalogSingleItemWriteRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogItemResponse'
        '400':
          $ref: '#/components/responses/CatalogBadRequest'
        '401':
          $ref: '#/components/responses/CatalogUnauthenticated'
        '403':
          $ref: '#/components/responses/CatalogPermissionDenied'
        '404':
          $ref: '#/components/responses/CatalogNotFound'
        '409':
          $ref: '#/components/responses/CatalogConflict'
        '413':
          $ref: '#/components/responses/CatalogPayloadTooLarge'
        '500':
          $ref: '#/components/responses/CatalogInternalServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      description: 노티플라이 프로젝트 ID입니다.
      required: true
      schema:
        type: string
        pattern: ^[a-f0-9]{32}$
        minLength: 32
        maxLength: 32
  schemas:
    CatalogSingleItemWriteRequest:
      type: object
      additionalProperties: false
      required:
        - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 1
          items:
            type: object
            not:
              required:
                - id
            additionalProperties:
              $ref: '#/components/schemas/CatalogJsonValue'
      example:
        items:
          - name: 에브리데이 백팩
            price: 59000
            tags:
              - bag
              - new
    CatalogItemResponse:
      type: object
      required:
        - data
        - error
      properties:
        data:
          $ref: '#/components/schemas/CatalogItem'
        error:
          nullable: true
          enum:
            - null
      example:
        data:
          id: sku-001
          name: 에브리데이 백팩
          price: 59000
          tags:
            - bag
            - new
        error: null
    CatalogJsonValue:
      description: >-
        카탈로그 아이템 필드에 저장할 수 있는 재귀 JSON 값입니다. 문자열은 5,000자, 배열은 100개, object·array
        중첩은 50단계까지 허용합니다.
      oneOf:
        - type: string
          maxLength: 5000
        - type: number
        - type: boolean
        - nullable: true
          enum:
            - null
        - type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/CatalogJsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/CatalogJsonValue'
          description: >-
            저장되는 object 필드의 key에는 점(.)과 달러 기호($)를 사용할 수 없습니다. 배열 필드 PATCH의
            `$add`와 `$remove`만 예외입니다.
    CatalogItem:
      type: object
      description: >-
        고객이 관리하는 카탈로그 아이템입니다. 값은 별도로 분류하거나 가리지 않고 저장한 그대로 반환합니다. 개인 이름, 이메일,
        전화번호, 외부 유저 ID, 프로필 필드처럼 개인을 식별할 수 있는 값은 저장하지 마세요.
      required:
        - id
      properties:
        id:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          maxLength: 250
      additionalProperties:
        $ref: '#/components/schemas/CatalogJsonValue'
    CatalogApiErrorResponse:
      type: object
      required:
        - data
        - error
      properties:
        data:
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/CatalogApiError'
      example:
        data: null
        error:
          code: INVALID_ARGUMENT
          message: Invalid bulk item request.
          details:
            - field: items[0].unknown_field
              path:
                - items
                - 0
                - unknown_field
              code: invalid-fields
              message: 'Unrecognized field: unknown_field.'
    CatalogApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: array
          description: 입력 검증 오류가 발생한 필드와 경로를 제공합니다. 클라이언트에서 message 문자열을 해석하지 마세요.
          items:
            $ref: '#/components/schemas/CatalogApiValidationErrorDetail'
      additionalProperties: true
    CatalogApiValidationErrorDetail:
      type: object
      description: >-
        입력 검증 오류 한 건입니다. `field`는 사람이 읽는 점·대괄호 경로이고 `path`는 같은 위치를 문자열·숫자 배열로
        나타냅니다.
      required:
        - field
        - path
        - code
        - message
      properties:
        field:
          type: string
          description: '점·대괄호로 표현한 필드 경로입니다. 예: items[0].price'
        path:
          type: array
          description: 필드 경로를 문자열·숫자 segment로 나눈 배열입니다.
          items:
            anyOf:
              - type: string
              - type: integer
        code:
          type: string
          description: 입력이 거절된 이유를 나타내는 코드입니다.
        message:
          type: string
          description: 사람이 읽을 수 있는 검증 오류 메시지입니다.
      additionalProperties: false
  responses:
    CatalogBadRequest:
      description: Invalid Catalog request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogUnauthenticated:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogPermissionDenied:
      description: Project access denied.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogNotFound:
      description: Catalog resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogConflict:
      description: Catalog resource already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogPayloadTooLarge:
      description: JSON body exceeds 4 MiB.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
    CatalogInternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CatalogApiErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: POST /authenticate로 발급받은 인증 토큰을 Bearer 형식으로 전달합니다.

````