Files
Gnuboard7/modules/_bundled/sirsoft-ecommerce/docs/api/brands.md
T
HeuJung b3d0da9355 fix(release): 7.0.7 릴리즈 검증 발견 결함 전수 처리 및 출시일 8/18 정렬
7.0.7 페이로드 전수 검증에서 발견된 error 4건·warn 14건을 릴리즈 전에
처리했다. 미출시 분량의 자체 결함(회원 통합검색 500, 관리자 스코프 403 의
500 위장 등)이므로 페이로드에 합류시키고, 출시 대상 26개 CHANGELOG 의
버전 섹션 날짜를 2026-08-18 로 정렬했다.

- 통합검색 import 복원 + 이커머스 관리자 typed 403 catch 대칭(테스트 동반)
- admin 판정 스니핑 사설 사본 전수 수렴(BoardResource) + 조건 스캔 테스트
- 스케줄 인터프리터 변형 표기(확장자·버전 접미사) 정규화 차단
- ckeditor5 참조 판정 배치화·fail-safe, 결제 플러그인 진단 페이로드 대칭
- 템플릿 다크 대비·상태 Select value-제어 + --production 재빌드
- Upgrade_7_0_7 잔존 중복 색인 정리 스텝, API 문서·i18n(ko/en/ja) 동기
2026-08-18 08:12:55 +09:00

26 KiB

Brands API 레퍼런스

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


TL;DR (5초 요약)

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

GET /api/modules/sirsoft-ecommerce/admin/brands

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

요청 파라미터

이름 위치 타입 필수 허용값 용도
is_active query boolean 아니오 — 활성 여부 (true 활성 / false 비활성)
search query string 아니오 max 100 검색어 (지정한 검색 대상 필드에서 부분 일치)
sort query string 아니오 name_asc, name_desc, created_asc, created_desc 정렬 기준 (필드명, - 접두 시 내림차순)
sort_by query string 아니오 name, sort_order 정렬 기준 필드명
sort_order query string 아니오 asc, desc 정렬 방향 (asc 오름차순 / desc 내림차순)
locale query string 아니오 ko, en 로케일 코드 (표시 언어/지역)

요청 예시

GET /api/modules/sirsoft-ecommerce/admin/brands?is_active=1&search=%EC%98%88%EC%8B%9C%EA%B0%92&sort=name_asc&sort_by=name&sort_order=asc&locale=ko HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

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

