Files
HeuJung b16c5c38a5 fix(core,board,ecommerce,page,pay): 예외→응답 매핑 정비와 저장 배송지 승계 결함 수정
generic catch 가 4xx 를 돌려주면 인프라 장애가 입력 오류로 위장돼 장애 인지가
늦어지고, 이미 번역된 예외 메시지를 응답의 메시지 키 자리에 넘기면 키 해석에
실패해 원문이 그대로 화면에 나간다. 두 형태를 코어와 전 번들 확장에서 함께
정리하고, 판정기를 한 확장이 아닌 코어 모집단에 두어 확장 밖 동형 결함도
red 가 되게 했다 — 그 사각에 실제로 15건이 있었다.

주소록에서 해외 배송지를 고르면 국내 6필드만 옮겨 담아 해외 주소가 통째로
사라지던 결함도 함께 고쳤다. 저장은 200 으로 성공 처리돼 주문 상세를 다시
열기 전에는 드러나지 않았다.
2026-08-16 00:53:21 +09:00

32 KiB

Product Notice Templates API 레퍼런스

소유: module sirsoft-ecommerce · 생성: php artisan api:docgen (실측 기반). @generated 블록은 재생성 시 갱신되며, 사람이 작성한 설명은 보존됩니다.


TL;DR (5초 요약)

1. 이 문서는 실제 API 호출로 실측한 Product Notice Templates 엔드포인트 레퍼런스입니다
2. 각 엔드포인트: 메서드/URI/권한 + 요청 파라미터 표 + 요청 예시(curl) + 실측 응답 필드 표 + 응답 예시(envelope)
3. 응답 필드의 예시값·응답 예시 JSON 은 실제 호출 응답에서 관측된 값입니다
4. 갱신: 코드 변경 후 php artisan api:docgen 재실행
5. 설명(TODO) 칸은 사람이 채웁니다

GET /api/modules/sirsoft-ecommerce/admin/product-notice-templates

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.index
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@index
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.read

요청 파라미터

이름 위치 타입 필수 허용값 용도
search query string 아니오 max 200 검색어 (지정한 검색 대상 필드에서 부분 일치)
active_only query boolean 아니오 — true 시 활성(is_active) 템플릿만 조회
per_page query string 아니오 — 페이지당 항목 수 (all 은 전체 조회, 숫자는 최대 100)
page query integer 아니오 min 1 조회할 페이지 번호 (1부터 시작)

요청 예시

GET /api/modules/sirsoft-ecommerce/admin/product-notice-templates?search=%EC%98%88%EC%8B%9C%EA%B0%92&active_only=1&per_page=%EC%98%88%EC%8B%9C%EA%B0%92&page=1 HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

목록 응답: data.data[] 배열 항목의 필드 + data.pagination.

