openapi: 3.1.0
info:
  title: BBW Belles Formalwear Evidence API
  version: 1.2.0
  description: >-
    Free, read-only retailer-level evidence for U.S. online non-bridal
    formalwear in sizes 22 through 40 and custom measurements. Size is a
    hard gate. Retailer-level results do not prove item-level stock. The
    separate Universal Standard live-stock operation reports a point-in-time
    exact-variant catalog signal, not fit, delivery, reservation, or return
    eligibility.
  contact:
    name: BBW Belles Partnerships
    email: partners@bbwbelles.com
    url: https://bbwbelles.com/partners/
  license:
    name: BBW Belles public evidence terms
    url: https://bbwbelles.com/partners/#data-license
servers:
  - url: https://bbwbelles.com
    description: Canonical production service
paths:
  /api/retailers.json:
    get:
      operationId: getFormalwearRetailerEvidence
      summary: Get the source-checked formalwear retailer index
      description: >-
        Returns the current retailer-level U.S. numeric size ceilings,
        custom-measurement flags, ordering model, price band, event and
        feature tags, dated first-party evidence, shipping and return
        sources, and editorial watch-outs. Human shopping URLs remain
        direct and editorial in this evidence response.
      security: []
      responses:
        '200':
          description: Current source-checked retailer evidence
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetailerEvidenceDataset'
        '429':
          description: Request rate limit exceeded
  /api/universal-standard-stock:
    get:
      operationId: getUniversalStandardExactSizeStock
      summary: Get current Universal Standard exact-size occasion-dress availability
      description: >-
        Reads Universal Standard's public first-party Occasion Dresses product
        feed and returns only variants whose exact mapped option is available.
        Supported U.S. numeric sizes are 22 through 40 in even increments; the
        endpoint defaults to 40 for backward compatibility. The response is
        cached for 15 minutes, fails closed when the source cannot be verified,
        contains no shopper inputs, and uses direct non-affiliate product URLs.
      parameters:
        - in: query
          name: size
          required: false
          description: Even U.S. numeric size from 22 through 40. Defaults to 40.
          schema:
            type: integer
            enum: [22, 24, 26, 28, 30, 32, 34, 36, 38, 40]
            default: 40
      security: []
      responses:
        '200':
          description: Current exact-option availability
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UniversalStandardExactSizeStock'
        '400':
          description: The requested numeric size is unsupported
        '502':
          description: The live first-party catalog could not be verified
components:
  schemas:
    UniversalStandardExactSizeStock:
      type: object
      required:
        - status
        - retailer
        - collection
        - requested_standard_us_size
        - retailer_option
        - available_variant_count
        - checked_variant_count
        - fetched_at
        - source_url
        - source_feed
        - availability_boundary
        - commercial_relationship
        - products
      properties:
        status:
          type: string
          const: ok
        retailer:
          type: string
          const: Universal Standard
        collection:
          type: string
          const: Occasion Dresses
        requested_standard_us_size:
          type: integer
          enum: [30, 32, 34, 36, 38, 40]
        retailer_option:
          type: string
          enum: [L_22-24, XL_26-28, 2XL_30-32, 3XL_34-36, 4XL_38-40]
        available_variant_count:
          type: integer
          minimum: 0
        checked_variant_count:
          type: integer
          minimum: 1
        fetched_at:
          type: string
          format: date-time
        source_url:
          type: string
          format: uri
        source_feed:
          type: string
          format: uri
        availability_boundary:
          type: string
        commercial_relationship:
          type: string
        products:
          type: array
          items:
            $ref: '#/components/schemas/UniversalStandardStockProduct'
      additionalProperties: false
    UniversalStandardStockProduct:
      type: object
      required:
        - title
        - color
        - price_usd
        - product_url
      properties:
        title:
          type: string
        color:
          type: string
        price_usd:
          type: number
          minimum: 0
        product_url:
          type: string
          format: uri
          pattern: '^https://www\.universalstandard\.com/products/'
      additionalProperties: false
    RetailerEvidenceDataset:
      type: object
      required:
        - name
        - description
        - generated_at
        - methodology_url
        - size_coverage
        - retailers
      properties:
        '@context':
          type: string
        '@type':
          type: string
        name:
          type: string
        description:
          type: string
        scope:
          type: string
        generated_at:
          type: string
          format: date
        dateModified:
          type: string
          format: date
        url:
          type: string
          format: uri
        methodology_url:
          type: string
          format: uri
        license:
          type: string
          format: uri
        size_coverage:
          type: array
          items:
            type: object
            required:
              - us_numeric_size
              - retailer_count
            properties:
              us_numeric_size:
                type: integer
                minimum: 22
                maximum: 40
              retailer_count:
                type: integer
                minimum: 0
        retailers:
          type: array
          items:
            $ref: '#/components/schemas/RetailerEvidence'
      additionalProperties: true
    RetailerEvidence:
      type: object
      required:
        - id
        - name
        - shop_url
        - evidence_url
        - evidence_checked
        - sizes
        - ordering_model
        - commercial_relationship
      properties:
        id:
          type: string
        name:
          type: string
        shop_url:
          type: string
          format: uri
          description: Direct editorial retailer URL, never an affiliate URL.
        evidence_url:
          type: string
          format: uri
        evidence_checked:
          type: string
          format: date
        sizes:
          type: object
          properties:
            min:
              type: integer
            max:
              type: integer
            custom:
              type: boolean
          additionalProperties: true
        ordering_model:
          type: string
          enum:
            - rush
            - standard
            - made-to-order
        commercial_relationship:
          type: string
          description: Commercial state for the evidence record.
      additionalProperties: true