필드 타입 실측 예시값 용도/설명
number integer 42 목록에서의 순번 (페이지네이션 반영 행 번호 — HasRowNumber 파생)
id integer 20 기본 키 (내부 식별자)
name object {"ko":"ASUS","en":"ASUS"} 대상의 이름/명칭 (다국어 필드는 로케일별 값 객체)
localized_name string ASUS name 의 현재 로케일 해석 값 (다국어 필드를 표시용 문자열로 해석)
slug string asus URL 친화 식별자 (slug)
url string asus SortableMenuItem 표시용 URL (slug 값을 그대로 노출)
website string https://www.asus.com 브랜드 공식 웹사이트 URL
sort_order integer 20 표시 정렬 순서 값 (작을수록 우선)
is_active boolean true active 여부
icon string tag 아이콘 식별자 (아이콘 클래스/이름)
created_at string 2026-07-30 23:35:46 생성 일시
updated_at string 2026-07-30 23:35:46 최종 수정 일시
creator array [] 생성자 정보 객체 (uuid/name/email — creator 관계 파생)
updater array [] 수정자 정보 객체 (id/name — updater 관계 파생, 로드 시에만 포함)
products_count integer 1 products 개수 (집계)
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵 (can_update, can_delete 등 — 권한 맵 기반)

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "브랜드 목록을 조회했습니다.",
    "data": {
        "data": [
            {
                "number": 42,
                "id": 20,
                "name": {
                    "ko": "ASUS",
                    "en": "ASUS"
                },
                "localized_name": "ASUS",
                "slug": "asus",
                "url": "asus",
                "website": "https://www.asus.com",
                "sort_order": 20,
                "is_active": true,
                "icon": "tag",
                "created_at": "2026-07-30 23:35:46",
                "updated_at": "2026-07-30 23:35:46",
                "creator": [],
                "updater": [],
                "products_count": 1,
                "abilities": {
                    "can_create": true,
                    "can_update": true,
                    "can_delete": true
                }
            },
            {
                "number": 41,
                "id": 26,
                "name": {
                    "ko": "CJ제일제당",
                    "en": "CJ CheilJedang"
                },
                "localized_name": "CJ제일제당",
                "slug": "cj",
                "url": "cj",
                "website": "https://www.cj.co.kr",
                "sort_order": 26,
                "is_active": true,
                "icon": "tag",
                "created_at": "2026-07-30 23:35:46",
                "updated_at": "2026-07-30 23:35:46",
                "creator": [],
                "updater": [],
                "products_count": 0,
                "abilities": {
                    "can_create": true,
                    "can_update": true,
                    "can_delete": true
                }
            },
            "... (총 42건 중 2건 표시)"
        ],
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

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

설명 관리자용 브랜드 목록을 조회합니다. auth:sanctum + sirsoft-ecommerce.brands.read 권한이 필요하며, BrandService::getAllBrands()가 검증된 필터를 받아 조회합니다. is_active·search로 필터링하고 sort(name_asc/desc, created_asc/desc) 또는 sort_by+sort_order 조합으로 정렬하며, locale로 표시 언어를 지정할 수 있습니다. 각 항목에는 products_count 집계와 현재 사용자의 abilities 맵이 포함됩니다.

POST /api/modules/sirsoft-ecommerce/admin/brands

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

요청 파라미터

이름 위치 타입 필수 허용값 용도
name body array 예 — 대상의 이름/명칭
slug body string 예 max 200 URL 친화 식별자 (slug)
website body string 아니오 max 500 브랜드 공식 웹사이트 URL
sort_order body integer 아니오 min 0 표시 정렬 순서 값 (작을수록 우선)
is_active body boolean 아니오 — 활성 여부 (true 활성 / false 비활성)

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

요청 예시

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

{
    "name": [
        "예시 이름"
    ],
    "slug": "example-key",
    "website": "예시값",
    "sort_order": 1,
    "is_active": true
}

응답 필드 (data 내부)

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

필드 타입 실측 예시값 용도/설명
id integer 1 생성된 브랜드의 기본 키 (내부 식별자)
name object {"ko":"API 문서 샘플 브랜드","en":"API Doc Sample Brand"} 브랜드 이름 (로케일별 값 객체)
localized_name string API 문서 샘플 브랜드 name 의 현재 로케일 해석 값 (표시용 문자열)
slug string apidoc-sample-brand URL 친화 식별자 (slug)
url string apidoc-sample-brand SortableMenuItem 표시용 URL (slug 값을 그대로 노출)
website string | null null 브랜드 공식 웹사이트 URL (미입력 시 null)
sort_order integer 0 표시 정렬 순서 값 (작을수록 우선)
is_active boolean true 활성 여부
icon string tag SortableMenuList 컴포넌트용 아이콘 식별자 (고정값 tag)
created_at string 2026-07-08 10:44:49 생성 일시 (사용자 타임존 기준 문자열)
updated_at string 2026-07-08 10:44:49 최종 수정 일시 (사용자 타임존 기준 문자열)
products_count integer 0 브랜드에 연결된 상품 수 (생성 직후이므로 0)
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵

생성 직후에는 creator/updater 관계가 로드되지 않으므로(whenLoaded) 응답에서 생략됩니다.

응답 예시

HTTP/1.1 201
{
    "success": true,
    "message": "브랜드가 등록되었습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "API 문서 샘플 브랜드",
            "en": "API Doc Sample Brand"
        },
        "localized_name": "API 문서 샘플 브랜드",
        "slug": "apidoc-sample-brand",
        "url": "apidoc-sample-brand",
        "website": null,
        "sort_order": 0,
        "is_active": true,
        "icon": "tag",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 10:44:49",
        "products_count": 0,
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

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

설명 새 브랜드를 생성합니다. auth:sanctum + sirsoft-ecommerce.brands.create 권한이 필요하며, BrandService::createBrand()가 트랜잭션 내에서 저장하고 생성자/수정자(created_by/updated_by)를 현재 사용자로 기록한 뒤 BrandResource를 201로 반환합니다. name(다국어 배열)과 slug가 필수이며 website·sort_order·is_active는 선택입니다. sirsoft-ecommerce.brand.create_validation_rules 필터로 확장이 검증 규칙을 추가할 수 있습니다.

DELETE /api/modules/sirsoft-ecommerce/admin/brands/{brand}

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

요청 파라미터

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

요청 예시

DELETE /api/modules/sirsoft-ecommerce/admin/brands/{brand} HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}