필드 타입 실측 예시값 용도/설명
id integer 1 기본 키 (내부 식별자)
name object {"ko":"의류","en":"Clothing"} 대상의 이름/명칭 (다국어 필드는 로케일별 값 객체)
localized_name string 의류 name 의 현재 로케일 해석 값 (다국어 필드를 표시용 문자열로 해석)
category string clothing 이 템플릿이 적용되는 품목 카테고리 식별자
fields array [{"name":{"ko":"제품 소재 (섬유의 조성 또는 혼용률)","en":"Material Com… 고시 항목 정의 배열 (항목별 name/content 다국어 — 상품 등록 시 고시 항목 자동 채움에 사용)
fields_count integer 9 fields 개수 (집계)
is_active boolean true active 여부
sort_order integer 1 표시 정렬 순서 값 (작을수록 우선)
icon string file-alt 아이콘 식별자 (아이콘 클래스/이름)
created_at string 2026-07-30 23:35:46 생성 일시
updated_at string 2026-07-30 23:35:46 최종 수정 일시
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵 (can_update, can_delete 등 — 권한 맵 기반)

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시 목록을 불러왔습니다.",
    "data": {
        "data": [
            {
                "id": 1,
                "name": {
                    "ko": "의류",
                    "en": "Clothing"
                },
                "localized_name": "의류",
                "category": "clothing",
                "fields": [
                    {
                        "name": {
                            "ko": "제품 소재 (섬유의 조성 또는 혼용률)",
                            "en": "Material Composition"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "색상",
                            "en": "Color"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "치수",
                            "en": "Size"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "제조자/수입자",
                            "en": "Manufacturer/Importer"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "제조국",
                            "en": "Country of Origin"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    "... (총 9건 중 5건 표시)"
                ],
                "...": "(7개 키 생략, 총 12개)"
            },
            {
                "id": 2,
                "name": {
                    "ko": "구두/신발",
                    "en": "Shoes"
                },
                "localized_name": "구두/신발",
                "category": "shoes",
                "fields": [
                    {
                        "name": {
                            "ko": "제품 주소재 (겉감/안감)",
                            "en": "Main Material (Outer/Inner)"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "색상",
                            "en": "Color"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "치수 (발 길이)",
                            "en": "Size (Foot Length)"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "굽 높이",
                            "en": "Heel Height"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    {
                        "name": {
                            "ko": "제조자/수입자",
                            "en": "Manufacturer/Importer"
                        },
                        "content": {
                            "ko": "상세페이지 참조",
                            "en": "See product page"
                        }
                    },
                    "... (총 9건 중 5건 표시)"
                ],
                "...": "(7개 키 생략, 총 12개)"
            },
            "... (총 25건 중 2건 표시)"
        ],
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        },
        "pagination": {
            "current_page": 1,
            "last_page": 3,
            "per_page": 25,
            "total": 57,
            "from": 1,
            "...": "(2개 키 생략, 총 7개)"
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.read)이 없는 경우
422 Unprocessable Entity 요청 파라미터가 검증 규칙을 위반한 경우 (error.errors 에 필드별 메시지)

설명 관리자가 상품정보제공고시 템플릿(전자상거래법상 품목별 필수 고지 항목 세트) 목록을 조회합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.read 권한이 필요하며, ProductNoticeTemplateController@index가 search·active_only 필터를 조립합니다. per_page가 0 이하이거나 all이면 ProductNoticeTemplateService::getAllTemplates()로 전체를, 그 외에는 getPaginatedTemplates()로 페이지네이션 조회(data.pagination 포함)합니다. 각 항목은 다국어 템플릿명, 품목 category, 고시 항목 배열 fields(및 fields_count)를 포함합니다.

POST /api/modules/sirsoft-ecommerce/admin/product-notice-templates

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.store
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@store
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.create

요청 파라미터

이름 위치 타입 필수 허용값 용도
name body array 예 — 대상의 이름/명칭
category body string 아니오 max 100 이 템플릿이 적용되는 품목 카테고리 식별자
fields body array 예 min 1 고시 항목 정의 배열 (항목별 name/content 다국어, 최소 1개)
is_active body boolean 아니오 — 활성 여부 (true 활성 / false 비활성)
sort_order body integer 아니오 min 0 표시 정렬 순서 값 (작을수록 우선)

이 엔드포인트는 확장이 파라미터를 추가할 수 있습니다 (sirsoft-ecommerce.product-notice-template.create_validation_rules).

요청 예시

POST /api/modules/sirsoft-ecommerce/admin/product-notice-templates HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}
Content-Type: application/json

{
    "name": [
        "예시 이름"
    ],
    "category": "예시값",
    "fields": [
        "예시값"
    ],
    "is_active": true,
    "sort_order": 1
}

응답 필드 (data 내부)

단건 응답: data 객체의 필드 (ProductNoticeTemplateResource).

필드 타입 실측 예시값 용도/설명
id integer 3 생성된 템플릿의 기본 키 (내부 식별자)
name object {"ko":"의류 고시","en":"Clothing Notice"} 템플릿명 (로케일별 값 객체)
localized_name string 의류 고시 name 의 현재 로케일 해석 값
category string|null clothing 이 템플릿이 적용되는 품목 카테고리 식별자 (미지정 시 null)
fields array [{"label":"품명","value":"샘플"}] 고시 항목 정의 배열 (요청의 fields 가 그대로 저장됨)
fields_count integer 1 fields 배열의 개수 (집계값)
is_active boolean true 활성 여부
sort_order integer 0 표시 정렬 순서 값 (작을수록 우선)
icon string file-alt 목록 UI(SortableMenuList)용 고정 아이콘 식별자
created_at string 2026-07-08 10:44:49 생성 일시 (사용자 타임존 기준 문자열)
updated_at string 2026-07-08 10:44:49 최종 수정 일시 (사용자 타임존 기준 문자열)
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵

응답 예시

HTTP/1.1 201
{
    "success": true,
    "message": "상품정보제공고시가 생성되었습니다.",
    "data": {
        "id": 3,
        "name": {
            "ko": "의류 고시",
            "en": "Clothing Notice"
        },
        "localized_name": "의류 고시",
        "category": "clothing",
        "fields": [
            {
                "label": "품명",
                "value": "샘플"
            }
        ],
        "fields_count": 1,
        "is_active": true,
        "sort_order": 0,
        "icon": "file-alt",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 10:44:49",
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
400 Bad Request 생성 처리 중 예외 발생 (exceptions.operation_failed)
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.create)이 없는 경우
422 Unprocessable Entity 요청 파라미터가 검증 규칙을 위반한 경우 (error.errors 에 필드별 메시지)
500 Internal Server Error 서버 내부 오류 — 도메인 규칙 위반이 아닌 예외(인프라 장애·코드 결함)는 4xx 로 뭉개지 않고 500 으로 구분한다

설명 관리자가 새 상품정보제공고시 템플릿을 생성합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.create 권한이 필요하며, ProductNoticeTemplateController@store가 ProductNoticeTemplateService::createTemplate()에 검증된 데이터를 전달해 저장합니다. name(다국어 배열)과 fields(고시 항목 정의, 최소 1개)는 필수이고, category(품목 카테고리), is_active, sort_order는 선택입니다. 확장이 sirsoft-ecommerce.product-notice-template.create_validation_rules 필터로 파라미터를 추가할 수 있으며, 성공 시 HTTP 201을, 처리 실패 시 400 에러 응답을 반환합니다.

DELETE /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.destroy
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@destroy
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.delete

요청 파라미터

이름 위치 타입 필수 허용값 용도
id path string 예 — 대상 리소스의 식별자

요청 예시

DELETE /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

단건 응답: 삭제 결과 요약 (data 객체).

필드 타입 실측 예시값 용도/설명
template_id integer 3 삭제된 템플릿의 기본 키

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시가 삭제되었습니다.",
    "data": {
        "template_id": 3
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.delete)이 없는 경우
404 Not Found path 파라미터에 해당하는 리소스가 없는 경우
500 Internal Server Error 서버 내부 오류 — 도메인 규칙 위반이 아닌 예외(인프라 장애·코드 결함)는 4xx 로 뭉개지 않고 500 으로 구분한다

설명 관리자가 상품정보제공고시 템플릿 1건을 삭제합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.delete 권한이 필요하며, ProductNoticeTemplateController@destroy가 ProductNoticeTemplateService::deleteTemplate()를 호출해 삭제합니다. path의 id에 해당하는 템플릿이 없거나 삭제 처리 중 오류가 발생하면 각각 404/400 에러 응답을 반환합니다. 삭제된 템플릿은 이후 신규 상품의 고시 항목 자동 채움에 더 이상 사용되지 않습니다.

GET /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.show
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@show
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.read

요청 파라미터

이름 위치 타입 필수 허용값 용도
id path string 예 — 대상 리소스의 식별자

요청 예시

GET /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

단건 응답: data 객체의 필드 (ProductNoticeTemplateResource). 필드 구성은 이 문서의 PUT /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} (템플릿 수정) 응답 필드 표와 동일합니다.

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시 목록을 불러왔습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "의류 고시(수정)",
            "en": "Clothing Notice (Updated)"
        },
        "localized_name": "의류 고시(수정)",
        "category": "clothing",
        "fields": [
            {
                "label": "품명",
                "value": "샘플"
            }
        ],
        "fields_count": 1,
        "is_active": true,
        "sort_order": 0,
        "icon": "file-alt",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 15:00:27",
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.read)이 없는 경우
404 Not Found path 파라미터에 해당하는 리소스가 없는 경우

설명 관리자가 상품정보제공고시 템플릿 1건의 상세를 조회합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.read 권한이 필요하며, ProductNoticeTemplateController@show가 ProductNoticeTemplateService::getTemplate()로 단건을 조회합니다. 다국어 템플릿명(name, localized_name), 품목 category, 고시 항목 배열 fields, 활성 여부·정렬 순서를 반환하며, 해당 id의 템플릿이 없으면 404를 반환합니다. 주로 템플릿 수정 화면 진입 시 기존 고시 항목을 불러오는 데 사용됩니다.

PUT /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.update
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@update
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.update

요청 파라미터

이름 위치 타입 필수 허용값 용도
id path string 예 — 대상 리소스의 식별자
name body array 예 — 대상의 이름/명칭
category body string 아니오 max 100 이 템플릿이 적용되는 품목 카테고리 식별자
fields body array 예 min 1 고시 항목 정의 배열 (항목별 name/content 다국어, 최소 1개)
is_active body boolean 아니오 — 활성 여부 (true 활성 / false 비활성)
sort_order body integer 아니오 min 0 표시 정렬 순서 값 (작을수록 우선)

이 엔드포인트는 확장이 파라미터를 추가할 수 있습니다 (sirsoft-ecommerce.product-notice-template.update_validation_rules).

요청 예시

PUT /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}
Content-Type: application/json

{
    "name": [
        "예시 이름"
    ],
    "category": "예시값",
    "fields": [
        "예시값"
    ],
    "is_active": true,
    "sort_order": 1
}

응답 필드 (data 내부)

단건 응답: data 객체의 필드 (ProductNoticeTemplateResource).

필드 타입 실측 예시값 용도/설명
id integer 1 수정된 템플릿의 기본 키 (내부 식별자)
name object {"ko":"의류 고시(수정)","en":"Clothing Notice (Updated)"} 템플릿명 (로케일별 값 객체)
localized_name string 의류 고시(수정) name 의 현재 로케일 해석 값
category string|null clothing 이 템플릿이 적용되는 품목 카테고리 식별자 (미지정 시 null)
fields array [{"label":"품명","value":"샘플"}] 고시 항목 정의 배열 (요청의 fields 로 대체됨)
fields_count integer 1 fields 배열의 개수 (집계값)
is_active boolean true 활성 여부
sort_order integer 0 표시 정렬 순서 값 (작을수록 우선)
icon string file-alt 목록 UI(SortableMenuList)용 고정 아이콘 식별자
created_at string 2026-07-08 10:44:49 생성 일시 (사용자 타임존 기준 문자열)
updated_at string 2026-07-08 15:00:27 최종 수정 일시 (사용자 타임존 기준 문자열)
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시가 수정되었습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "의류 고시(수정)",
            "en": "Clothing Notice (Updated)"
        },
        "localized_name": "의류 고시(수정)",
        "category": "clothing",
        "fields": [
            {
                "label": "품명",
                "value": "샘플"
            }
        ],
        "fields_count": 1,
        "is_active": true,
        "sort_order": 0,
        "icon": "file-alt",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 15:00:27",
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
400 Bad Request 수정 처리 중 예외 발생 (exceptions.operation_failed)
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.update)이 없는 경우
404 Not Found path 파라미터에 해당하는 리소스가 없는 경우
422 Unprocessable Entity 요청 파라미터가 검증 규칙을 위반한 경우 (error.errors 에 필드별 메시지)
500 Internal Server Error 서버 내부 오류 — 도메인 규칙 위반이 아닌 예외(인프라 장애·코드 결함)는 4xx 로 뭉개지 않고 500 으로 구분한다

설명 관리자가 상품정보제공고시 템플릿 1건을 수정합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.update 권한이 필요하며, ProductNoticeTemplateController@update가 ProductNoticeTemplateService::updateTemplate()에 검증된 데이터를 전달해 갱신합니다. name(다국어 배열)과 fields(최소 1개)는 필수이고, category·is_active·sort_order도 함께 변경할 수 있습니다. 확장이 sirsoft-ecommerce.product-notice-template.update_validation_rules 필터로 파라미터를 추가할 수 있으며, 대상이 없거나 처리 실패 시 각각 404/400 에러 응답을 반환합니다.

POST /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}/copy

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.copy
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@copy
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.create

