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

# 상품 조회

> 상품 하나의 정보를 가져온다.



## OpenAPI

````yaml /api-reference/openapi.json get /resapi/product/{product_id}
openapi: 3.1.0
info:
  title: Edicus Server API
  version: 1.1.5
  description: >-
    Edicus 편집기 연동에 필요한 서버 API입니다. 토큰 발급, 프로젝트 조회, 주문 처리, 폰트와 상품 정보, 템플릿 등록을
    다룹니다.


    ## 반드시 서버에서만 호출합니다


    모든 엔드포인트는 `edicus-api-key` 헤더를 요구합니다. 이 키는 고객사 서버에만 두고 브라우저 코드나 공개 저장소에 넣지
    않습니다. 브라우저에는 이 API로 발급받은 토큰만 내려보냅니다.


    ## 오류 응답


    `api.edicus.io`는 실패를 4xx와 5xx 상태 코드로 알리고, body는 언제나 `{"error": {"code",
    "message", "details", "request_id"}}` 모양입니다. `error.code`로 분기합니다. 같은
    `request_id`가 응답 헤더 `x-request-id`에도 실립니다.


    `resource-dot-edicusbase.appspot.com`은 방식이 다릅니다. 파라미터 누락은 `400`, 인증 실패는
    `401`, 그 밖의 모든 실패는 `500`이고, body에 `error` 객체가 없습니다.


    ## 응답 형식


    응답의 `content-type`은 `application/json`입니다.
  contact:
    name: 모션원
    url: https://edicus.io
servers:
  - url: https://api.edicus.io
    description: Server API 호스트
security:
  - edicusApiKey: []
tags:
  - name: Auth
    description: 토큰 발급
  - name: Projects
    description: 프로젝트 조회, 삭제, 복제
  - name: Orders
    description: 잠정 주문, 확정 주문, 취소
  - name: Fonts
    description: 폰트 그룹과 폰트 목록
  - name: Products
    description: 상품과 상품 카테고리 정보
  - name: Templates
    description: 리소스 토큰과 템플릿 패키지 등록
  - name: Resources
    description: 리소스 검색과 사용자 이미지
paths:
  /resapi/product/{product_id}:
    get:
      tags:
        - Products
      summary: 상품 조회
      description: 상품 하나의 정보를 가져온다.
      operationId: getProduct
      parameters:
        - name: product_id
          in: path
          required: true
          schema:
            type: string
          example: NAMECARD
          description: 상품 코드(`prod_code`)
      responses:
        '200':
          description: 성공.
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
        '401':
          description: >-
            인증 실패입니다. `api.edicus.io`와 달리 `error` 객체로 감싸지 않고 `{"code": ...}`를
            그대로 내려줍니다. code는 `invalid-edicus-api-key`, `no-edicus-id-token`,
            `token-expired`, `invalid-role` 중 하나입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceAuthError'
              example:
                code: invalid-edicus-api-key
        '500':
          description: >-
            처리 중 오류입니다. 리소스 API는 인증 실패와 파라미터 누락을 뺀 **모든 실패를 500으로 내려줍니다.** body는
            던져진 오류 객체를 그대로 직렬화한 것이라, Error 인스턴스인 경우 빈 객체 `{}`가 됩니다.
          content:
            application/json:
              schema:
                type: object
              example: {}
      servers:
        - url: https://resource-dot-edicusbase.appspot.com
          description: 리소스 API 호스트
