> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Consent Preview

> Resolve a typed user_code to the requested capability shape.

Returns 404 for unknown / expired / non-pending codes — no
differentiation, since the consent page renders the same UI
regardless. Successful resolution does NOT mark the code as
'seen' or 'visited'; the customer can refresh the page freely.



## OpenAPI

````yaml /api-reference/openapi.json get /api/storefront/customer/me/agent-consent/{user_code}
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/storefront/customer/me/agent-consent/{user_code}:
    get:
      tags:
        - Storefront
        - Storefront Agent Consent
      summary: Get Consent Preview
      description: |-
        Resolve a typed user_code to the requested capability shape.

        Returns 404 for unknown / expired / non-pending codes — no
        differentiation, since the consent page renders the same UI
        regardless. Successful resolution does NOT mark the code as
        'seen' or 'visited'; the customer can refresh the page freely.
      operationId: >-
        get_consent_preview_api_storefront_customer_me_agent_consent__user_code__get
      parameters:
        - name: user_code
          in: path
          required: true
          schema:
            type: string
            title: User Code
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-Site-ID
          in: header
          required: true
          schema:
            type: string
            title: X-Site-Id
        - name: X-Stella-Token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Stella-Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConsentPreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentConsentPreviewResponse:
      properties:
        code_id:
          type: string
          format: uuid
          title: Code Id
        agent_name:
          type: string
          title: Agent Name
        requested_scopes:
          items:
            type: string
          type: array
          title: Requested Scopes
        requested_budget_cents:
          type: integer
          title: Requested Budget Cents
        requested_allowed_categories:
          items:
            type: string
          type: array
          title: Requested Allowed Categories
        requested_token_ttl_seconds:
          type: integer
          title: Requested Token Ttl Seconds
        expires_at:
          type: string
          format: date-time
          title: Expires At
        status:
          type: string
          title: Status
      type: object
      required:
        - code_id
        - agent_name
        - requested_scopes
        - requested_budget_cents
        - requested_allowed_categories
        - requested_token_ttl_seconds
        - expires_at
        - status
      title: AgentConsentPreviewResponse
      description: |-
        The shape the customer's consent-page UI renders before they
        decide. Contains everything an agent asked for; nothing secret.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````