요청 파라미터

이름 위치 타입 필수 허용값 용도
id path string 예 — 대상 리소스의 식별자

요청 예시

POST /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}/copy HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

단건 응답: data 객체의 필드 (ProductNoticeTemplateResource). 필드 구성은 이 문서의 PUT /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} (템플릿 수정) 응답 필드 표와 동일합니다. 원본과 동일한 항목 구성으로 새 기본 키가 발급됩니다.

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시가 복사되었습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "의류 고시(수정)",
            "en": "Clothing Notice (Updated)"
        },
        "localized_name": "의류 고시(수정)",
        "category": "clothing",
        "fields": [
            {
                "label": "품명",
                "value": "샘플"
            }
        ],
        "fields_count": 1,
        "is_active": true,
        "sort_order": 0,
        "icon": "file-alt",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 15:00:27",
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.create)이 없는 경우
404 Not Found path 파라미터에 해당하는 리소스가 없는 경우
500 Internal Server Error 서버 내부 오류 — 도메인 규칙 위반이 아닌 예외(인프라 장애·코드 결함)는 4xx 로 뭉개지 않고 500 으로 구분한다

설명 관리자가 기존 상품정보제공고시 템플릿을 원본 삼아 복제본을 생성합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.create 권한이 필요하며(생성 계열이므로 create 권한 사용), ProductNoticeTemplateController@copy가 ProductNoticeTemplateService::copyTemplate()를 호출해 path의 id 템플릿을 복사합니다. 별도 본문 없이 원본 id만으로 동작하며, 복제된 새 템플릿을 HTTP 201로 반환합니다. 유사한 고시 항목 세트를 반복 작성하지 않고 빠르게 파생 템플릿을 만들 때 사용하며, 원본이 없거나 처리 실패 시 각각 404/400 에러 응답을 반환합니다.