응답 필드 (data 내부)

단건 응답: 삭제 결과 요약 (BrandService::deleteBrand() 가 반환한 배열 — Resource 로 감싸지 않는다).

필드 타입 실측 예시값 용도/설명
brand_id integer 1 삭제된 브랜드의 ID
products_count integer 0 삭제 시점의 연결 상품 수. 항상 0 이다 — 연결 상품이 하나라도 있으면 삭제 자체가 차단되므로 성공 응답에서는 0 외의 값이 나올 수 없다

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "브랜드가 삭제되었습니다.",
    "data": {
        "brand_id": 1,
        "products_count": 0
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.brands.delete)이 없거나, 대상 브랜드가 요청자의 스코프 밖인 경우 (auth.scope_denied)
400 Bad Request 해당 id 의 브랜드가 없는 경우(exceptions.brand_not_found), 연결된 상품이 있어 삭제가 차단된 경우(exceptions.brand_has_products — 상품 수 포함), 또는 삭제 처리 중 도메인 규칙 위반
404 Not Found path 파라미터 형식이 라우트에 매칭되지 않는 경우

설명 브랜드 1건을 삭제합니다. auth:sanctum + sirsoft-ecommerce.brands.delete 권한이 필요하며, BrandService::deleteBrand()가 삭제 전 연결된 상품 수를 확인합니다. 연결된 상품이 1개 이상이면 예외가 발생해 삭제가 차단되고 400 오류가 반환되므로, 해당 브랜드의 상품을 먼저 정리하거나 다른 브랜드로 이전해야 삭제할 수 있습니다. 존재하지 않는 ID 는 400(brand_not_found)을 반환하고, 존재하지만 요청자의 스코프 밖인 대상은 403(auth.scope_denied)을 반환합니다.

PUT /api/modules/sirsoft-ecommerce/admin/brands/{brand}

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

요청 파라미터

이름 위치 타입 필수 허용값 용도
brand path string 예 — 대상 brand의 식별자
name body array 예 — 대상의 이름/명칭
slug body string 아니오 — URL 친화 식별자 (slug)
website body string 아니오 max 500 브랜드 공식 웹사이트 URL
sort_order body integer 아니오 min 0 표시 정렬 순서 값 (작을수록 우선)
is_active body boolean 아니오 — 활성 여부 (true 활성 / false 비활성)

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

요청 예시

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

{
    "name": [
        "예시 이름"
    ],
    "slug": "example-key",
    "website": "예시값",
    "sort_order": 1,
    "is_active": true
}

응답 필드 (data 내부)

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

필드 타입 실측 예시값 용도/설명
id integer 1 수정된 브랜드의 기본 키 (내부 식별자)
name object {"ko":"API 문서 샘플 브랜드","en":"API Doc Sample Brand"} 브랜드 이름 (로케일별 값 객체)
localized_name string API 문서 샘플 브랜드 name 의 현재 로케일 해석 값 (표시용 문자열)
slug string apidoc-sample-brand URL 친화 식별자 (slug)
url string apidoc-sample-brand SortableMenuItem 표시용 URL (slug 값을 그대로 노출)
website string | null https://www.asus.com 브랜드 공식 웹사이트 URL (미입력 시 null)
sort_order integer 0 표시 정렬 순서 값 (작을수록 우선)
is_active boolean true 활성 여부
icon string tag SortableMenuList 컴포넌트용 아이콘 식별자 (고정값 tag)
created_at string 2026-07-08 10:44:49 생성 일시 (사용자 타임존 기준 문자열)
updated_at string 2026-07-08 15:00:16 최종 수정 일시 (이번 수정 시각으로 갱신)
products_count integer 0 브랜드에 연결된 상품 수
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵

