Skip to content
Open
618 changes: 586 additions & 32 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ paths:
$ref: './brands-v2-api.yaml#/v2-brands-for-org'
/v2/orgs/{spaceCatId}/brands/{brandId}:
$ref: './brands-v2-api.yaml#/v2-brand-for-org'
/v2/orgs/{spaceCatId}/brands/{brandId}/activate:
$ref: './brands-v2-api.yaml#/v2-brand-for-org-activate'
/v2/orgs/{spaceCatId}/brands/{brandId}/status:
$ref: './brands-v2-api.yaml#/v2-brand-status-for-org'
/v2/orgs/{spaceCatId}/sites/{siteId}/brand:
Expand Down
70 changes: 70 additions & 0 deletions docs/openapi/brands-v2-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,76 @@ v2-brand-for-org:
'503':
description: PostgREST unavailable (DATA_SERVICE_PROVIDER=postgres required)

v2-brand-for-org-activate:
parameters:
- name: spaceCatId
in: path
required: true
description: SpaceCat Organization ID (UUID)
schema:
type: string
format: uuid
example: 'a1b2c3d4-5678-90ab-cdef-1234567890ab'
- name: brandId
in: path
required: true
description: Brand ID (UUID)
schema:
type: string
format: uuid
post:
tags:
- brands
- customer-config
summary: Activate a brand (v2)
description: |
Explicit, customer-triggered "activate brand". Promotes an existing
`pending` brand to `active` by setting its `baseSiteId` (from the brand's
onboarded primary site) and flipping `status` to `active`. Optionally
generates AI prompts for the brand and ensures a brand-presence schedule
exists for the brand's primary site.

Activation requires the brand to already have an onboarded primary site —
a request against a brand with no onboarded primary site returns 400.

Set `generatePrompts` to `true` to trigger asynchronous AI prompt
generation; the response then includes a `promptGenerationJobId`. When a
brand-presence schedule is created or ensured, the response includes a
`scheduleId`.
operationId: activateBrandForOrg
security:
- ims_key: []
- api_key: []
requestBody:
required: true
content:
application/json:
schema:
$ref: './schemas.yaml#/V2BrandActivateInput'
responses:
'200':
description: Brand activated successfully
content:
application/json:
schema:
$ref: './schemas.yaml#/V2BrandActivateResponse'
'400':
description: Brand has no onboarded primary site
'403':
description: |
User is not a member of the organization, or the organization is not on a
PAID tier.
'404':
description: Organization or brand not found
'409':
description: |
The brand's primary URL is already the primary URL (base site) of
another brand in this organization.
'500':
$ref: './responses.yaml#/500'
'503':
description: PostgREST unavailable (DATA_SERVICE_PROVIDER=postgres required)

v2-brand-status-for-org:
parameters:
- name: spaceCatId
Expand Down
58 changes: 58 additions & 0 deletions docs/openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7877,6 +7877,64 @@ V2BrandListResponse:
items:
$ref: '#/V2Brand'

V2BrandActivateInput:
type: object
description: |
Request body for activating a brand. Promotes an existing pending brand to
active (sets baseSiteId from the brand's onboarded primary site and flips
status to active), optionally generates AI prompts, and ensures a
brand-presence schedule.
required:
- generatePrompts
properties:
generatePrompts:
type: boolean
description: |
When `true`, asynchronous AI prompt generation is triggered for the
brand and the response includes a `promptGenerationJobId`.
example:
generatePrompts: true

V2BrandActivateResponse:
type: object
description: |
Result of activating a brand: the brand is now active with its base site
resolved. Includes a `promptGenerationJobId` when prompt generation was
triggered and a `scheduleId` when a brand-presence schedule was ensured.
required:
- brandId
- status
- baseSiteId
properties:
brandId:
type: string
format: uuid
description: Brand UUID
status:
type: string
enum: [active]
description: Brand status after activation (always `active`)
baseSiteId:
type: string
format: uuid
description: ID of the brand's onboarded primary site, now set as its base site
promptGenerationJobId:
type: string
description: |
Identifier of the asynchronous AI prompt-generation job. Present only
when `generatePrompts` was `true`.
scheduleId:
type: string
description: |
Identifier of the brand-presence schedule that was created or ensured.
Present only when a schedule was created or already existed.
example:
brandId: 'a1b2c3d4-5678-90ab-cdef-1234567890ab'
status: 'active'
baseSiteId: 'b2c3d4e5-6789-01ab-cdef-2345678901ab'
promptGenerationJobId: 'c3d4e5f6-7890-12ab-cdef-3456789012ab'
scheduleId: 'd4e5f6a7-8901-23ab-cdef-4567890123ab'

V2Category:
type: object
description: A category in the normalized categories table
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@adobe/spacecat-shared-cloudflare-client": "1.1.1",
"@adobe/spacecat-shared-content-client": "1.8.24",
"@adobe/spacecat-shared-data-access": "3.79.0",
"@adobe/spacecat-shared-drs-client": "1.12.1",
"@adobe/spacecat-shared-drs-client": "1.13.0",
"@adobe/spacecat-shared-gpt-client": "1.6.23",
"@adobe/spacecat-shared-http-utils": "1.31.0",
"@adobe/spacecat-shared-ims-client": "1.12.7",
Expand Down
Loading
Loading