PATCH /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}/toggle-active

  • 라우트명: api.modules.sirsoft-ecommerce.admin.product-notice-templates.toggle-active
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\ProductNoticeTemplateController@toggleActive
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.product-notice-templates.update

요청 파라미터

이름 위치 타입 필수 허용값 용도
id path string 예 — 대상 리소스의 식별자

요청 예시

PATCH /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id}/toggle-active HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

단건 응답: data 객체의 필드 (ProductNoticeTemplateResource). 필드 구성은 이 문서의 PUT /api/modules/sirsoft-ecommerce/admin/product-notice-templates/{id} (템플릿 수정) 응답 필드 표와 동일합니다. 비활성으로 전환하면 상품정보제공고시가 비활성화되었습니다. 가 반환됩니다.

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "상품정보제공고시가 활성화되었습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "의류 고시(수정)",
            "en": "Clothing Notice (Updated)"
        },
        "localized_name": "의류 고시(수정)",
        "category": "clothing",
        "fields": [
            {
                "label": "품명",
                "value": "샘플"
            }
        ],
        "fields_count": 1,
        "is_active": true,
        "sort_order": 0,
        "icon": "file-alt",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 15:00:27",
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.product-notice-templates.update)이 없는 경우
404 Not Found path 파라미터에 해당하는 리소스가 없는 경우
500 Internal Server Error 서버 내부 오류 — 도메인 규칙 위반이 아닌 예외(인프라 장애·코드 결함)는 4xx 로 뭉개지 않고 500 으로 구분한다

설명 관리자가 상품정보제공고시 템플릿의 활성/비활성 상태를 한 번의 요청으로 토글합니다. auth:sanctum + admin + sirsoft-ecommerce.product-notice-templates.update 권한이 필요하며, ProductNoticeTemplateController@toggleActive가 ProductNoticeTemplateService::toggleActive()를 호출해 현재 is_active 값을 반전시킵니다. 반전 결과에 따라 활성화/비활성화 메시지를 구분해 응답하므로 목록 화면의 스위치 조작에 적합합니다. 대상이 없거나 처리 실패 시 각각 404/400 에러 응답을 반환합니다.