수정 직후에는 creator/updater 관계가 로드되지 않으므로(whenLoaded) 응답에서 생략됩니다.

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "브랜드가 수정되었습니다.",
    "data": {
        "id": 1,
        "name": {
            "ko": "API 문서 샘플 브랜드",
            "en": "API Doc Sample Brand"
        },
        "localized_name": "API 문서 샘플 브랜드",
        "slug": "apidoc-sample-brand",
        "url": "apidoc-sample-brand",
        "website": "https://www.asus.com",
        "sort_order": 0,
        "is_active": true,
        "icon": "tag",
        "created_at": "2026-07-08 10:44:49",
        "updated_at": "2026-07-08 15:00:16",
        "products_count": 0,
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.brands.update)이 없거나, 대상 브랜드가 요청자의 스코프 밖인 경우 (auth.scope_denied)
400 Bad Request 해당 brand 의 브랜드가 없는 경우(exceptions.brand_not_found) 또는 수정 처리 중 도메인 규칙 위반
422 Unprocessable Entity 요청 파라미터가 검증 규칙을 위반한 경우 (error.errors 에 필드별 메시지)

설명 기존 브랜드(path의 brand)를 수정합니다. auth:sanctum + sirsoft-ecommerce.brands.update 권한이 필요하며, BrandService::updateBrand()가 검증된 데이터로 갱신한 뒤 BrandResource를 반환합니다. name은 필수이고 slug·website·sort_order·is_active는 선택입니다. 존재하지 않는 ID 는 400(brand_not_found), 스코프 밖 대상은 403(auth.scope_denied)을 반환하며, sirsoft-ecommerce.brand.update_validation_rules 필터로 확장이 검증 규칙을 추가할 수 있습니다.

GET /api/modules/sirsoft-ecommerce/admin/brands/{id}

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

요청 파라미터

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

요청 예시

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

응답 필드 (data 내부)

단건 응답: data 가 브랜드 하나 (BrandResource). 필드 구성은 목록 응답의 data.data[] 항목과 동일하되, 목록 전용 순번(number)은 없다.

필드 타입 실측 예시값 용도/설명
id integer 20 기본 키 (내부 식별자)
name object {"ko":"ASUS","en":"ASUS"} 다국어 원본 이름 (로케일 키 → 값)
localized_name string ASUS name 의 현재 로케일 해석 값
slug string asus URL 친화 식별자
url string asus SortableMenuItem 표시용 URL (slug 값을 그대로 노출)
website string | null https://www.asus.com 브랜드 공식 웹사이트 URL
sort_order integer 20 표시 정렬 순서 값 (작을수록 우선)
is_active boolean true 사용 여부
icon string tag 아이콘 식별자 (Resource 가 고정값으로 부여)
created_at string 2026-07-30 23:35:46 생성 일시
updated_at string 2026-07-30 23:35:46 최종 수정 일시
creator object | array [] 생성자 정보 (id/name) — 관계가 로드된 경우에만 포함
updater object | array [] 수정자 정보 (id/name) — 관계가 로드된 경우에만 포함
products_count integer 1 이 브랜드에 속한 상품 수 (집계)
abilities object {"can_create":true,"can_update":true,"can_delete":true} 현재 사용자가 이 리소스에 수행 가능한 작업 불리언 맵

응답 예시

