openapi: 3.1.0
info:
  title: Urza's Wallet API
  version: 1.0.0
paths:
  /api/v1/admin/articles:
    get:
      tags:
      - Admin — Articles
      summary: List Articles Admin
      operationId: list_articles_admin_api_v1_admin_articles_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Articles
      summary: Create Article
      operationId: create_article_api_v1_admin_articles_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArticleCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/articles/{article_id}:
    patch:
      tags:
      - Admin — Articles
      summary: Update Article
      operationId: update_article_api_v1_admin_articles__article_id__patch
      parameters:
      - name: article_id
        in: path
        required: true
        schema:
          type: string
          title: Article Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArticleUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/articles/{article_id}/status:
    patch:
      tags:
      - Admin — Articles
      summary: Update Article Status
      operationId: update_article_status_api_v1_admin_articles__article_id__status_patch
      parameters:
      - name: article_id
        in: path
        required: true
        schema:
          type: string
          title: Article Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArticleStatusBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/clusters:
    get:
      tags:
      - Admin — Guides
      summary: List Clusters Admin
      operationId: list_clusters_admin_api_v1_admin_guides_clusters_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Guides
      summary: Create Cluster Not Implemented
      description: Creating clusters requires a DDL migration — not available at runtime.
      operationId: create_cluster_not_implemented_api_v1_admin_guides_clusters_post
      responses:
        '501':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/admin/guides/clusters/{cluster_id}:
    put:
      tags:
      - Admin — Guides
      summary: Update Cluster
      operationId: update_cluster_api_v1_admin_guides_clusters__cluster_id__put
      parameters:
      - name: cluster_id
        in: path
        required: true
        schema:
          type: string
          title: Cluster Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/clusters/{cluster_id}/deactivate:
    post:
      tags:
      - Admin — Guides
      summary: Deactivate Cluster Not Implemented
      description: guide_clusters has no is_active column — deactivation is not implementable.
      operationId: deactivate_cluster_not_implemented_api_v1_admin_guides_clusters__cluster_id__deactivate_post
      parameters:
      - name: cluster_id
        in: path
        required: true
        schema:
          type: string
          title: Cluster Id
      responses:
        '501':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides:
    get:
      tags:
      - Admin — Guides
      summary: List Guides Admin
      operationId: list_guides_admin_api_v1_admin_guides_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Guides
      summary: Create Guide
      operationId: create_guide_api_v1_admin_guides_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuideCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/{guide_id}:
    patch:
      tags:
      - Admin — Guides
      summary: Update Guide
      operationId: update_guide_api_v1_admin_guides__guide_id__patch
      parameters:
      - name: guide_id
        in: path
        required: true
        schema:
          type: string
          title: Guide Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuideUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/{guide_id}/status:
    patch:
      tags:
      - Admin — Guides
      summary: Update Guide Status
      operationId: update_guide_status_api_v1_admin_guides__guide_id__status_patch
      parameters:
      - name: guide_id
        in: path
        required: true
        schema:
          type: string
          title: Guide Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuideStatusBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/journeys:
    get:
      tags:
      - Admin — Guides
      summary: List Journeys Admin
      operationId: list_journeys_admin_api_v1_admin_guides_journeys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Guides
      summary: Create Journey
      operationId: create_journey_api_v1_admin_guides_journeys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JourneyCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/journeys/{journey_id}:
    get:
      tags:
      - Admin — Guides
      summary: Get Journey Admin
      operationId: get_journey_admin_api_v1_admin_guides_journeys__journey_id__get
      parameters:
      - name: journey_id
        in: path
        required: true
        schema:
          type: string
          title: Journey Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Admin — Guides
      summary: Update Journey
      operationId: update_journey_api_v1_admin_guides_journeys__journey_id__patch
      parameters:
      - name: journey_id
        in: path
        required: true
        schema:
          type: string
          title: Journey Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JourneyUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Admin — Guides
      summary: Delete Journey
      operationId: delete_journey_api_v1_admin_guides_journeys__journey_id__delete
      parameters:
      - name: journey_id
        in: path
        required: true
        schema:
          type: string
          title: Journey Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/guides/journeys/{journey_id}/steps:
    put:
      tags:
      - Admin — Guides
      summary: Replace Journey Steps
      operationId: replace_journey_steps_api_v1_admin_guides_journeys__journey_id__steps_put
      parameters:
      - name: journey_id
        in: path
        required: true
        schema:
          type: string
          title: Journey Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/JourneyStepEntry'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/issuers:
    get:
      tags:
      - Admin — Issuers
      summary: List Issuers
      operationId: list_issuers_api_v1_admin_issuers_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Issuers
      summary: Create Issuer
      operationId: create_issuer_api_v1_admin_issuers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssuerCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/issuers/{issuer_id}:
    get:
      tags:
      - Admin — Issuers
      summary: Get Issuer
      operationId: get_issuer_api_v1_admin_issuers__issuer_id__get
      parameters:
      - name: issuer_id
        in: path
        required: true
        schema:
          type: string
          title: Issuer Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Admin — Issuers
      summary: Update Issuer
      operationId: update_issuer_api_v1_admin_issuers__issuer_id__patch
      parameters:
      - name: issuer_id
        in: path
        required: true
        schema:
          type: string
          title: Issuer Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssuerUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/issuers/{issuer_id}/deactivate:
    post:
      tags:
      - Admin — Issuers
      summary: Deactivate Issuer
      operationId: deactivate_issuer_api_v1_admin_issuers__issuer_id__deactivate_post
      parameters:
      - name: issuer_id
        in: path
        required: true
        schema:
          type: string
          title: Issuer Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/offers:
    get:
      tags:
      - Admin — Offers
      summary: List Offers Admin
      operationId: list_offers_admin_api_v1_admin_offers_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Offers
      summary: Create Offer
      operationId: create_offer_api_v1_admin_offers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfferCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/offers/{offer_id}:
    patch:
      tags:
      - Admin — Offers
      summary: Update Offer
      operationId: update_offer_api_v1_admin_offers__offer_id__patch
      parameters:
      - name: offer_id
        in: path
        required: true
        schema:
          type: string
          title: Offer Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfferUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/offers/{offer_id}/deactivate:
    post:
      tags:
      - Admin — Offers
      summary: Deactivate Offer
      operationId: deactivate_offer_api_v1_admin_offers__offer_id__deactivate_post
      parameters:
      - name: offer_id
        in: path
        required: true
        schema:
          type: string
          title: Offer Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/products/tarjetas:
    get:
      tags:
      - Admin — Products
      summary: List Credit Cards
      operationId: list_credit_cards_api_v1_admin_products_tarjetas_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Admin — Products
      summary: Create Credit Card
      operationId: create_credit_card_api_v1_admin_products_tarjetas_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCardCreateBody'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/products/tarjetas/{product_id}:
    get:
      tags:
      - Admin — Products
      summary: Get Credit Card
      operationId: get_credit_card_api_v1_admin_products_tarjetas__product_id__get
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Admin — Products
      summary: Update Credit Card
      operationId: update_credit_card_api_v1_admin_products_tarjetas__product_id__patch
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCardUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/products/tarjetas/{product_id}/status:
    patch:
      tags:
      - Admin — Products
      summary: Update Product Status
      operationId: update_product_status_api_v1_admin_products_tarjetas__product_id__status_patch
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatusUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/products/tarjetas/{product_id}/review:
    get:
      tags:
      - Admin — Reviews
      summary: Get Review For Admin
      operationId: get_review_for_admin_api_v1_admin_products_tarjetas__product_id__review_get
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Admin — Reviews
      summary: Upsert Review
      operationId: upsert_review_api_v1_admin_products_tarjetas__product_id__review_post
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewUpsertBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Admin — Reviews
      summary: Update Review
      operationId: update_review_api_v1_admin_products_tarjetas__product_id__review_patch
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/products/tarjetas/{product_id}/review/status:
    patch:
      tags:
      - Admin — Reviews
      summary: Update Review Status
      operationId: update_review_status_api_v1_admin_products_tarjetas__product_id__review_status_patch
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          title: Product Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewStatusBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/products/{vertical}/issuers:
    get:
      tags:
      - Products
      summary: List Issuers
      operationId: list_issuers_api_v1_products__vertical__issuers_get
      parameters:
      - name: vertical
        in: path
        required: true
        schema:
          type: string
          title: Vertical
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuerListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/products/{vertical}/{id}:
    get:
      tags:
      - Products
      summary: Get Product
      operationId: get_product_api_v1_products__vertical___id__get
      parameters:
      - name: vertical
        in: path
        required: true
        schema:
          type: string
          title: Vertical
      - name: id
        in: path
        required: true
        schema:
          type: string
          title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Get Product Api V1 Products  Vertical   Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/products/{vertical}:
    get:
      tags:
      - Products
      summary: List Products
      operationId: list_products_api_v1_products__vertical__get
      parameters:
      - name: vertical
        in: path
        required: true
        schema:
          type: string
          title: Vertical
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Limit
      - name: issuer
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          title: Issuer
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - name: currency
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Currency
      - name: max_fee_crc
        in: query
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Fee Crc
      - name: network
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          title: Network
      - name: reward_type
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          title: Reward Type
      - name: has_travel_benefits
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Travel Benefits
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            maxLength: 80
          - type: 'null'
          title: Q
      - name: fund_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Fund Type
      - name: rate_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Rate Type
      - name: sort
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sort
      - name: sort_dir
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sort Dir
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/compare:
    post:
      tags:
      - Comparisons
      summary: Compare Products
      operationId: compare_products_api_v1_compare_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompareBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/documents:
    get:
      tags:
      - Documents
      summary: List Documents
      operationId: list_documents_api_v1_documents_get
      parameters:
      - name: vertical
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Vertical
      - name: issuer_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Issuer Id
      - name: document_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Document Type
      - name: access_level
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Access Level
      - name: is_current_version
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Current Version
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Documents
      summary: Create Document
      description: Upload a new document. Requires editor role (Clerk auth — stubbed
        401).
      operationId: create_document_api_v1_documents_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/documents/{document_id}:
    get:
      tags:
      - Documents
      summary: Get Document
      operationId: get_document_api_v1_documents__document_id__get
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/documents/{document_id}/download:
    get:
      tags:
      - Documents
      summary: Download Document
      operationId: download_document_api_v1_documents__document_id__download_get
      parameters:
      - name: document_id
        in: path
        required: true
        schema:
          type: string
          title: Document Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/comparisons:
    get:
      tags:
      - Saved Comparisons
      summary: List Saved Comparisons
      operationId: list_saved_comparisons_api_v1_comparisons_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Saved Comparisons
      summary: Save Comparison
      operationId: save_comparison_api_v1_comparisons_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/comparisons/{comparison_id}:
    delete:
      tags:
      - Saved Comparisons
      summary: Delete Saved Comparison
      operationId: delete_saved_comparison_api_v1_comparisons__comparison_id__delete
      parameters:
      - name: comparison_id
        in: path
        required: true
        schema:
          type: string
          title: Comparison Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/users/profile:
    get:
      tags:
      - Users
      summary: Get Profile
      operationId: get_profile_api_v1_users_profile_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    patch:
      tags:
      - Users
      summary: Patch Profile
      operationId: patch_profile_api_v1_users_profile_patch
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/users/export:
    get:
      tags:
      - Users
      summary: Export Data
      operationId: export_data_api_v1_users_export_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/users/account:
    delete:
      tags:
      - Users
      summary: Delete Account
      operationId: delete_account_api_v1_users_account_delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/alerts:
    get:
      tags:
      - Alerts
      summary: List Alerts
      operationId: list_alerts_api_v1_alerts_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
    post:
      tags:
      - Alerts
      summary: Create Alert
      operationId: create_alert_api_v1_alerts_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/alerts/{alert_id}:
    delete:
      tags:
      - Alerts
      summary: Delete Alert
      operationId: delete_alert_api_v1_alerts__alert_id__delete
      parameters:
      - name: alert_id
        in: path
        required: true
        schema:
          type: string
          title: Alert Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/fx/bcr:
    get:
      tags:
      - FX
      summary: Get Bcr Rate
      description: 'Return the platform BCR reference exchange rate (CRC per USD).


        Used by the FEAT-007 calculator''s cross-currency annotation only.

        Sourced from BCR (Banco Central de Costa Rica). For v1 the rate is

        a static constant; a daily rate-sync job replaces it in a follow-up.'
      operationId: get_bcr_rate_api_v1_fx_bcr_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BcrRateOut'
  /api/v1/articles:
    get:
      tags:
      - Articles
      summary: List Articles
      operationId: list_articles_api_v1_articles_get
      parameters:
      - name: vertical
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/VerticalSlug'
      - name: tag
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/ArticleTag'
          - type: 'null'
          title: Tag
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 12
          title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticleListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/articles/latest:
    get:
      tags:
      - Articles
      summary: List Latest Articles
      operationId: list_latest_articles_api_v1_articles_latest_get
      parameters:
      - name: vertical
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/VerticalSlug'
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 5
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/articles/for-product/{product_id}:
    get:
      tags:
      - Articles
      summary: List Articles For Product
      operationId: list_articles_for_product_api_v1_articles_for_product__product_id__get
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Product Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 5
          minimum: 1
          default: 3
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/articles/{vertical}/{slug}:
    get:
      tags:
      - Articles
      summary: Get Article By Slug
      operationId: get_article_by_slug_api_v1_articles__vertical___slug__get
      parameters:
      - name: vertical
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/VerticalSlug'
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/guides/clusters:
    get:
      tags:
      - Guides
      summary: List Clusters
      operationId: list_clusters_api_v1_guides_clusters_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/guides/journeys:
    get:
      tags:
      - Guides
      summary: List Journeys
      operationId: list_journeys_api_v1_guides_journeys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/guides/journeys/{slug}:
    get:
      tags:
      - Guides
      summary: Get Journey By Slug
      operationId: get_journey_by_slug_api_v1_guides_journeys__slug__get
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/guides:
    get:
      tags:
      - Guides
      summary: List Guides
      operationId: list_guides_api_v1_guides_get
      parameters:
      - name: cluster
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/GuideClusterId'
          - type: 'null'
          title: Cluster
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/guides/{slug}:
    get:
      tags:
      - Guides
      summary: Get Guide By Slug
      operationId: get_guide_by_slug_api_v1_guides__slug__get
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/offers/{product_id}:
    get:
      tags:
      - Offers
      summary: Get Offer For Product
      operationId: get_offer_for_product_api_v1_offers__product_id__get
      parameters:
      - name: product_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Product Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/cta-events:
    post:
      tags:
      - Offers
      summary: Post Cta Event
      operationId: post_cta_event_api_v1_cta_events_post
      parameters:
      - name: urza_session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Urza Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CtaEventSubmitPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/leads:
    post:
      tags:
      - Leads
      summary: Submit Lead
      description: 'Persist the lead + consent record. PII safety: nothing about

        payload.name / payload.email is ever logged.'
      operationId: submit_lead_api_v1_leads_post
      parameters:
      - name: urza_session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Urza Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadSubmissionPayload'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/leads/deletion-request:
    post:
      tags:
      - Leads
      summary: Submit Deletion Request
      description: 'Anti-enumeration: response is always 202 with the same generic

        message regardless of whether the email matches any lead. Email

        shape validation (the 400/422 path) is handled by Pydantic — only

        a syntactically-bad email returns an error to the submitter.'
      operationId: submit_deletion_request_api_v1_leads_deletion_request_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletionRequestPayload'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/leads:
    get:
      tags:
      - Leads
      summary: Admin List Leads
      operationId: admin_list_leads_api_v1_admin_leads_get
      parameters:
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/LeadStatus'
          - type: 'null'
          title: Status
      - name: vertical
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Vertical
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 1
          title: Page
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          default: 20
          title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/leads/{lead_id}:
    get:
      tags:
      - Leads
      summary: Admin Get Lead
      operationId: admin_get_lead_api_v1_admin_leads__lead_id__get
      parameters:
      - name: lead_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Lead Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Leads
      summary: Admin Patch Lead
      operationId: admin_patch_lead_api_v1_admin_leads__lead_id__patch
      parameters:
      - name: lead_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Lead Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadPatchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/leads/{lead_id}/anonymize:
    post:
      tags:
      - Leads
      summary: Admin Anonymize Lead
      operationId: admin_anonymize_lead_api_v1_admin_leads__lead_id__anonymize_post
      parameters:
      - name: lead_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Lead Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/deletion-requests:
    get:
      tags:
      - Leads
      summary: Admin List Deletion Requests
      operationId: admin_list_deletion_requests_api_v1_admin_deletion_requests_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/admin/deletion-requests/{request_id}/process:
    post:
      tags:
      - Leads
      summary: Admin Process Deletion Request
      operationId: admin_process_deletion_request_api_v1_admin_deletion_requests__request_id__process_post
      parameters:
      - name: request_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Request Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /health:
    get:
      tags:
      - Health
      summary: ' Health Handler'
      operationId: _health_handler_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/health:
    get:
      tags:
      - Health
      summary: ' Health Handler'
      operationId: _health_handler_api_v1_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    Article:
      properties:
        id:
          type: string
          title: Id
        slug:
          type: string
          title: Slug
        vertical:
          $ref: '#/components/schemas/VerticalSlug'
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
        body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Body Md
        excerpt:
          anyOf:
          - type: string
          - type: 'null'
          title: Excerpt
        status:
          type: string
          title: Status
          default: published
        image_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Url
        author:
          type: string
          title: Author
        published_at:
          type: string
          title: Published At
        updated_at:
          type: string
          title: Updated At
        tags:
          items:
            $ref: '#/components/schemas/ArticleTag'
          type: array
          title: Tags
        related_product_ids:
          items:
            type: string
          type: array
          title: Related Product Ids
      type: object
      required:
      - id
      - slug
      - vertical
      - title
      - summary
      - author
      - published_at
      - updated_at
      title: Article
    ArticleCreateBody:
      properties:
        title:
          type: string
          title: Title
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        vertical:
          type: string
          title: Vertical
          default: tarjetas
        body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Body Md
        excerpt:
          anyOf:
          - type: string
          - type: 'null'
          title: Excerpt
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        image_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Url
        author:
          type: string
          title: Author
          default: Admin
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
        status:
          type: string
          title: Status
          default: draft
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        related_product_ids:
          items:
            type: string
          type: array
          title: Related Product Ids
          default: []
      type: object
      required:
      - title
      title: ArticleCreateBody
    ArticleListMeta:
      properties:
        total:
          type: integer
          minimum: 0.0
          title: Total
        page:
          type: integer
          minimum: 1.0
          title: Page
        page_size:
          type: integer
          minimum: 1.0
          title: Page Size
        total_pages:
          type: integer
          minimum: 0.0
          title: Total Pages
      type: object
      required:
      - total
      - page
      - page_size
      - total_pages
      title: ArticleListMeta
    ArticleListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Article'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/ArticleListMeta'
      type: object
      required:
      - data
      - meta
      title: ArticleListResponse
    ArticleStatusBody:
      properties:
        status:
          type: string
          title: Status
      type: object
      required:
      - status
      title: ArticleStatusBody
    ArticleTag:
      type: string
      enum:
      - promociones
      - guias
      - noticias
      - comparativas
      - tips
      title: ArticleTag
    ArticleUpdateBody:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Body Md
        excerpt:
          anyOf:
          - type: string
          - type: 'null'
          title: Excerpt
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        image_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Url
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        related_product_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Related Product Ids
      type: object
      title: ArticleUpdateBody
    BcrRateOut:
      properties:
        rate_crc_per_usd:
          type: number
          title: Rate Crc Per Usd
        effective_date:
          type: string
          title: Effective Date
      type: object
      required:
      - rate_crc_per_usd
      - effective_date
      title: BcrRateOut
    ClusterUpdateBody:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
      type: object
      title: ClusterUpdateBody
    CompareBody:
      properties:
        vertical:
          $ref: '#/components/schemas/VerticalSlug'
        ids:
          items:
            type: string
          type: array
          maxItems: 5
          minItems: 2
          title: Ids
      type: object
      required:
      - vertical
      - ids
      title: CompareBody
    CreditCardCreateBody:
      properties:
        product_name:
          type: string
          title: Product Name
        issuer_id:
          type: string
          title: Issuer Id
        network:
          type: string
          title: Network
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        annual_fee_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Annual Fee Crc
        annual_fee_waivable:
          type: boolean
          title: Annual Fee Waivable
          default: false
        interest_rate_annual_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Interest Rate Annual Pct
        min_income_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Income Crc
        reward_type:
          type: string
          title: Reward Type
          default: none
        cashback_rate_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Cashback Rate Pct
        currency:
          type: string
          title: Currency
          default: CRC
        benefits_summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Benefits Summary
        editorial_score:
          anyOf:
          - type: integer
          - type: 'null'
          title: Editorial Score
        editorial_summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Editorial Summary
      type: object
      required:
      - product_name
      - issuer_id
      - network
      title: CreditCardCreateBody
    CreditCardUpdateBody:
      properties:
        product_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Product Name
        issuer_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issuer Id
        network:
          anyOf:
          - type: string
          - type: 'null'
          title: Network
        annual_fee_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Annual Fee Crc
        annual_fee_waivable:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Annual Fee Waivable
        interest_rate_annual_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Interest Rate Annual Pct
        min_income_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Income Crc
        reward_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Reward Type
        cashback_rate_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Cashback Rate Pct
        currency:
          anyOf:
          - type: string
          - type: 'null'
          title: Currency
        benefits_summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Benefits Summary
        editorial_score:
          anyOf:
          - type: integer
          - type: 'null'
          title: Editorial Score
        editorial_summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Editorial Summary
      type: object
      title: CreditCardUpdateBody
    CtaEventSubmitPayload:
      properties:
        product_id:
          type: string
          format: uuid
          title: Product Id
        vertical:
          type: string
          title: Vertical
        source_surface:
          $ref: '#/components/schemas/CtaSourceSurface'
        event_type:
          $ref: '#/components/schemas/CtaEventType'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
      type: object
      required:
      - product_id
      - vertical
      - source_surface
      - event_type
      title: CtaEventSubmitPayload
    CtaEventType:
      type: string
      enum:
      - impression
      - click
      - form_open
      - form_open_failed
      title: CtaEventType
    CtaSourceSurface:
      type: string
      enum:
      - dashboard
      - catalogo
      - comparacion
      - detalle
      - finder
      - wizard
      - articulo
      - guia
      title: CtaSourceSurface
    DeletionRequestPayload:
      properties:
        email:
          type: string
          format: email
          title: Email
      type: object
      required:
      - email
      title: DeletionRequestPayload
      description: 'POST /api/v1/leads/deletion-request body — public, anonymous.


        Uses EmailStr so the validation matches the submission path''s

        (LeadSubmissionPayload.email). Anti-enumeration: the *response* is

        always 202 with the same generic message regardless of whether the

        email matches anything; only the 400 path (bad email shape) is

        affected by this stricter validation.'
    GuideClusterId:
      type: string
      enum:
      - empezando
      - eligiendo
      - usando
      - resolviendo-problemas
      title: GuideClusterId
    GuideCreateBody:
      properties:
        title:
          type: string
          title: Title
        cluster_id:
          type: string
          title: Cluster Id
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Body Md
        author:
          type: string
          title: Author
          default: Admin
        status:
          type: string
          title: Status
          default: draft
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
        order_in_cluster:
          type: integer
          title: Order In Cluster
          default: 0
      type: object
      required:
      - title
      - cluster_id
      title: GuideCreateBody
    GuideStatusBody:
      properties:
        status:
          type: string
          title: Status
      type: object
      required:
      - status
      title: GuideStatusBody
    GuideUpdateBody:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        cluster_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Cluster Id
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Body Md
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
        order_in_cluster:
          anyOf:
          - type: integer
          - type: 'null'
          title: Order In Cluster
      type: object
      title: GuideUpdateBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Issuer:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        short_name:
          type: string
          title: Short Name
        vertical:
          anyOf:
          - $ref: '#/components/schemas/VerticalSlug'
          - type: 'null'
        logo_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Logo Url
        website_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Website Url
      type: object
      required:
      - id
      - name
      - short_name
      title: Issuer
    IssuerCreateBody:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        short_name:
          type: string
          title: Short Name
        vertical:
          anyOf:
          - type: string
          - type: 'null'
          title: Vertical
        logo_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Logo Url
        website_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Website Url
      type: object
      required:
      - id
      - name
      - short_name
      title: IssuerCreateBody
    IssuerListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Issuer'
          type: array
          title: Data
      type: object
      required:
      - data
      title: IssuerListResponse
    IssuerUpdateBody:
      properties:
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        short_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Short Name
        vertical:
          anyOf:
          - type: string
          - type: 'null'
          title: Vertical
        logo_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Logo Url
        website_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Website Url
        is_active:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Active
      type: object
      title: IssuerUpdateBody
    JourneyCreateBody:
      properties:
        title:
          type: string
          title: Title
        slug:
          type: string
          title: Slug
        end_cta_kind:
          type: string
          title: End Cta Kind
        end_cta_label:
          type: string
          title: End Cta Label
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
      type: object
      required:
      - title
      - slug
      - end_cta_kind
      - end_cta_label
      title: JourneyCreateBody
    JourneyStepEntry:
      properties:
        guide_id:
          type: string
          title: Guide Id
        step_title:
          type: string
          title: Step Title
        position:
          type: integer
          title: Position
      type: object
      required:
      - guide_id
      - step_title
      - position
      title: JourneyStepEntry
    JourneyUpdateBody:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        end_cta_kind:
          anyOf:
          - type: string
          - type: 'null'
          title: End Cta Kind
        end_cta_label:
          anyOf:
          - type: string
          - type: 'null'
          title: End Cta Label
      type: object
      title: JourneyUpdateBody
    Lead:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        vertical:
          type: string
          title: Vertical
        product_id:
          type: string
          title: Product Id
        product_name_snapshot:
          type: string
          title: Product Name Snapshot
        source_surface:
          type: string
          title: Source Surface
        session_id:
          type: string
          title: Session Id
        status:
          $ref: '#/components/schemas/LeadStatus'
        notes:
          anyOf:
          - type: string
          - type: 'null'
          title: Notes
        created_at:
          type: string
          title: Created At
        contacted_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Contacted At
        is_anonymized:
          type: boolean
          title: Is Anonymized
          default: false
      type: object
      required:
      - id
      - vertical
      - product_id
      - product_name_snapshot
      - source_surface
      - session_id
      - status
      - created_at
      title: Lead
    LeadListMeta:
      properties:
        total:
          type: integer
          minimum: 0.0
          title: Total
        page:
          type: integer
          minimum: 1.0
          title: Page
        page_size:
          type: integer
          minimum: 1.0
          title: Page Size
        total_pages:
          type: integer
          minimum: 0.0
          title: Total Pages
      type: object
      required:
      - total
      - page
      - page_size
      - total_pages
      title: LeadListMeta
    LeadListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Lead'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/LeadListMeta'
      type: object
      required:
      - data
      - meta
      title: LeadListResponse
    LeadPatchPayload:
      properties:
        status:
          anyOf:
          - $ref: '#/components/schemas/LeadStatus'
          - type: 'null'
        notes:
          anyOf:
          - type: string
            maxLength: 4000
          - type: 'null'
          title: Notes
      type: object
      title: LeadPatchPayload
      description: 'PATCH /api/v1/admin/leads/{id} body.


        Both fields optional; the route still enforces "at least one of

        status, notes" because allowing an entirely empty PATCH would be a

        silent no-op. `notes` is capped at 4000 chars to bound the TEXT

        column (notes are operational, not long-form).'
    LeadStatus:
      type: string
      enum:
      - new
      - contacted
      - converted
      - discarded
      title: LeadStatus
    LeadSubmissionPayload:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
        email:
          type: string
          format: email
          title: Email
        vertical:
          type: string
          enum:
          - tarjetas
          - fondos-pension
          - credito-hipotecario
          title: Vertical
        product_id:
          type: string
          format: uuid
          title: Product Id
        product_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Product Name
        source_surface:
          type: string
          enum:
          - dashboard
          - catalogo
          - comparacion
          - detalle
          - finder
          - wizard
          - articulo
          - guia
          title: Source Surface
        consent_granted:
          type: boolean
          const: true
          title: Consent Granted
        policy_version:
          type: string
          maxLength: 20
          minLength: 1
          title: Policy Version
      type: object
      required:
      - name
      - email
      - vertical
      - product_id
      - product_name
      - source_surface
      - consent_granted
      - policy_version
      title: LeadSubmissionPayload
    OfferCreateBody:
      properties:
        product_id:
          type: string
          title: Product Id
        headline:
          type: string
          title: Headline
        terms_snippet:
          anyOf:
          - type: string
          - type: 'null'
          title: Terms Snippet
        bonus_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Bonus Crc
        intro_apr_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Intro Apr Pct
        intro_period_months:
          anyOf:
          - type: integer
          - type: 'null'
          title: Intro Period Months
        active_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Active From
        active_until:
          anyOf:
          - type: string
          - type: 'null'
          title: Active Until
      type: object
      required:
      - product_id
      - headline
      title: OfferCreateBody
    OfferUpdateBody:
      properties:
        headline:
          anyOf:
          - type: string
          - type: 'null'
          title: Headline
        terms_snippet:
          anyOf:
          - type: string
          - type: 'null'
          title: Terms Snippet
        bonus_crc:
          anyOf:
          - type: number
          - type: 'null'
          title: Bonus Crc
        intro_apr_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Intro Apr Pct
        intro_period_months:
          anyOf:
          - type: integer
          - type: 'null'
          title: Intro Period Months
        active_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Active From
        active_until:
          anyOf:
          - type: string
          - type: 'null'
          title: Active Until
      type: object
      title: OfferUpdateBody
    ProductListMeta:
      properties:
        total:
          type: integer
          title: Total
        vertical:
          $ref: '#/components/schemas/VerticalSlug'
        next_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Next Cursor
      type: object
      required:
      - total
      - vertical
      title: ProductListMeta
    ProductListResponse:
      properties:
        data:
          items: {}
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/ProductListMeta'
      type: object
      required:
      - data
      - meta
      title: ProductListResponse
    ReviewStatusBody:
      properties:
        status:
          type: string
          title: Status
      type: object
      required:
      - status
      title: ReviewStatusBody
    ReviewUpdateBody:
      properties:
        pros:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Pros
        cons:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Cons
        best_use_case:
          anyOf:
          - type: string
          - type: 'null'
          title: Best Use Case
        review_body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Review Body Md
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
      type: object
      title: ReviewUpdateBody
    ReviewUpsertBody:
      properties:
        pros:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Pros
        cons:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Cons
        best_use_case:
          anyOf:
          - type: string
          - type: 'null'
          title: Best Use Case
        review_body_md:
          anyOf:
          - type: string
          - type: 'null'
          title: Review Body Md
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
        published_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Published At
      type: object
      title: ReviewUpsertBody
    StatusUpdateBody:
      properties:
        status:
          type: string
          title: Status
      type: object
      required:
      - status
      title: StatusUpdateBody
    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
    VerticalSlug:
      type: string
      enum:
      - tarjetas
      - fondos-pension
      - credito-hipotecario
      title: VerticalSlug
