SaaS API가이드라인 AI 생성 입력
PUT /ai/guideline/generation/{collabNo}/input
AI 가이드라인 생성 입력 저장 (Upsert)
AI 생성 입력 저장
사용자가 입력한 제품 링크, 컨셉 텍스트, 업로드된 파일 URL, (선택) 레퍼런스 링크를 저장합니다.
호출 시 GuidelineDocument.generationInput 필드를 통째로 덮어씁니다 (히스토리 미지원). 다른 필드(data, status 등)는 영향받지 않습니다.
| 항목 | 값 |
|---|---|
| 메서드 | PUT |
| 경로 | /ai/guideline/generation/{collabNo}/input |
| 인증 | Bearer 토큰 필수 |
| Content-Type | application/json |
요청
PUT /ai/guideline/generation/123/input HTTP/1.1
Host: api.glowb.io
Authorization: Bearer {access_token}
Content-Type: application/jsoncurl -X PUT "https://api.glowb.io/ai/guideline/generation/123/input" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{...}'Path Parameters
Prop
Type
Request Body
{
"productLink": "https://shop.example.com/products/glowb-cream",
"conceptText": "20대 후반 여성 타깃, 데일리 사용 후기 톤. 기존 가이드라인은 첨부 PDF 참고해주세요.",
"fileUrls": [
"https://glowb-input.s3.ap-southeast-1.amazonaws.com/guideline/generation/123/1714435200000_b7c1...pdf"
],
"referenceLinks": [
"https://www.instagram.com/reel/xxxx"
]
}필드 상세
Prop
Type
응답
성공 응답 (200 OK)
{
"status": 200,
"code": null,
"message": "AI 생성 입력이 저장되었습니다.",
"data": {
"productLink": "https://shop.example.com/products/glowb-cream",
"conceptText": "20대 후반 여성 타깃, 데일리 사용 후기 톤...",
"fileUrls": [
"https://glowb-input.s3.../1714435200000_b7c1...pdf"
],
"referenceLinks": ["https://www.instagram.com/reel/xxxx"],
"generatedAt": "2026-04-30T02:30:00Z"
}
}에러 응답
| 상태 코드 | 코드 | 설명 |
|---|---|---|
403 | UNAUTHORIZED_ACCESS | 캠페인 소유자가 아니며 관리자도 아님 |
404 | CAMPAIGN_NOT_FOUND | 캠페인을 찾을 수 없음 |
동작 규칙
| 조건 | 동작 |
|---|---|
| 가이드라인 도큐먼트 없음 | 새로 생성 후 generationInput 만 채움 (data, status 는 비어있는 상태) |
| 가이드라인 도큐먼트 있음 | generationInput 만 덮어씀, 다른 필드는 보존 |
| 동일 collabNo로 재호출 | 매번 generationInput 통째로 교체 (히스토리 X) |
호출 흐름 예시
1) POST /ai/guideline/generation/123/files → url1 받음
2) POST /ai/guideline/generation/123/files → url2 받음
3) PUT /ai/guideline/generation/123/input
{
productLink, conceptText,
fileUrls: [url1, url2],
referenceLinks: [...]
}