HTTP/1.1 200
{
    "success": true,
    "message": "브랜드를 조회했습니다.",
    "data": {
        "id": 20,
        "name": {
            "ko": "ASUS",
            "en": "ASUS"
        },
        "localized_name": "ASUS",
        "slug": "asus",
        "url": "asus",
        "website": "https://www.asus.com",
        "sort_order": 20,
        "is_active": true,
        "icon": "tag",
        "created_at": "2026-07-30 23:35:46",
        "updated_at": "2026-07-30 23:35:46",
        "creator": [],
        "updater": [],
        "products_count": 1,
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.brands.read)이 없는 경우
404 Not Found 해당 id 의 브랜드가 없는 경우 (messages.brands.not_found)

설명 브랜드 1건의 상세 정보를 조회합니다. auth:sanctum + sirsoft-ecommerce.brands.read 권한이 필요하며, path의 id로 BrandService::getBrand()를 호출해 단건을 BrandResource로 반환합니다. 응답에는 다국어 이름, 로컬라이즈된 이름(localized_name), website, products_count 집계, 현재 사용자의 abilities 맵이 포함됩니다. 대상 브랜드가 없으면 404를 반환합니다.

PATCH /api/modules/sirsoft-ecommerce/admin/brands/{id}/toggle-status

  • 라우트명: api.modules.sirsoft-ecommerce.admin.brands.toggle-status
  • 컨트롤러: Modules\Sirsoft\Ecommerce\Http\Controllers\Admin\BrandController@toggleStatus
  • 인증/권한: auth:sanctum + permission:sirsoft-ecommerce.brands.update

요청 파라미터

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

요청 예시

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

응답 필드 (data 내부)

단건 응답: data 가 토글된 브랜드 (BrandResource). 필드 구성은 상세 조회와 동일하며, 실질적으로 달라지는 것은 is_active 와 updated_at 이다.

필드 타입 실측 예시값 용도/설명
id integer 20 브랜드 기본키
is_active boolean false 토글 후 의 사용 여부. 화면은 이 값으로 스위치 상태를 갱신한다
updated_at string 2026-08-16 01:30:00 토글 시각으로 갱신된 수정 일시
(그 외) — — name·localized_name·slug·url·website·sort_order·icon·created_at·creator·updater·products_count·abilities — 상세 조회 응답과 동일

message 는 활성/비활성 구분 없이 messages.brands.status_changed 하나다. 현재 상태는 data.is_active 로 판정한다.

응답 예시

비활성으로 토글된 경우:

HTTP/1.1 200
{
    "success": true,
    "message": "브랜드 상태가 변경되었습니다.",
    "data": {
        "id": 20,
        "name": {
            "ko": "ASUS",
            "en": "ASUS"
        },
        "localized_name": "ASUS",
        "slug": "asus",
        "url": "asus",
        "website": "https://www.asus.com",
        "sort_order": 20,
        "is_active": false,
        "icon": "tag",
        "created_at": "2026-07-30 23:35:46",
        "updated_at": "2026-08-16 01:30:00",
        "creator": [],
        "updater": [],
        "products_count": 1,
        "abilities": {
            "can_create": true,
            "can_update": true,
            "can_delete": true
        }
    }
}

에러 응답

상태코드 의미 발생 조건
401 Unauthenticated 유효한 Bearer 토큰이 없거나 만료된 경우
403 Forbidden 요구 권한(sirsoft-ecommerce.brands.update)이 없거나, 대상 브랜드가 요청자의 스코프 밖인 경우 (auth.scope_denied)
400 Bad Request 해당 id 의 브랜드가 없는 경우(exceptions.brand_not_found) 또는 토글 처리 중 도메인 규칙 위반
404 Not Found path 파라미터 형식이 라우트에 매칭되지 않는 경우

설명 브랜드의 활성 상태를 토글합니다. auth:sanctum + sirsoft-ecommerce.brands.update 권한이 필요하며, path의 id로 BrandService::toggleStatus()를 호출해 트랜잭션 내에서 현재 is_active 값을 반전시킨 뒤 갱신된 BrandResource를 반환합니다. 관리자 목록에서 브랜드 노출/비노출을 빠르게 전환할 때 사용하며, 대상이 없거나 처리 중 예외가 발생하면 404 또는 400을 반환합니다.