components:
  schemas:
    Product:
      type: object
      properties:
        prodCode:
          type: string
          description: 상품 코드입니다. `ps_code`의 `@` 뒤쪽에 해당합니다
        dpName:
          type: string
          description: 화면에 보이는 상품 이름입니다
        cateCode:
          type: string
          description: 상품이 속한 카테고리 코드입니다
        editor:
          type: string
          enum:
            - template
            - print
          description: 편집기 종류
        template_option:
          $ref: '#/components/schemas/TemplateProductOption'
        print_option:
          $ref: '#/components/schemas/PrintProductOption'
        userData:
          type: string
        sizes:
          type: array
          items:
            $ref: '#/components/schemas/ProductSize'
          description: 상품의 사이즈 목록입니다
      description: 파트너에 등록된 상품 하나입니다. 리소스 API가 저장 형식 그대로 돌려주므로 필드 이름이 camelCase입니다.
    ResourceAuthError:
      type: object
      description: 리소스 API의 인증 실패 응답입니다. Server API의 `ErrorBody`와 모양이 다릅니다.
      properties:
        code:
          type: string
    TemplateProductOption:
      type: object
      properties:
        cover:
          type: boolean
          description: 커버가 있는가. 스토리보드 출력 시 참조
        splitPage:
          type: boolean
          description: 페이지가 분리되는가. 스토리보드 출력 시 참조
        doubleSide:
          type: boolean
          description: 양면 상품인가
        multiPage:
          type: boolean
          description: 복수 페이지 상품인가. 스토리보드를 보여줄지 판단
        minContentPage:
          type: integer
          description: 최소 페이지 수. 페이지 삭제 시 참조
        maxContentPage:
          type: integer
          description: 최대 페이지 수. 페이지 추가 시 참조
        pageMenu:
          type: boolean
          description: 스토리보드에 페이지 메뉴가 나오는가
        photoTab:
          type: boolean
        templateTab:
          type: boolean
        backgroundTab:
          type: boolean
        layoutTab:
          type: boolean
        stickerTab:
          type: boolean
        maskTab:
          type: boolean
        textTab:
          type: boolean
        cutoutTab:
          type: boolean
        autoImport:
          type: boolean
          description: 사진 자동 넣기가 필요한가
        effectCellUI:
          type: boolean
          description: 효과 사용
        borderCellUI:
          type: boolean
          description: 테두리 기능
        staticCellUI:
          type: boolean
          description: 이동·순서·복사·삭제
        optionChange:
          type: boolean
          description: 옵션 변경 버튼
        initialZoom:
          type: string
          description: '`fill` 또는 `100%`'
    PrintProductOption:
      type: object
      properties:
        ui_paperType:
          type: boolean
        ui_rendition:
          type: boolean
        ui_showBorder:
          type: boolean
        ui_showDate:
          type: boolean
        ui_autoAdjust:
          type: boolean
        def_paperType:
          type: string
        def_rendition:
          type: string
        def_showBorder:
          type: boolean
        def_showDate:
          type: boolean
        def_autoAdjust:
          type: boolean
        fixedOrientation:
          type: boolean
    ProductSize:
      type: object
      properties:
        sizeCode:
          type: string
        dpName:
          type: string
        refDPI:
          type: integer
          description: 권장 해상도 최저 DPI. 아직 사용하지 않는다
        lowDPI:
          type: integer
          description: 최소 해상도 DPI. 화질 경고 판단에 쓴다
        editorMargin_mm:
          type: object
          properties:
            width:
              type: number
            height:
              type: number
        pageInfos:
          type: array
          items:
            $ref: '#/components/schemas/ProductPageInfo'
        printInfo:
          $ref: '#/components/schemas/ProductPrintInfo'
    ProductPageInfo:
      type: object
      properties:
        pageType:
          type: string
        width_mm:
          type: number
        height_mm:
          type: number
        cutMargin_mm:
          type: object
          properties:
            width:
              type: number
            height:
              type: number
    ProductPrintInfo:
      type: object
      properties:
        width_mm:
          type: number
        height_mm:
          type: number
        borderLeft_mm:
          type: number
        borderTop_mm:
          type: number
        borderRight_mm:
          type: number
        borderBottom_mm:
          type: number
        borderColor:
          type: string
        borderRound_mm:
          type: number
  securitySchemes:
    edicusApiKey:
      type: apiKey
      in: header
      name: edicus-api-key
      description: 모션원에서 발급받는 API 키입니다. 외부에 유출되지 않도록 각별히 주의합니다.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.