콘텐츠로 이동

콘텐츠 API

콘텐츠 API는 서버용 비공개 키가 필요합니다.

Authorization: Bearer {SERVER_PRIVATE_API_KEY}
Accept: application/json
GET /api/public/v1/contents
이름필수타입설명
language선택stringko, en, ja. 기본값 ko
page선택integer페이지 번호. 기본값 1
limit선택integer페이지당 개수. 기본값 20, 최대 100
status선택stringpublish, pending, paused, in_review, banned
content_type선택stringvod, live, offline, digital_content
category_id선택integer특정 카테고리의 콘텐츠만 조회
category_ids선택array 또는 comma string여러 카테고리 중 하나에 속한 콘텐츠 조회
tag_id선택integer특정 태그의 콘텐츠만 조회
tag_ids선택array 또는 comma string여러 태그 중 하나가 붙은 콘텐츠 조회
search선택string콘텐츠명 검색
Terminal window
curl -X GET "https://{site_host}/api/public/v1/contents?content_type=vod&page=1" \
-H "Authorization: Bearer {SERVER_PRIVATE_API_KEY}" \
-H "Accept: application/json"
GET /api/public/v1/contents/{contentId}
이름필수타입설명
language선택stringko, en, ja. 기본값 ko
POST /api/public/v1/contents

application/json 또는 multipart/form-data로 전송합니다.

이름필수타입설명
content_type필수stringvod, live, offline, digital_content
title필수string콘텐츠명
description_html필수string콘텐츠 상세 HTML
category_ids필수array of integer카테고리 ID 목록
featured_image필수file 또는 string대표 이미지
status선택string기본값 pending
images선택array추가 이미지 목록
thumbnail_link선택string썸네일 링크
inventory_display_mode선택string재고 표시 방식
installment_month선택integer0부터 36
allow_link선택string외부 허용 링크
connected_membership_ids선택array연결 멤버십 ID 목록
tag_ids선택array콘텐츠 태그 ID 목록. 현재 콘텐츠당 1개까지 선택 가능
options선택array구매 옵션 목록
이름타입설명
chaptersarray챕터와 영상 아이템 구조
이름타입설명
locationstring장소
schedulearray일정 정보
이름타입설명
download_filesarray다운로드 파일 정보
Terminal window
curl -X POST "https://{site_host}/api/public/v1/contents" \
-H "Authorization: Bearer {SERVER_PRIVATE_API_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"content_type": "vod",
"title": "포토샵 입문 클래스",
"description_html": "<p>처음 시작하는 분들을 위한 강의입니다.</p>",
"status": "publish",
"category_ids": [11],
"tag_ids": [23],
"featured_image": "https://example.com/main.jpg",
"base_price": 39000,
"sale_price": 29000,
"is_on_sale": true,
"options": [],
"chapters": []
}'
PUT /api/public/v1/contents/{contentId}

전달한 필드만 업데이트합니다. 전달하지 않은 필드는 기존 값을 유지합니다.

  • content_type 변경은 지원하지 않습니다.
  • 수정 요청은 대상 콘텐츠의 현재 유형을 기준으로 검증합니다.
  • 오프라인 콘텐츠에 VOD 전용 chapters 구조를 보내면 422 오류가 반환될 수 있습니다.
  • featured_image를 보내면 대표 이미지가 교체됩니다.
  • images를 보내면 추가 이미지 전체가 교체됩니다.
  • category_ids를 보내면 카테고리 전체가 교체됩니다.
  • tag_ids를 보내면 콘텐츠 태그가 교체됩니다. 빈 배열을 보내면 태그가 제거됩니다.
  • connected_membership_ids를 보내면 연결 멤버십 전체가 교체됩니다.
  • options를 보내면 해당 타입의 옵션 구조가 동기화됩니다.
  • VOD에서 chapters를 보내면 챕터/아이템 구조가 동기화됩니다.
Terminal window
curl -X PUT "https://{site_host}/api/public/v1/contents/4321" \
-H "Authorization: Bearer {SERVER_PRIVATE_API_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"title": "포토샵 입문 클래스 v2",
"status": "publish",
"category_ids": [11, 12],
"tag_ids": [23]
}'
필드설명
content_id콘텐츠 ID
title콘텐츠명
description_html콘텐츠 상세 HTML
content_type콘텐츠 유형
status콘텐츠 상태
language언어 코드
category_ids카테고리 ID 목록
categories카테고리 상세 목록
tag_ids연결된 콘텐츠 태그 ID
featured_image대표 이미지
images추가 이미지
base_price기본가
sale_price할인가
is_on_sale할인 여부
is_free무료 여부
connected_membership_ids연결 멤버십 ID
options구매 옵션
chaptersVOD 챕터 구조
created_at생성 일시
updated_at수정 일시