openapi: 3.1.0
info:
  title: BoatsOcean API
  version: 1.0.0-pilot
  description: BoatsOcean public catalogue, company workspaces and operations. Free pilot; tourist charter by
    request. Sessions rotate and revoke server-side. Owner/admin manage verification, team and billing.
    Managers manage fleet, listings, leads, calendars and imports. Editors prepare drafts and photographs;
    viewers read only. Partner API tokens are scoped and rate-limited; see /developers/api/ for the
    integration guide.
tags:
  - name: Marketplace
    description: Service providers, marinas, equipment and participant inquiries. Free pilot; contracts and
      payments directly between parties.
  - name: Partner
    description: Scoped partner API for catalogue sync, leads, NautiX imports, webhooks and usage analytics.
  - name: Account
    description: Authenticated account workspace, including seller-owned partner API key management.
  - name: System
    description: Health, readiness and public status endpoints.
  - name: Catalogue
    description: Manufacturer research, model ranges, rights evidence and reviewed public revisions.
servers:
  - url: https://boatsocean.com
    description: Production (same-origin API; nginx proxies /api/)
  - url: http://127.0.0.1:8080
    description: Local development
paths:
  /api/marketplace/sellers/{id}:
    get:
      tags:
        - Marketplace
      operationId: getPublicMarketplaceSeller
      summary: Read redacted supplier identity for published real offers
      description: Requires verified identity and at least one approved non-test offer. Returns no login email,
        verification documents or internal notes. Supplier profiles do not imply that equipment sellers offer
        maintenance services.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Public supplier
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketSeller"
        "400":
          description: Invalid ID
        "404":
          description: No eligible public supplier
        "503":
          description: Data unavailable
  /api/marketplace/locations:
    get:
      tags:
        - Marketplace
      operationId: listMarketplaceLocations
      summary: List global country and geographic directory references
      description: Country references include ISO regions without invented coordinates. Cities, ports and facilities
        remain separate; unknown cities can be entered under a country reference. No operator or facility
        availability is implied.
      responses:
        "200":
          description: Directory locations
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/Location"
        "503":
          description: Directory unavailable
  /api/marketplace/config:
    get:
      tags:
        - Marketplace
      operationId: getMarketplaceLaunchConfiguration
      summary: Get marketplace launch configuration
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                type: object
                properties:
                  servicesEnabled:
                    type: boolean
                  marinasEnabled:
                    type: boolean
                  partsEnabled:
                    type: boolean
                  categories:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  activities:
                    type: array
                    items:
                      type: string
                  payments:
                    const: direct
                  marinaMode:
                    const: request_conditions
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/marketplace/items:
    get:
      tags:
        - Marketplace
      operationId: listApprovedMarketplaceOffers
      summary: List approved marketplace offers
      description: Server pagination and facets from approved non-test offers. Price filters are decimal main
        currency units with currency (EUR by default). Vessel dimensions narrow marina limits; dates are not
        an availability guarantee. Unknown limits remain visible for confirmation.
      parameters:
        - in: query
          name: kind
          required: true
          schema:
            type: string
        - &a1
          in: query
          name: q
          required: false
          schema:
            type: string
        - &a2
          in: query
          name: status
          required: false
          schema:
            type: string
        - &a3
          in: query
          name: category
          required: false
          schema:
            type: string
        - &a4
          in: query
          name: location
          required: false
          schema:
            type: string
        - &a5
          in: query
          name: brand
          required: false
          schema:
            type: string
        - &a6
          in: query
          name: model
          required: false
          schema:
            type: string
        - &a7
          in: query
          name: condition
          required: false
          schema:
            type: string
        - &a8
          in: query
          name: builder
          required: false
          schema:
            type: string
        - &a9
          in: query
          name: stock
          required: false
          schema:
            type: string
        - &a10
          in: query
          name: currency
          required: false
          schema:
            type: string
        - &a11
          in: query
          name: sellerId
          required: false
          schema:
            type: string
        - &a12
          in: query
          name: page
          required: false
          schema:
            type: integer
        - &a13
          in: query
          name: perPage
          required: false
          schema:
            type: integer
        - &a14
          in: query
          name: minPrice
          required: false
          schema:
            type: number
        - &a15
          in: query
          name: maxPrice
          required: false
          schema:
            type: number
        - &a16
          in: query
          name: length
          required: false
          schema:
            type: number
        - &a17
          in: query
          name: beam
          required: false
          schema:
            type: number
        - &a18
          in: query
          name: draft
          required: false
          schema:
            type: number
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/marketplace/items/{slug}:
    get:
      tags:
        - Marketplace
      operationId: readApprovedMarketplaceOffer
      summary: Read approved marketplace offer
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/marketplace/inquiries:
    post:
      tags:
        - Marketplace
      operationId: createMarketplaceInquiry
      summary: Create marketplace inquiry
      description: Authentication is required. Idempotent by account and requestKey; inquiry snapshot and
        notification job are atomic. Marina requests agree feasibility and conditions, never reserve a berth.
        Dates and positive dimensions are required for marinas. Published size limits apply.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketInquiryInput"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiry"
        "201":
          description: Inquiry and durable notification task created atomically
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiry"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/account/marketplace/inquiries:
    get:
      tags:
        - Marketplace
      operationId: listAccountMarketplaceInquiries
      summary: List account marketplace inquiries
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: query
          name: q
          required: false
          schema:
            type: string
        - in: query
          name: status
          required: false
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            type: integer
        - in: query
          name: perPage
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiryPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/inquiries:
    get:
      tags:
        - Marketplace
      operationId: listSellerMarketplaceInquiries
      summary: List seller marketplace inquiries
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: query
          name: q
          required: false
          schema:
            type: string
        - in: query
          name: status
          required: false
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            type: integer
        - in: query
          name: perPage
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiryPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/admin/marketplace/inquiries:
    get:
      tags:
        - Marketplace
      operationId: listAdminMarketplaceInquiries
      summary: List admin marketplace inquiries
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: query
          name: q
          required: false
          schema:
            type: string
        - in: query
          name: status
          required: false
          schema:
            type: string
        - in: query
          name: page
          required: false
          schema:
            type: integer
        - in: query
          name: perPage
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiryPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/account/marketplace/inquiries/{id}:
    get:
      tags:
        - Marketplace
      operationId: readParticipantMarketplaceInquiry
      summary: Read participant marketplace inquiry
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiry"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/account/marketplace/inquiries/{id}/messages:
    post:
      tags:
        - Marketplace
      operationId: replyToParticipantMarketplaceInquiry
      summary: Reply to participant marketplace inquiry
      description: Participant or administrator. Company managers, owners and admins may reply; editors and viewers
        read only. A client may cancel their request. Closing requires an outcome. Message keys prevent retry
        duplicates. No payment or reservation is created.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketReply"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketInquiry"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/items:
    get:
      tags:
        - Marketplace
      operationId: listSellerMarketplaceRevisions
      summary: List seller marketplace revisions
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: query
          name: kind
          required: false
          schema:
            type: string
        - *a1
        - *a2
        - *a3
        - *a4
        - *a5
        - *a6
        - *a7
        - *a8
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a15
        - *a16
        - *a17
        - *a18
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
    post:
      tags:
        - Marketplace
      operationId: createSellerMarketplaceDraft
      summary: Create seller marketplace draft
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSaveInput"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/items/{id}:
    get:
      tags:
        - Marketplace
      operationId: getSellerMarketplaceRevision
      summary: Read a private marketplace revision by stable ID
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Private editable revision and its approved snapshot
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid ID
        "401":
          description: Authentication required
        "403":
          description: Insufficient role
        "404":
          description: Missing object or another company
        "503":
          description: Storage unavailable
    put:
      tags:
        - Marketplace
      operationId: saveSellerMarketplaceRevision
      summary: Save seller marketplace revision
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSaveInput"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/items/{id}/actions:
    post:
      tags:
        - Marketplace
      operationId: changeSellerMarketplacePublication
      summary: Change seller marketplace publication
      description: Owner/manager may submit, pause, archive, mark equipment sold, or update published price/stock.
        Only administrator approves or requests changes. Submission requires appropriate identity
        verification; no vessel mandate or charter capability applies. Marina affiliation approval requires a
        note. Content edits keep the prior approved version public.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketAction"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/admin/marketplace/items:
    get:
      tags:
        - Marketplace
      operationId: listAdminMarketplaceRevisions
      summary: List admin marketplace revisions
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: query
          name: kind
          required: false
          schema:
            type: string
        - *a1
        - *a2
        - *a3
        - *a4
        - *a5
        - *a6
        - *a7
        - *a8
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a15
        - *a16
        - *a17
        - *a18
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketPage"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
    post:
      tags:
        - Marketplace
      operationId: createAdminMarketplaceDraft
      summary: Create admin marketplace draft
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSaveInput"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/admin/marketplace/items/{id}:
    get:
      tags:
        - Marketplace
      operationId: getAdminMarketplaceRevision
      summary: Read a private marketplace revision by stable ID
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Private editable revision and its approved snapshot
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid ID
        "401":
          description: Authentication required
        "403":
          description: Insufficient role
        "404":
          description: Missing object or another company
        "503":
          description: Storage unavailable
    put:
      tags:
        - Marketplace
      operationId: saveAdminMarketplaceRevision
      summary: Save admin marketplace revision
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSaveInput"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/admin/marketplace/items/{id}/actions:
    post:
      tags:
        - Marketplace
      operationId: changeAdminMarketplacePublication
      summary: Change admin marketplace publication
      description: Owner/manager may submit, pause, archive, mark equipment sold, or update published price/stock.
        Only administrator approves or requests changes. Submission requires appropriate identity
        verification; no vessel mandate or charter capability applies. Marina affiliation approval requires a
        note. Content edits keep the prior approved version public.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketAction"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketItem"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/settings:
    get:
      tags:
        - Marketplace
      operationId: readCompanyMarketplaceActivities
      summary: Read company marketplace activities
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketSettings"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
    put:
      tags:
        - Marketplace
      operationId: changeCompanyMarketplaceActivities
      summary: Change company marketplace activities
      description: Owner/company admin only, with optimistic version. Activities describe the company; they do not
        grant charter or vessel-sale capabilities.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSettings"
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketSettings"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/imports/preview:
    post:
      tags:
        - Marketplace
      operationId: previewEquipmentCSV
      summary: preview equipment CSV
      description: At most 1000 rows. Shared preview/commit validation including directory location, photos,
        manufacturer and price. Price uses decimal main currency units. Lists use |. Commit is atomic; owner +
        externalId updates an existing draft, does not delete missing rows and never publishes automatically.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                  maxLength: 4194304
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketImportResult"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/imports/commit:
    post:
      tags:
        - Marketplace
      operationId: commitEquipmentCSV
      summary: commit equipment CSV
      description: At most 1000 rows. Shared preview/commit validation including directory location, photos,
        manufacturer and price. Price uses decimal main currency units. Lists use |. Commit is atomic; owner +
        externalId updates an existing draft, does not delete missing rows and never publishes automatically.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                  maxLength: 4194304
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketImportResult"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/seller/marketplace/imports/template:
    get:
      tags:
        - Marketplace
      operationId: downloadEquipmentCSVTemplate
      summary: Download equipment CSV template
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Successful result
          content:
            text/csv:
              schema:
                type: string
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/admin/marketplace/items/{id}/audit:
    get:
      tags:
        - Marketplace
      operationId: readMarketplaceAuditTrail
      summary: Read marketplace audit trail
      description: Public content uses the approved snapshot. Drafts, revisions and participant conversations remain
        private. All access is scoped to the active company and server-checked roles.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/MarketAudit"
        "400":
          description: Invalid input or ID; field details are returned in the error message
        "401":
          description: Authentication required
        "403":
          description: Insufficient role or no active profile
        "404":
          description: Absent object or object owned by another company
        "409":
          description: Stale revision or reused request key
        "503":
          description: Storage or public section temporarily unavailable
  /api/vessel-history/reports:
    post:
      tags:
        - Account
      operationId: createVesselHistoryReport
      summary: Create a free private vessel history snapshot
      description: Requires an account. Maximum ten new reports per hour. The idempotency key protects retries. A
        durable job builds a partial report if a provider is unavailable. Names and MMSI never establish
        identity. No legal clearance is implied.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VesselHistoryInput"
      responses:
        "200":
          description: Existing report for an identical idempotent request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VesselHistoryReport"
        "202":
          description: Report and durable job created atomically
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VesselHistoryReport"
        "400":
          description: Invalid identifier
          IMO check digit: null
          country or request key: null
        "401":
          description: Authentication required
        "409":
          description: Same request key with different input
        "429":
          description: Ten new reports per hour exceeded
  /api/vessel-history/reports/{id}:
    get:
      tags:
        - Account
      operationId: getVesselHistoryReport
      summary: Read an immutable private report
      description: Owner or administrator only. Completed snapshots are never rewritten. Cache-Control private
        no-store and X-Robots-Tag noindex nofollow.
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Saved report, including queued or partial state
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VesselHistoryReport"
        "400":
          description: Malformed ID
        "401":
          description: Authentication required
        "404":
          description: Absent report or report belonging to another account
  /api/account/vessel-history/reports:
    get:
      tags:
        - Account
      operationId: listVesselHistoryReports
      summary: Paginated reports owned by the current account
      security:
        - UserBearerAuth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
      responses:
        "200":
          description: Private paginated list
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - page
                  - perPage
                  - total
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/VesselHistoryReport"
                  page:
                    type: integer
                  perPage:
                    type: integer
                  total:
                    type: integer
        "401":
          description: Authentication required
  /healthz:
    get:
      summary: Health check
      responses:
        "200":
          description: API is healthy
  /api/status:
    get:
      tags:
        - System
      operationId: getPublicStatus
      summary: Public status page data
      description: Reports API, database, search configuration and webhook delivery status plus the published
        webhook SLA. No authentication required.
      responses:
        "200":
          description: Status snapshot
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StatusResponse"
  /api/auth/register:
    post:
      summary: Register user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RegisterRequest"
      responses:
        "201":
          description: User registered and token issued
  /api/auth/login:
    post:
      summary: Login user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginRequest"
      responses:
        "200":
          description: Token issued
  /api/auth/refresh:
    post:
      summary: Rotate refresh cookie and issue a new access token
      responses:
        "200":
          description: Token issued
  /api/auth/request-password-reset:
    post:
      summary: Request password reset email
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
      responses:
        "200":
          description: Password reset request accepted
  /api/auth/reset-password:
    post:
      summary: Reset password with a reset token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - password
              properties:
                token:
                  type: string
                password:
                  type: string
                  minLength: 8
      responses:
        "200":
          description: Password reset and token issued
  /api/auth/verify-email:
    get:
      summary: Verify account email by token query parameter
      parameters:
        - name: token
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Email verified and token issued
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthResponse"
    post:
      summary: Verify account email by JSON token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyEmailRequest"
      responses:
        "200":
          description: Email verified and token issued
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthResponse"
  /api/auth/resend-verification:
    post:
      summary: Resend account email verification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResendVerificationRequest"
      responses:
        "200":
          description: Verification send state
  /api/account:
    get:
      summary: Get account dashboard with buyer, seller and admin modules
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Account dashboard
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountDashboard"
    delete:
      summary: Delete the caller's own account
      description: Removes the account and everything that belongs only to it (favourites, saved searches,
        notifications, seller profiles and their unpublished inventory). Refused with 409 while the account
        still owns published listings or charter offers, or an unfinished deal, and the message names what
        blocks the deletion.
      security:
        - SellerBearerAuth: []
      responses:
        "204":
          description: Account deleted and the session cookies cleared
        "409":
          description: The account still owns published listings, published charter offers or open deals
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/account/api-clients:
    post:
      tags:
        - Account
      summary: Create a sandbox API client for the seller's company
      description: Self-service creation is limited to sandbox clients. Live clients are created by a BoatsOcean
        administrator.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - sandbox
              properties:
                name:
                  type: string
                sandbox:
                  type: boolean
                  enum:
                    - true
      responses:
        "201":
          description: Sandbox client created or reused
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIClient"
        "400":
          description: Missing seller profile or invalid body
        "401":
          description: Authentication required
        "403":
          description: Self-service creation is limited to sandbox clients
        "500":
          $ref: "#/components/responses/ServerError"
    get:
      tags:
        - Account
      summary: List partner API clients owned by the account's seller profiles
      description: Seller members can see the API clients linked to their seller profiles. Client creation remains
        an admin action.
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: API clients
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/APIClient"
        "401":
          description: Authentication required
        "500":
          $ref: "#/components/responses/ServerError"
  /api/account/api-clients/{id}/keys:
    get:
      tags:
        - Account
      summary: List keys for a seller-owned API client
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: API keys, without token values
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/APIKeyResponse"
        "401":
          description: Authentication required
        "404":
          description: API client not found for this account
        "500":
          $ref: "#/components/responses/ServerError"
    post:
      tags:
        - Account
      summary: Issue a key for a seller-owned API client
      description: The token is returned exactly once in the create response.
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIKeyRequest"
      responses:
        "201":
          description: Key created; token returned once
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIKeyResponse"
        "400":
          description: Invalid scopes or expiry
        "401":
          description: Authentication required
        "404":
          description: API client not found for this account
        "500":
          $ref: "#/components/responses/ServerError"
  /api/account/api-keys/{id}/rotate:
    post:
      tags:
        - Account
      summary: Rotate a seller-owned API key
      description: Creates a new token with the same name, scopes and remaining lifetime, then revokes the old key.
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "201":
          description: Replacement key created; token returned once
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIKeyResponse"
        "401":
          description: Authentication required
        "404":
          description: API key not found for this account
        "409":
          description: Only an active key can be rotated
        "500":
          $ref: "#/components/responses/ServerError"
  /api/account/api-keys/{id}/revoke:
    post:
      tags:
        - Account
      summary: Revoke a seller-owned API key
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Key revoked
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIKeyResponse"
        "401":
          description: Authentication required
        "404":
          description: API key not found for this account
        "500":
          $ref: "#/components/responses/ServerError"
  /api/account/seller-profiles:
    get:
      summary: List seller profiles accessible to the current user
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Seller profiles
    post:
      summary: Create seller profile and attach current user as owner
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateSellerProfileRequest"
      responses:
        "201":
          description: Seller profile created
        "409":
          description: The account already owns a seller profile
  /api/account/seller-profiles/{id}:
    patch:
      summary: Update a draft seller profile
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerProfileUpdateRequest"
      responses:
        "200":
          description: Seller profile updated
  /api/account/seller-profiles/{id}/verification:
    post:
      summary: Submit seller verification data and documents
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerVerificationRequest"
      responses:
        "202":
          description: Seller verification submitted
  /api/account/seller-profiles/{id}/verification/draft:
    get:
      summary: Get or create the editable seller verification draft
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Verification draft
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerVerificationSubmission"
    put:
      summary: Autosave an incomplete seller verification draft
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerVerificationDraftRequest"
      responses:
        "200":
          description: Saved draft
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerVerificationSubmission"
  /api/account/seller-profiles/{id}/verification/submit:
    post:
      summary: Validate and submit the current seller verification draft
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "202":
          description: Verification submission pending review
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerVerificationSubmission"
  /api/account/seller-profiles/{id}/verification/withdraw:
    post:
      summary: Withdraw a pending submission and create an editable copy
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Editable cloned draft
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerVerificationSubmission"
  /api/verification-documents/{id}:
    get:
      summary: Download a private verification document as its owner or an administrator
      security:
        - SellerBearerAuth: []
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Private document bytes
        "404":
          description: Missing or inaccessible document
  /api/account/seller-profiles/{id}/new-build:
    patch:
      summary: Enable or disable verified new-build inquiry routing
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerNewBuildSettingsRequest"
      responses:
        "200":
          description: Updated seller profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerProfile"
        "400":
          description: Profile is not eligible to accept new-build inquiries
  /api/seller/charter-capability/request:
    post:
      summary: Ask the platform to vet the seller for commercial charter operations
      description: >
        Records charterOperationsRequestedAt without approving anything. A charter offer can only be submitted
        for publication once an administrator approves the capability; creating and editing a draft offer
        stays open.
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Request recorded; the capability is still unapproved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerProfile"
        "404":
          description: The account owns no seller profile
  /api/seller/owner-mandates:
    get:
      summary: List the owner mandates of the caller's seller profile
      description: >
        Internal evidence for the "on behalf of the owner" block; never published. A seller sees only its own
        rows, an administrator every row, and a foreign sellerId is a 404.
      security:
        - SellerBearerAuth: []
        - AdminBearerAuth: []
      parameters:
        - name: sellerId
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Owner mandates
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/SellerOwnerMandate"
        "404":
          description: No such seller profile for this principal
    post:
      summary: Register an owner mandate behind a professional listing
      description: >
        Requires the owner's name, at least one contact channel (email or phone) and the mandate document
        (asset id or URL). Approval is the platform's decision, so a seller may open a draft or submit it for
        review.
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerOwnerMandateInput"
      responses:
        "201":
          description: Owner mandate registered
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerOwnerMandate"
        "400":
          description: The mandate is missing the owner name, a contact channel or the document
  /api/seller/owner-mandates/{id}:
    delete:
      summary: Hide an owner mandate from the cabinet
      description: Soft delete. The row stays for the platform's evidence trail.
      security:
        - SellerBearerAuth: []
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Owner mandate deleted
        "404":
          description: Missing or foreign owner mandate
  /api/seller/subscription:
    post:
      summary: Select broker package for current seller
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SelectBrokerPackageRequest"
      responses:
        "200":
          description: Broker subscription selected
  /api/broker/packages:
    get:
      summary: List broker and dealer subscription packages
      responses:
        "200":
          description: Broker package catalogue
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/BrokerPackage"
  /api/admin/broker/packages:
    get:
      summary: List configured packages for agreed administrative activation, including in free pilot
      security:
        - AdminBearerAuth: []
      responses:
        "200":
          description: Configured broker packages
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/BrokerPackage"
        "401":
          description: Authentication required
        "403":
          description: Administrator role required
        "500":
          description: Package storage unavailable
  /api/yachts:
    get:
      summary: List yachts
      parameters:
        - name: q
          in: query
          schema:
            type: string
        - name: type
          in: query
          schema:
            type: string
        - name: builder
          in: query
          schema:
            type: string
        - name: seller
          in: query
          description: Seller/broker slug, id or exact name.
          schema:
            type: string
        - name: broker
          in: query
          description: Alias for seller.
          schema:
            type: string
        - name: location
          in: query
          schema:
            type: string
        - name: condition
          in: query
          schema:
            type: string
            enum:
              - new
              - used
              - in-build
        - name: minPrice
          in: query
          schema:
            type: integer
            format: int64
        - name: maxPrice
          in: query
          schema:
            type: integer
            format: int64
        - name: minLength
          in: query
          schema:
            type: number
        - name: maxLength
          in: query
          schema:
            type: number
        - name: minYear
          in: query
          schema:
            type: integer
        - name: maxYear
          in: query
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 12
        - name: search
          in: query
          description: Set to 0 to bypass Meilisearch and force the PostgreSQL/store fallback.
          schema:
            type: string
            enum:
              - "0"
              - "1"
        - in: query
          name: purpose
          schema:
            type: string
        - in: query
          name: hullConfiguration
          schema:
            source: a1
        - in: query
          name: propulsion
          schema:
            source: a1
        - in: query
          name: vesselClass
          schema:
            source: a1
        - in: query
          name: availabilityType
          schema:
            source: a1
        - name: listingObjectType
          in: query
          schema:
            type: string
            enum:
              - vessel
              - builder_model
        - in: query
          name: commercialUse
          required: false
          schema:
            type: string
        - in: query
          name: minPassengerCapacity
          required: false
          schema:
            type: number
        - in: query
          name: minDeadweightTonnes
          required: false
          schema:
            type: number
        - in: query
          name: minGrossTonnage
          required: false
          schema:
            type: number
        - in: query
          name: minCargoCapacityM3
          required: false
          schema:
            type: number
        - in: query
          name: minBollardPullTonnes
          required: false
          schema:
            type: number
        - name: builderCountry
          in: query
          description: Country of the manufacturer, not vessel location. Repeat to match any selected country.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: hullMaterial
          in: query
          schema:
            type: string
        - name: minCabins
          in: query
          schema:
            type: integer
            minimum: 0
        - name: minGuests
          in: query
          schema:
            type: integer
            minimum: 0
        - name: currency
          in: query
          schema:
            type: string
          description: Filter prices by their stored currency; no exchange-rate conversion is applied.
      responses:
        "200":
          description: Paginated yacht list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/YachtListResponse"
  /api/yachts/{slug}:
    get:
      summary: Get yacht by slug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Yacht detail
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Yacht"
        "404":
          $ref: "#/components/responses/NotFound"
        "410":
          description: Previously public listing permanently removed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      description: Published and formerly published sold records only. Sold responses include listingStatus=sold and
        last asking price, never actual transaction price. Previously public permanently removed records
        return 410 listing_gone; unpublished/draft/unknown records return 404.
  /api/yachts/{slug}/detail:
    get:
      summary: Get full localized yacht detail by slug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
        - name: locale
          in: query
          schema:
            type: string
            enum:
              - en
              - ru
            default: en
      responses:
        "200":
          description: Full yacht detail
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/YachtDetailResponse"
        "404":
          $ref: "#/components/responses/NotFound"
        "410":
          description: Previously public listing permanently removed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      description: Published and formerly published sold records only. Sold responses include listingStatus=sold and
        last asking price, never actual transaction price. Previously public permanently removed records
        return 410 listing_gone; unpublished/draft/unknown records return 404.
  /api/charter-offers:
    get:
      summary: List charter offers
      parameters:
        - {"name":"bookingPreview","in":"query","schema":{"type":"boolean"},"description":"Calculate the selected trip with booking terms before pagination. Requires both dates."}
        - {"name":"onlyAvailable","in":"query","schema":{"type":"boolean"},"description":"Return only periods with confirmed availability. Requires a dated preview."}
        - {"name":"freeCancellation","in":"query","schema":{"type":"boolean"},"description":"Return tariffs with a current full-refund window. Requires a dated preview."}
        - {"name":"unit","in":"query","schema":{"type":"string","enum":["yacht","cabin","berth"]},"description":"Booking inventory unit for the dated preview."}
        - {"name":"priceCurrency","in":"query","schema":{"type":"string","enum":["EUR","USD"]},"description":"Original currency of the trip budget."}
        - {"name":"period","in":"query","schema":{"type":"string","enum":["day","week"]},"description":"Published charter duration category."}
        - name: destination
          in: query
          schema:
            type: string
        - name: sort
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 24
        - in: query
          name: query
          schema: &a19
            type: string
        - in: query
          name: type
          schema: *a19
        - in: query
          name: builder
          schema: *a19
        - in: query
          name: operator
          schema: *a19
        - in: query
          name: startDate
          schema: *a19
        - in: query
          name: endDate
          schema: *a19
        - in: query
          name: guests
          schema: &a20
            type: number
        - in: query
          name: cabins
          schema: *a20
        - in: query
          name: minPrice
          schema: *a20
        - in: query
          name: maxPrice
          schema: *a20
        - in: query
          name: minLength
          schema: *a20
        - in: query
          name: maxLength
          schema: *a20
      responses:
        "200":
          description: Charter offers
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterOfferListResponse"
  /api/charter-destinations:
    get:
      summary: List charter destinations with live published offer counts
      responses:
        "200":
          description: Charter destinations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterDestinationListResponse"
  /api/charter-booking-requests:
    post:
      summary: Create charter booking request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterBookingRequestInput"
      responses:
        "202":
          description: Charter booking request accepted
        "409":
          description: Selected slot is not available
  /api/admin/charter-requests:
    get:
      summary: List charter requests (admin sees all, sellers see their own offers)
      parameters:
        - name: status
          in: query
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
        - name: perPage
          in: query
          schema:
            type: integer
      responses:
        "200":
          description: Charter requests with the first-response SLA state
  /api/seller/charter-requests:
    get:
      summary: List charter requests for the seller's own offers
      responses:
        "200":
          description: Charter requests
  /api/admin/charter-requests/{id}:
    patch:
      summary: Answer or re-status a charter request (the client is emailed)
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                note:
                  type: string
                assignedTo:
                  type: string
                lostReason:
                  type: string
      responses:
        "200":
          description: Updated charter request
        "404":
          description: Request not found or not visible to the caller
  /api/webhooks/mailgun/inbound:
    post:
      summary: Inbound email webhook; threads a client reply into the inquiry it answers
      responses:
        "200":
          description: Threaded (or ignored when the address cannot be resolved)
        "401":
          description: Signature is missing, stale or invalid
  /api/response-templates:
    get:
      summary: List canned replies for the caller's seller (plus the platform ones)
      responses:
        "200":
          description: Templates
    post:
      summary: Create a canned reply
      responses:
        "201":
          description: Created template
  /api/account/notifications:
    get:
      summary: List in-app notifications for the current user
      parameters:
        - name: unread
          in: query
          schema:
            type: boolean
        - name: limit
          in: query
          schema:
            type: integer
      responses:
        "200":
          description: Notifications with the unread count
  /api/account/notifications/read:
    post:
      summary: Mark notifications as read (all, or the given ids)
      responses:
        "200":
          description: Number of updated notifications
  /api/categories:
    get:
      summary: List categories
      responses:
        "200":
          description: Categories
  /api/builders:
    get:
      summary: List builders
      parameters:
        - name: q
          in: query
          schema:
            type: string
        - name: country
          in: query
          schema:
            type: string
        - name: vesselType
          in: query
          schema:
            type: string
        - name: segment
          in: query
          schema:
            type: string
            enum:
              - under-10m
              - 10-24m
              - 24-60m
              - 60m-plus
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 500
      responses:
        "200":
          description: Builders
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BuilderListResponse"
  /api/builders/{slug}:
    get:
      summary: Get a builder profile with models and live listings
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Builder profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BuilderDetailResponse"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/brokers:
    get:
      summary: List public broker profiles
      responses:
        "200":
          description: Public broker profiles
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/PublicBroker"
  /api/brokers/{slug}:
    get:
      summary: Get public broker profile by slug
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Public broker profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicBroker"
        "404":
          $ref: "#/components/responses/NotFound"
  /api/locations:
    get:
      summary: List locations
      responses:
        "200":
          description: Locations
  /api/location-directory:
    get:
      summary: List locations for directory pages
      responses:
        "200":
          description: Locations
  /api/location-hubs:
    get:
      summary: List map hubs for a selected location
      parameters:
        - name: location
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Location map hubs
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/LocationHub"
  /api/listing-events:
    post:
      summary: Record listing impression, click or conversion event
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ListingEventRequest"
      responses:
        "202":
          description: Listing event accepted
  /api/leads:
    post:
      summary: Create lead
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LeadRequest"
      responses:
        "202":
          description: Lead accepted
  /api/newsletter:
    post:
      summary: Capture newsletter signup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                interest:
                  type: string
      responses:
        "202":
          description: Newsletter signup accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    example: accepted
  /api/seller/leads:
    get:
      summary: List leads for the current seller account
      security:
        - SellerBearerAuth: []
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 25
      responses:
        "200":
          description: Seller lead inbox
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/SellerLeadSummary"
  /api/seller/leads/{id}:
    patch:
      summary: Update seller lead status or add note
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateLeadRequest"
      responses:
        "200":
          description: Seller lead updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerLeadSummary"
  /api/seller/promotions:
    post:
      summary: Create listing promotion
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateListingPromotionRequest"
      responses:
        "201":
          description: Listing promotion created
  /api/favorites:
    post:
      summary: Save favorite yacht
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FavoriteRequest"
      responses:
        "202":
          description: Favorite accepted
  /api/compare:
    post:
      summary: Create comparison set
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CompareRequest"
      responses:
        "202":
          description: Comparison accepted
  /api/seller/listings:
    get:
      summary: List current seller listings by lifecycle status
      security:
        - SellerBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - draft
              - submitted
              - under_review
              - changes_requested
              - published
              - rejected
              - archived
              - sold
      responses:
        "200":
          description: Seller listings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerListingListResponse"
    post:
      summary: Create seller listing draft and enqueue search indexing
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerListingRequest"
      responses:
        "201":
          description: Draft listing created
  /api/seller/listings/{id}/submit:
    post:
      summary: Submit seller listing for admin review
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Listing submitted
  /api/seller/listings/{id}:
    put:
      summary: Update seller listing draft and enqueue search indexing
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerListingRequest"
      responses:
        "200":
          description: Draft listing updated
    delete:
      summary: Delete seller listing
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Listing deleted and search removal enqueued
  /api/seller/fleet-boats:
    get:
      summary: List current seller fleet boats
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Seller fleet boats
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerFleetBoatListResponse"
    post:
      summary: Create seller fleet boat and linked draft charter offer
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerFleetBoatRequest"
      responses:
        "201":
          description: Fleet boat created
  /api/seller/fleet-boats/{id}:
    get:
      summary: Get seller fleet boat
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Fleet boat
    put:
      summary: Update seller fleet boat and sync linked draft charter offer
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerFleetBoatRequest"
      responses:
        "200":
          description: Fleet boat updated
    delete:
      summary: Delete seller fleet boat and linked non-published draft offer
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Fleet boat deleted
  /api/seller/fleet-boats/{id}/submit:
    post:
      summary: Submit a complete Fleet boat for charter approval
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "202":
          description: Fleet boat submitted
  /api/seller/charter-bases:
    get:
      summary: List current seller charter bases
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Charter bases
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerCharterBaseListResponse"
    post:
      summary: Create seller charter base
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerCharterBaseRequest"
      responses:
        "201":
          description: Charter base created
  /api/seller/charter-bases/{id}:
    put:
      summary: Update seller charter base
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerCharterBaseRequest"
      responses:
        "200":
          description: Charter base updated
    delete:
      summary: Delete seller charter base
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Charter base deleted
  /api/seller/charter-bases/{id}/submit:
    post:
      summary: Submit a charter base for approval
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "202":
          description: Charter base submitted
  /api/account/location-requests:
    get:
      summary: List the current seller location requests
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Location requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerLocationRequestListResponse"
    post:
      summary: Request a missing marina or charter location
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerLocationRequest"
      responses:
        "201":
          description: Location request submitted
  /api/account/builder-requests:
    get:
      summary: List the current seller builder directory requests
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Builder requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerBuilderRequestListResponse"
    post:
      summary: Request a missing canonical builder
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerBuilderRequest"
      responses:
        "201":
          description: Builder request submitted
  /api/admin/listings:
    get:
      summary: List listings for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - draft
              - submitted
              - under_review
              - changes_requested
              - published
              - rejected
              - archived
              - sold
      responses:
        "200":
          description: Admin listing queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerListingListResponse"
  /api/admin/listings/{id}/moderate:
    post:
      summary: Moderate listing lifecycle status
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Listing moderated
  /api/admin/fleet-boats:
    get:
      summary: List seller fleet boats for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - submitted
              - under_review
              - changes_requested
              - published
              - rejected
              - archived
              - all
      responses:
        "200":
          description: Admin fleet boat queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerFleetBoatListResponse"
  /api/admin/fleet-boats/{id}/moderate:
    post:
      summary: Moderate seller fleet boat status
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Fleet boat moderated
  /api/admin/charter-offers:
    get:
      summary: List charter offers for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - draft
              - submitted
              - under_review
              - changes_requested
              - published
              - rejected
              - archived
              - all
      responses:
        "200":
          description: Admin charter offer queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerCharterOfferListResponse"
  /api/admin/charter-offers/{id}/moderate:
    post:
      summary: Moderate charter offer status
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Charter offer moderated
  /api/admin/charter-bases:
    get:
      summary: List seller charter bases for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
            enum:
              - draft
              - submitted
              - under_review
              - changes_requested
              - published
              - rejected
              - archived
              - all
      responses:
        "200":
          description: Admin charter base queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerCharterBaseListResponse"
  /api/admin/charter-bases/{id}/moderate:
    post:
      summary: Moderate seller charter base status
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Charter base moderated
  /api/admin/location-requests:
    get:
      summary: List missing marina requests for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Location request queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerLocationRequestListResponse"
  /api/admin/location-requests/{id}/moderate:
    post:
      summary: Approve, request changes to, or reject a marina request
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Location request moderated
  /api/admin/builder-requests:
    get:
      summary: List builder directory requests for admin moderation
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Builder request queue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerBuilderRequestListResponse"
  /api/admin/builder-requests/{id}/moderate:
    post:
      summary: Approve, request changes to, or reject a builder request
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ModerationRequest"
      responses:
        "200":
          description: Builder request moderated
  /api/admin/seller-profiles:
    get:
      summary: List seller profiles for admin verification
      security:
        - AdminBearerAuth: []
      parameters:
        - name: status
          in: query
          schema:
            type: string
        - name: type
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Seller profiles
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/SellerProfile"
  /api/admin/seller-profiles/{id}/moderate:
    post:
      summary: Moderate seller verification
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerVerificationModerationRequest"
      responses:
        "200":
          description: Seller profile moderated
  /api/admin/seller-verification-submissions/{id}/moderate:
    post:
      summary: Moderate an exact versioned seller verification submission
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerVerificationModerationRequest"
      responses:
        "200":
          description: Submission moderated and approved snapshot applied transactionally
  /api/admin/seller-profiles/{id}/subscription:
    post:
      summary: Assign an agreed package, record audit evidence and close an optional manual operation atomically
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdminBrokerPackageAssignmentRequest"
      responses:
        "200":
          description: Package assigned or matching idempotent receipt replayed
        "400":
          description: Invalid resource
          package code or unconfirmed agreement: null
        "401":
          description: Authentication required
        "403":
          description: Administrator role required
        "404":
          description: Seller not found
        "409":
          description: Idempotency key reused with different terms or operation already handled
        "500":
          description: Storage unavailable; transaction rolled back
  /api/admin/seller-profiles/{id}/charter-capability:
    post:
      summary: Approve or revoke a seller's charter operations capability
      description: >
        Writes charterOperationsApproved with the review timestamp and note. Revoking does not delete the
        history, and the next charter offer submit is refused again with charter_capability_required.
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - approved
              properties:
                approved:
                  type: boolean
                note:
                  type: string
      responses:
        "200":
          description: Capability decided
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerProfile"
        "404":
          description: Seller profile not found
  /api/admin/owner-mandates/{id}/status:
    post:
      summary: Review an owner mandate
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  type: string
                  enum:
                    - draft
                    - submitted
                    - approved
                    - rejected
                note:
                  type: string
      responses:
        "200":
          description: Owner mandate decided
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerOwnerMandate"
        "404":
          description: Owner mandate not found
  /api/admin/imports/url:
    post:
      summary: Import external yacht URL into review staging
      security:
        - AdminBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportURLRequest"
      responses:
        "201":
          description: Imported listing staged for review
  /api/admin/imports:
    get:
      summary: List imported listings waiting for review
      security:
        - AdminBearerAuth: []
      responses:
        "200":
          description: Imported listings
  /api/admin/imports/{id}:
    put:
      summary: Update normalized imported listing before approval
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportReviewRequest"
      responses:
        "200":
          description: Imported listing updated
  /api/admin/imports/{id}/approve:
    post:
      summary: Approve imported listing and enqueue search indexing
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Imported listing approved
  /api/admin/api-clients:
    get:
      summary: List partner API clients
      security:
        - AdminBearerAuth: []
      responses:
        "200":
          description: API clients
    post:
      summary: Create partner API client
      security:
        - AdminBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIClientRequest"
      responses:
        "201":
          description: API client created
  /api/admin/api-clients/{id}:
    put:
      summary: Update partner API client, status and quotas
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIClientRequest"
      responses:
        "200":
          description: API client updated
  /api/admin/api-clients/{id}/keys:
    get:
      summary: List partner API keys for client
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: API keys
    post:
      summary: Create scoped partner API key
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIKeyRequest"
      responses:
        "201":
          description: API key created; token is returned once
  /api/admin/api-keys/{id}/revoke:
    post:
      summary: Revoke partner API key
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: API key revoked
  /api/admin/api-clients/{id}/webhooks:
    get:
      summary: List partner webhooks for API client
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: API webhooks
    post:
      summary: Create partner webhook subscription
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIWebhookRequest"
      responses:
        "201":
          description: API webhook created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIWebhook"
  /api/admin/api-webhooks/{id}:
    delete:
      summary: Deactivate partner webhook subscription
      security:
        - AdminBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: API webhook deleted
  /api/partner/me:
    get:
      tags:
        - Partner
      operationId: getPartnerProfile
      summary: Current partner profile, scopes and limits
      description: "Returns the API client and key identity behind the bearer token, the granted scopes and the
        configured limits. Required scope: any valid partner token."
      security:
        - PartnerBearerAuth: []
      responses:
        "200":
          description: Partner identity and limits
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerProfileResponse"
              examples:
                profile:
                  value:
                    partner:
                      clientId: 7e8728a1-3454-4283-afec-d8fd6a465f6a
                      keyId: 386a3191-281e-48f0-a2e1-c86673b9b78a
                      name: Docs Demo Partner
                      scopes:
                        - listings:read
                        - feeds:read
                        - leads:create
                        - leads:read
                        - imports:write
                        - imports:read
                        - analytics:read
                        - webhooks:manage
                      sandbox: false
                      rateLimitPerMinute: 120
                      dailyQuota: 10000
                    apiVersion: "1.0"
                    docsUrl: /developers/api/
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/webhooks:
    get:
      tags:
        - Partner
      operationId: listPartnerWebhooks
      summary: List webhook subscriptions for the authenticated client
      description: Requires partner scope `webhooks:manage`. Signing secrets are never returned after creation.
      security:
        - PartnerBearerAuth: []
      responses:
        "200":
          description: Webhook subscriptions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerWebhookListResponse"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
    post:
      tags:
        - Partner
      operationId: createPartnerWebhook
      summary: Register a webhook subscription
      description: Requires partner scope `webhooks:manage`. The signing secret is returned exactly once in the
        response; store it safely.
      security:
        - PartnerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/APIWebhookRequest"
            examples:
              leadWebhook:
                value:
                  url: https://partner.example.com/hooks/boatsocean
                  events:
                    - lead.created
                    - import.completed
      responses:
        "201":
          description: Webhook created; the secret is returned once
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIWebhook"
        "400":
          $ref: "#/components/responses/PartnerValidationError"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/webhooks/{id}:
    patch:
      tags:
        - Partner
      operationId: updatePartnerWebhook
      summary: Update a webhook subscription
      description: Requires partner scope `webhooks:manage`. Omitted fields keep their current values; the signing
        secret cannot be changed through this endpoint.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartnerWebhookUpdateRequest"
      responses:
        "200":
          description: Webhook updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/APIWebhook"
        "400":
          $ref: "#/components/responses/PartnerValidationError"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
    delete:
      tags:
        - Partner
      operationId: deletePartnerWebhook
      summary: Deactivate a webhook subscription
      description: Requires partner scope `webhooks:manage`. Only a webhook owned by the authenticated client can be
        deleted.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Webhook deactivated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    example: deleted
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          description: Webhook not found for this client
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/webhook-deliveries:
    get:
      tags:
        - Partner
      operationId: listPartnerWebhookDeliveries
      summary: Recent webhook delivery attempts
      description: Requires partner scope `webhooks:manage`. Returns delivery metadata without payloads or signing
        secrets.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        "200":
          description: Delivery history
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerWebhookDeliveryListResponse"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/analytics:
    get:
      tags:
        - Partner
      operationId: getPartnerAnalytics
      summary: API usage analytics for the authenticated client
      description: Requires partner scope `analytics:read`. Aggregates request counts, error rate, status codes, top
        endpoints and webhook delivery health over a rolling window.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: range
          in: query
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
            default: 24h
      responses:
        "200":
          description: Usage aggregates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerAnalytics"
              examples:
                usage:
                  value:
                    clientId: 7e8728a1-3454-4283-afec-d8fd6a465f6a
                    range: 24h
                    generatedAt: 2026-10-20T03:00:00Z
                    requests: 1240
                    errors: 12
                    successRate: 99.03
                    byStatus:
                      "200": 1204
                      "202": 24
                      "404": 8
                      "429": 4
                    topEndpoints:
                      - method: GET
                        path: /api/partner/listings
                        requests: 820
                        errors: 2
                      - method: GET
                        path: /api/partner/feed/listings.json
                        requests: 360
                        errors: 1
                    webhookDeliveries: 48
                    webhookFailures: 1
        "400":
          $ref: "#/components/responses/PartnerValidationError"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/listings:
    get:
      tags:
        - Partner
      operationId: listPartnerListings
      summary: Partner listing catalogue
      description: Requires partner scope `listings:read`. Supports the public catalogue filters and pagination.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 12
        - name: type
          in: query
          schema:
            type: string
        - name: builder
          in: query
          schema:
            type: string
        - name: location
          in: query
          schema:
            type: string
        - name: minPrice
          in: query
          schema:
            type: integer
            format: int64
        - name: maxPrice
          in: query
          schema:
            type: integer
            format: int64
      responses:
        "200":
          description: Listings visible to the partner
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/YachtListResponse"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
        "500":
          $ref: "#/components/responses/ServerError"
  /api/partner/listings/{slug}:
    get:
      tags:
        - Partner
      operationId: getPartnerListing
      summary: Partner listing detail
      description: Requires partner scope `listings:read`.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
        - name: locale
          in: query
          schema:
            type: string
            enum:
              - en
              - ru
            default: en
      responses:
        "200":
          description: Listing detail
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/YachtDetailResponse"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/feed/listings.json:
    get:
      tags:
        - Partner
      operationId: getPartnerListingFeed
      summary: Partner JSON listing feed
      description: Requires partner scope `feeds:read`. Up to 100 listings per page for catalogue synchronisation.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
      responses:
        "200":
          description: JSON feed for catalogue synchronisation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerListingFeed"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/leads/{id}:
    get:
      tags:
        - Partner
      operationId: getPartnerLeadStatus
      summary: Read the routing status of a partner lead
      description: Requires partner scope `leads:read`. Only leads created by the authenticated API client are visible.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Lead status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerLeadStatus"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/leads:
    post:
      tags:
        - Partner
      operationId: createPartnerLead
      summary: Create a routed lead from a partner platform
      description: Requires partner scope `leads:create`. The response is 202 because broker routing and webhook
        delivery happen asynchronously. Use `yachtSlug` (not `listingSlug`).
      security:
        - PartnerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LeadRequest"
            examples:
              viewing:
                value:
                  yachtSlug: sanlorenzo-sx88-2021
                  name: Client Name
                  email: client@example.com
                  phone: "+37700000000"
                  message: Interested in a viewing
                  sourceName: Partner CRM
                  externalId: crm-lead-1001
      responses:
        "202":
          description: Lead accepted and queued for routing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LeadResponse"
        "400":
          $ref: "#/components/responses/PartnerValidationError"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/imports/{id}:
    get:
      tags:
        - Partner
      operationId: getPartnerImportStatus
      summary: Read the review status of a partner import
      description: Requires partner scope `imports:read`. Only listings imported by the authenticated API client are
        visible.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Import status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerImportStatus"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/partner/imports/nautix:
    post:
      tags:
        - Partner
      operationId: importPartnerNautiX
      summary: Import a NautiX XML feed into review staging
      description: Requires partner scope `imports:write`. Parsed listings enter pending review; publishing is a
        separate moderation step.
      security:
        - PartnerBearerAuth: []
      parameters:
        - name: sourceName
          in: query
          schema:
            type: string
            default: NautiX
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              type: string
      responses:
        "202":
          description: NautiX feed accepted
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartnerImportResponse"
        "400":
          $ref: "#/components/responses/PartnerValidationError"
        "401":
          $ref: "#/components/responses/PartnerUnauthorized"
        "403":
          $ref: "#/components/responses/PartnerForbidden"
        "429":
          $ref: "#/components/responses/PartnerRateLimited"
  /api/uploads:
    post:
      summary: Upload media asset
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                type:
                  type: string
                  enum:
                    - image
                    - document
                file:
                  type: string
                  format: binary
      responses:
        "201":
          description: Media asset created
    put:
      summary: Replace media asset by query id or url
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: query
          schema:
            type: string
        - name: url
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                type:
                  type: string
                  enum:
                    - image
                    - document
                file:
                  type: string
                  format: binary
      responses:
        "200":
          description: Media asset replaced
    delete:
      summary: Delete media asset by query id or url
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: query
          schema:
            type: string
        - name: url
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Media asset deleted
  /api/uploads/{id}:
    put:
      summary: Replace media asset by id
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                type:
                  type: string
                  enum:
                    - image
                    - document
                file:
                  type: string
                  format: binary
      responses:
        "200":
          description: Media asset replaced
    delete:
      summary: Delete media asset by id
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Media asset deleted
  /api/uploads/{id}/replace:
    post:
      summary: Replace media asset by id
      security:
        - SellerBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                type:
                  type: string
                  enum:
                    - image
                    - document
                file:
                  type: string
                  format: binary
      responses:
        "200":
          description: Media asset replaced
  /api/images:
    post:
      summary: Upload image alias
      security:
        - SellerBearerAuth: []
      responses:
        "201":
          description: Media asset created
  /api/seo/sitemap:
    get:
      summary: Return sitemap URL records
      responses:
        "200":
          description: Sitemap records
  /api/seo/landing-pages:
    get:
      summary: Return SEO landing page records for builders, yacht types and marketplace pages
      parameters:
        - name: locale
          in: query
          schema:
            type: string
            enum:
              - en
              - ru
            default: en
      responses:
        "200":
          description: SEO landing pages
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SEOLandingPageResponse"
  /api/seo/landing-pages/{kind}/{slug}:
    get:
      summary: Return SEO landing page detail
      parameters:
        - name: kind
          in: path
          required: true
          schema:
            type: string
            enum:
              - builder
              - builders
              - type
              - types
              - yacht_type
              - yacht-types
        - name: slug
          in: path
          required: true
          schema:
            type: string
        - name: locale
          in: query
          schema:
            type: string
            enum:
              - en
              - ru
            default: en
      responses:
        "200":
          description: SEO landing page detail
  /api/ai/generate-description:
    post:
      summary: Queue AI description generation
      responses:
        "202":
          description: AI job queued
  /api/ai/generate-meta:
    post:
      summary: Queue AI SEO metadata generation
      responses:
        "202":
          description: AI job queued
  /readyz:
    get:
      summary: Database readiness
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/launch-config:
    get:
      summary: Pilot availability
      description: Production defaults to free pilot. Online package purchases and charter payments are disabled.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  pilot:
                    type: boolean
                  paidPackagesEnabled:
                    type: boolean
                  charterBookingMode:
                    type: string
                    enum:
                      - request_only
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/account/boat-drafts:
    get:
      summary: List account drafts before seller verification
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/BoatDraft"
                required:
                  - items
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      description: Own private drafts plus drafts associated server-side with the active company.
        Owner/admin/manager can take over preparation left by an editor.
  /api/account/boat-drafts/{id}:
    get:
      summary: get account draft
      description: Precompany drafts are private to the authenticated account. After the next save with an active
        company, verified current company members may collaborate on the draft; viewers are read-only. Server
        association and optimistic version prevent cross-company/lost writes. Maximum body2 MiB.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BoatDraft"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    put:
      summary: put account draft
      description: Precompany drafts are private to the authenticated account. After the next save with an active
        company, verified current company members may collaborate on the draft; viewers are read-only. Server
        association and optimistic version prevent cross-company/lost writes. Maximum body2 MiB.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BoatDraftWrite"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BoatDraft"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    delete:
      summary: delete account draft
      description: Precompany drafts are private to the authenticated account. After the next save with an active
        company, verified current company members may collaborate on the draft; viewers are read-only. Server
        association and optimistic version prevent cross-company/lost writes. Maximum body2 MiB.
      security:
        - UserBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: Deleted
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/account/companies:
    get:
      summary: List company memberships
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/Company"
                required:
                  - items
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/account/companies/switch:
    post:
      summary: Switch active company on server
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                companyId:
                  type: string
              required:
                - companyId
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  sellerId:
                    type: string
                required:
                  - sellerId
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/team:
    get:
      summary: Read active company team
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Team"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/team/invites:
    post:
      summary: Invite an email-bound company member
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                role:
                  type: string
                  enum:
                    - admin
                    - editor
                    - manager
                    - viewer
              required:
                - email
                - role
      responses:
        "201":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TeamInvite"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/team/invites/{id}/revoke:
    post:
      summary: Revoke a pending invitation
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/team/members/{userId}:
    patch:
      summary: Update or remove company member
      description: Owner/admin only. The company owner cannot be removed or demoted.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                  enum:
                    - admin
                    - editor
                    - manager
                    - viewer
              required:
                - role
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    delete:
      summary: Update or remove company member
      description: Owner/admin only. The company owner cannot be removed or demoted.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: userId
          required: true
          schema: &a21
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status: *a21
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/account/invitations/accept:
    post:
      summary: Accept invitation for the signed-in email
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
              required:
                - token
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/listings/bulk:
    put:
      summary: Patch up to 100 company sale listings
      description: Published/submitted listings return to draft for moderation. Per-row errors are explicit.
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 100
                patch:
                  $ref: "#/components/schemas/BulkListingPatch"
              required:
                - ids
                - patch
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkListingResult"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/listings/{id}/status:
    patch:
      summary: Mark a published sale sold or archived
      description: Only published or sold listings may transition. Sold detail remains visible, active catalogue and
        inquiries exclude it.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - sold
                    - archived
              required:
                - status
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  updatedAt:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/admin/sale-listings/{id}/fleet-link:
    put:
      summary: Resolve a legacy sale to its stable fleet vessel
      description: Same company required; one active sale per fleet vessel. Publication status does not change.
      security:
        - AdminBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fleetBoatId:
                  type: string
              required:
                - fleetBoatId
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  fleetBoatId:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/analytics:
    get:
      summary: Read measured listing events
      description: Inclusive calendar dates, maximum 366 days. Measured public listing impressions/clicks/inquiry
        conversions, unique per server-derived visitor/listing/event/calendar day across sources. Signed
        opaque first-party visitor cookie distinguishes anonymous browsers behind proxies. Excludes
        administrators, owners and company members; private drafts never count. Client conversion claims are
        refused.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: query
          name: from
          schema:
            type: string
            format: date
        - in: query
          name: to
          schema:
            type: string
            format: date
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerAnalytics"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/imports:
    get:
      summary: Preview or upsert sale inventory
      description: CSV or NautiX XML. New rows become drafts. externalId is required and stable per company/source.
        No automatic publication or missing-row deletion.
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/ImportResult"
                required:
                  - items
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    post:
      summary: Preview or upsert sale inventory
      description: CSV or NautiX XML, optional CSV fieldMapping (source header→canonical field, empty value skips).
        Every new externalId creates a stable sale-only fleet vessel linked to the sale draft;
        retries/reimports retain both IDs. Existing ambiguous legacy rows remain for explicit moderator
        linking. Missing rows never delete inventory and imports never publish automatically.
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/InventoryImportRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImportResult"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/feeds:
    get:
      summary: Manage scheduled inventory feeds
      security:
        - SellerBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/SellerIntegration"
                required:
                  - items
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    post:
      summary: Manage scheduled inventory feeds
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerIntegration"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerIntegration"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/feeds/{id}:
    patch:
      summary: Update or disconnect an inventory feed
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SellerIntegration"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerIntegration"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    delete:
      summary: Update or disconnect an inventory feed
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: Deleted
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/feeds/{id}/run:
    post:
      summary: Run feed sync and return result
      description: Synchronous bounded fetch with public-IP DNS pinning, redirect validation and 8 MiB limit. The
        worker also schedules retries.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/charter-offers/{id}/ical:
    get:
      summary: Configure calendar import and private export link
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerIntegration"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    put:
      summary: Configure calendar import and private export link
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ICalWrite"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerIntegration"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/charter-offers/{id}/ical/sync:
    post:
      summary: Synchronize an iCal snapshot
      description: UID upsert, cancelled/missing event removal after a successful full parse. Date end is exclusive.
        Local TZID calendar days preserved. Unsupported recurrence fails visibly and keeps prior busy blocks.
      security:
        - SellerBearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/calendar/{token}:
    get:
      summary: Export unavailable calendar dates
      description: Unguessable secret URL. Exports busy dates only, no names, notes or guest details. no-store/noindex.
      parameters:
        - in: path
          name: token
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            text/calendar:
              schema:
                type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/seller/package-requests:
    post:
      summary: Request a manually agreed package
      security:
        - SellerBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                packageCode:
                  type: string
                message:
                  type: string
                  maxLength: 4000
              required:
                - packageCode
      responses:
        "201":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - requested
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/admin/operations:
    get:
      summary: Read moderation, overdue leads and durable delivery queues
      description: Full queue counts/oldest ages. Oldest 300 work objects and latest 200 delivery jobs. Only safe
        manual package context; private email/webhook payloads never returned.
      security:
        - AdminBearerAuth: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Operations"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/admin/operations/retry:
    post:
      summary: Retry a failed background job or create a fresh vessel history snapshot
      description: kind vessel_history.recheck creates an idempotent new report for the owner; completed snapshots
        remain unchanged. Owner rate limits still apply.
      security:
        - AdminBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                kind:
                  type: string
              required:
                - id
                - kind
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "202":
          description: Fresh vessel report queued; response contains reportId
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/admin/operations/assign:
    post:
      summary: Assign an open object to an administrator
      security:
        - AdminBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                kind:
                  type: string
                assigneeId:
                  type: string
              required:
                - id
                - kind
                - assigneeId
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/admin/operations/resolve:
    post:
      summary: Close a manually processed package request
      security:
        - AdminBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                note:
                  type: string
                  maxLength: 4000
              required:
                - id
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/yachts/facets:
    get:
      summary: Get facets across the matching published catalogue
      description: Same filters/publication gates as list. Aggregates every matching page, including listings beyond
        the first 24/1000.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CatalogFacets"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      parameters:
        - name: builderCountry
          in: query
          description: Country of the manufacturer, not vessel location. Repeat to match any selected country.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: hullMaterial
          in: query
          schema:
            type: string
        - name: minCabins
          in: query
          schema:
            type: integer
            minimum: 0
        - name: minGuests
          in: query
          schema:
            type: integer
            minimum: 0
  /api/charter-offers/facets:
    get:
      summary: Get facets across the matching published catalogue
      description: Same filters/publication gates as list. Aggregates every matching page, including listings beyond
        the first 24/1000.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CatalogFacets"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/charter-offers/{slug}:
    get:
      summary: Read one published, complete tourist charter offer
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterOffer"
        "400":
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Authentication required or revoked session
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Company permission or seller verification required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "409":
          description: Version, ownership or state conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Database or operation failed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
  /api/charter-offers/{slug}/quote:
    get:
      summary: Estimate a charter period without creating a request
      description: Server quote uses the same date and party rules as creation. Unknown capacity and calendars
        require operator confirmation. Creation rechecks availability under lock. Different component
        currencies return on_request rather than an invented sum.
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: guests
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
        - name: cabins
          in: query
          schema:
            type: integer
            minimum: 1
        - name: rentalOptionId
          in: query
          schema:
            type: string
        - name: cancellationOptionId
          in: query
          schema:
            type: string
        - name: cabinId
          in: query
          schema:
            type: string
        - name: waitingList
          in: query
          schema:
            type: boolean
            default: false
        - name: rateId
          in: query
          description: Published rate; enables the versioned booking quote response
          schema: {type: string}
        - name: unit
          in: query
          schema: {type: string, enum: [yacht, cabin, berth]}
        - name: extra
          in: query
          style: form
          explode: true
          schema: {type: array, items: {type: string}}
      responses:
        "200":
          description: Advisory quote; this does not confirm availability or take payment
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/CharterQuote"
                  - $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Invalid dates, guests or capacity
        "404":
          description: Published offer not found
        "409":
          description: Known blocked dates
        "503":
          description: Quote or availability data temporarily unavailable
  /api/charter-offers/{slug}/availability:
    get:
      summary: Read authoritative charter calendar availability
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Merged calendar, busy dates and sync freshness. A stale iCal available slot becomes on_request;
            busy blocks remain.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterAvailabilityView"
        "404":
          description: Offer is not published and complete
        "500":
          description: Availability could not be loaded
  /api/account/inquiries:
    get:
      summary: List all buyer inquiry history with pagination, text and status filters
      description: Only inquiries owned by the authenticated account or matching its verified email. The items field
        remains compatible; page describes the complete matching history.
      security:
        - UserBearerAuth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: perPage
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        - name: query
          in: query
          description: Inquiry ID or case-insensitive text in buyer, yacht or message.
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Owned inquiries
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InquiryPage"
        "401":
          description: Authentication required
  /api/account/inquiries/{id}:
    get:
      summary: Open an owned buyer inquiry directly, including older history
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Owned inquiry and message thread
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerLeadSummary"
        "401":
          description: Authentication required
        "404":
          description: Unknown or not owned by this account
  /api/account/inquiries/{id}/messages:
    post:
      summary: Reply to any owned buyer inquiry
      security:
        - UserBearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
                  minLength: 1
      responses:
        "202":
          description: Reply saved and delivery queued
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SellerLeadSummary"
        "400":
          description: Invalid message
        "401":
          description: Authentication required
        "404":
          description: Unknown or not owned by this account
  /api/admin/sale-listings/{id}/promotion:
    get:
      summary: Load the active promotion for a sale listing
      security: &a22
        - AdminBearerAuth: []
      parameters:
        - &a23
          name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Current promotion or null when inactive
          content:
            application/json:
              schema:
                type: object
                required:
                  - item
                properties:
                  item:
                    anyOf:
                      - $ref: "#/components/schemas/ListingPromotion"
                      - type: "null"
        "401": &a24
          description: Authentication required
        "403": &a25
          description: Administrator role required
        "404": &a26
          description: Sale listing not found
    post:
      summary: Activate or update a sale placement by agreement without a charge
      description: Requires a published sale listing and verified seller. Serialized per listing; repeated requests
        retain the active promotion ID. Expiry durably updates the search index.
      security: *a22
      parameters:
        - *a23
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ManualSalePromotionRequest"
      responses:
        "200":
          description: Active sale promotion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListingPromotion"
        "400": &a27
          description: Invalid terms, expiry or missing agreement note
        "401": *a24
        "403": *a25
        "404": *a26
        "409": &a28
          description: Listing is not published or seller is not verified
    delete:
      summary: Stop an agreed sale placement without charging the seller
      description: Idempotent when no promotion is active; records the required agreement note and durably updates
        the search index.
      security: *a22
      parameters:
        - *a23
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agreementNote
              properties:
                agreementNote:
                  type: string
                  minLength: 1
                  maxLength: 4000
      responses:
        "200":
          description: Promotion stopped
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - stopped
        "400": *a27
        "401": *a24
        "403": *a25
        "404": *a26
        "409": *a28
  /api/marketplace/seo-pages:
    get:
      tags:
        - Marketplace
      operationId: getMarketplaceSEOPages
      summary: Read published editorial editions and full-scope readiness
      description: Without resolve, returns published pages only; optional kind/locale filters. resolve=1 resolves
        an exact kind/category/location/builder scope and returns independent RU/EN readiness, without draft
        text, authors or history. Unknown scopes return 404.
      parameters:
        - in: query
          name: kind
          schema: &a29
            type: string
            description: Local image path or public HTTPS PNG/JPG/WebP image URL (including configured media CDN).
          required: false
        - in: query
          name: locale
          schema: *a29
          required: false
        - in: query
          name: category
          schema: *a29
          required: false
        - in: query
          name: location
          schema: *a29
          required: false
        - in: query
          name: builder
          schema: *a29
          required: false
        - in: query
          name: resolve
          schema: *a29
          required: false
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/MarketSEOView"
                required:
                  - items
        "400":
          description: Invalid body or ID
        "401":
          description: Authentication required
        "403":
          description: Platform administrator required
        "404":
          description: Unknown page, category, location or builder
        "409":
          description: Stale version or duplicate page key
        "503":
          description: Storage temporarily unavailable
  /api/admin/marketplace/seo-pages:
    get:
      tags: &a30
        - Marketplace
      security: &a31
        - AdminBearerAuth: []
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/MarketSEORecord"
                required:
                  - items
        "400":
          description: Invalid body or ID
        "401":
          description: Authentication required
        "403":
          description: Platform administrator required
        "404":
          description: Unknown page, category, location or builder
        "409":
          description: Stale version or duplicate page key
        "503":
          description: Storage temporarily unavailable
      parameters:
        - in: query
          name: kind
          schema: *a29
          required: false
        - in: query
          name: locale
          schema: *a29
          required: false
      operationId: listAdminMarketplaceSEOPages
      summary: List editorial drafts, history and readiness
    post:
      tags: &a32
        - Marketplace
      security: &a33
        - AdminBearerAuth: []
      requestBody: &a34
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarketSEOInput"
      responses: &a35
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketSEORecord"
        "400":
          description: Invalid body or ID
        "401":
          description: Authentication required
        "403":
          description: Platform administrator required
        "404":
          description: Unknown page, category, location or builder
        "409":
          description: Stale version or duplicate page key
        "503":
          description: Storage temporarily unavailable
      operationId: createAdminMarketplaceSEOPage
      summary: Create a versioned editorial draft
  /api/admin/marketplace/seo-pages/{id}:
    get:
      tags: *a30
      security: *a31
      responses:
        "200":
          description: Successful result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarketSEORecord"
        "400":
          description: Invalid body or ID
        "401":
          description: Authentication required
        "403":
          description: Platform administrator required
        "404":
          description: Unknown page, category, location or builder
        "409":
          description: Stale version or duplicate page key
        "503":
          description: Storage temporarily unavailable
      parameters:
        - &a36
          in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      operationId: getAdminMarketplaceSEOPage
      summary: Read a private editorial revision and preview data
    put:
      tags: *a32
      security: *a33
      requestBody: *a34
      responses: *a35
      parameters:
        - *a36
      operationId: updateAdminMarketplaceSEOPage
      summary: Save, publish or unpublish one reviewed language edition
  /api/models:
    get:
      tags:
        - Catalogue
      summary: List approved catalogue entries; no inventory or price claims
      parameters: &a38
        - in: query
          name: kind
          schema: &a37
            type: string
        - in: query
          name: builder
          schema: *a37
        - in: query
          name: series
          schema: *a37
        - in: query
          name: q
          schema: *a37
        - in: query
          name: slug
          schema: *a37
        - in: query
          name: locale
          schema: *a37
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
        - in: query
          name: perPage
          schema:
            type: integer
            minimum: 1
        - in: query
          name: vesselType
          schema:
            type: string
            enum:
              - motor
              - sailing
              - catamaran
              - boats
          description: Compact model group. Stored canonical vessel taxonomy values and legacy category spellings are
            normalized. Empty means all types.
        - in: query
          name: minLength
          schema:
            type: number
            exclusiveMinimum: 0
            maximum: 350
          description: Inclusive length bound in metres. Valid LOA takes priority, otherwise valid hull length. Unknown
            lengths are excluded when either bound is set. Empty means no bound; minLength must not exceed
            maxLength.
        - in: query
          name: maxLength
          schema:
            type: number
            exclusiveMinimum: 0
            maximum: 350
          description: Inclusive length bound in metres. Valid LOA takes priority, otherwise valid hull length. Unknown
            lengths are excluded when either bound is set. Empty means no bound; minLength must not exceed
            maxLength.
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - name
              - length-asc
              - length-desc
          description: Applied to the whole matching catalogue before pagination. Unknown length sorts last in either
            length order; name then entry key breaks ties. Empty preserves legacy entry-key order.
      responses:
        "200":
          description: Paginated catalogue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CataloguePage"
        "400":
          description: "validation_error: invalid vesselType, sort, non-finite/non-positive/out-of-range length or
            reversed bounds"
        "503":
          description: Catalogue unavailable
  /api/catalogue:
    get:
      tags:
        - Catalogue
      summary: List approved catalogue entries; no inventory or price claims
      parameters: *a38
      responses:
        "200":
          description: Paginated catalogue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CataloguePage"
        "400":
          description: "validation_error: invalid vesselType, sort, non-finite/non-positive/out-of-range length or
            reversed bounds"
        "503":
          description: Catalogue unavailable
  /api/admin/catalogue/entries:
    get:
      tags:
        - Catalogue
      summary: List catalogue drafts, revisions and publication blockers
      parameters: *a38
      security: &a39
        - bearerAuth: []
      responses:
        "200":
          description: Paginated catalogue
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CataloguePage"
        "400":
          description: "validation_error: invalid vesselType, sort, non-finite/non-positive/out-of-range length or
            reversed bounds"
        "401":
          description: Sign in required
        "403":
          description: Administrator required
        "503":
          description: Catalogue unavailable
    post:
      tags:
        - Catalogue
      summary: Save, publish or unpublish a versioned catalogue revision
      security: *a39
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                entry:
                  $ref: "#/components/schemas/CatalogueEntry"
                version:
                  type: integer
                  minimum: 0
                action:
                  type: string
                  enum:
                    - save
                    - publish
                    - unpublish
                note: *a37
      responses:
        "200":
          description: Saved revision
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CatalogueEntry"
        "400":
          description: Invalid record or missing publication evidence
        "401":
          description: Sign in required
        "403":
          description: Administrator required
        "409":
          description: Version conflict
        "503":
          description: Unavailable
  /api/models/{slug}:
    get:
      tags:
        - Catalogue
      summary: Read one approved model directly
      parameters:
        - in: path
          name: slug
          required: true
          schema: *a37
        - in: query
          name: locale
          schema:
            type: string
            enum:
              - ru
              - en
      responses:
        "200":
          description: Approved model snapshot
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CatalogueEntry"
        "404":
          description: Unknown or unpublished model
        "503":
          description: Unavailable
  /api/admin/catalogue/runs:
    get:
      tags:
        - Catalogue
      summary: Review repeatable import runs, conflicts and row errors
      security: *a39
      responses:
        "200":
          description: Latest 100 import runs
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/CatalogueRun"
        "401":
          description: Sign in required
        "403":
          description: Administrator required
  /api/admin/catalogue/checks:
    get:
      tags:
        - Catalogue
      summary: Latest official source checks
      security: *a39
      responses:
        "200":
          description: Checks
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        entryKey: *a37
                        kind: *a37
                        checkedAt: *a37
                        status: *a37
                        hash: *a37
                        error: *a37
        "401":
          description: Sign in required
        "403":
          description: Administrator required
    post:
      tags:
        - Catalogue
      summary: Queue an official lineup or contact review
      security: *a39
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - builder
                slug: *a37
                mode:
                  type: string
                  enum:
                    - lineup
                    - contacts
      responses:
        "202":
          description: Durable queued check
        "400":
          description: Invalid request
        "401":
          description: Sign in required
        "403":
          description: Administrator required
  /api/admin/catalogue/imports/preview:
    post:
      tags:
        - Catalogue
      summary: Validate a manifest without writing catalogue records
      security: *a39
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                entries:
                  type: array
                  items:
                    $ref: "#/components/schemas/CatalogueEntry"
      responses:
        "200":
          description: New records, changes, manual-field conflicts and errors
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CatalogueRun"
        "400":
          description: Invalid file
        "401":
          description: Sign in required
        "403":
          description: Administrator required
  /api/admin/catalogue/imports:
    post:
      tags:
        - Catalogue
      summary: Atomically queue a valid preview for restart-safe draft import
      security: *a39
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runId:
                  type: string
                  format: uuid
      responses:
        "202":
          description: Queued import
        "400":
          description: Invalid run ID
        "401":
          description: Sign in required
        "403":
          description: Administrator required
        "404":
          description: Unknown preview
        "409":
          description: Invalid or already submitted preview
  /api/account/catalogue/builders:
    get:
      tags:
        - Catalogue
      summary: Private name-only manufacturer references for listing forms; no draft profiles or media
      security: *a39
      responses:
        "200":
          description: Manufacturer names
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        slug: *a37
                        name: *a37
                        country: *a37
        "401":
          description: Sign in required
        "503":
          description: Unavailable
  /api/admin/catalogue/coverage:
    get:
      tags:
        - Catalogue
      summary: Count all prepared entries, approved revisions, candidate outcomes and publication blockers
      security: *a39
      responses:
        "200":
          description: Coverage, without page-size truncation
          content:
            application/json:
              schema:
                type: object
                properties:
                  totals:
                    type: object
                    additionalProperties:
                      type: integer
                  published:
                    type: object
                    additionalProperties:
                      type: integer
                  candidateStatuses:
                    type: object
                    additionalProperties:
                      type: integer
                  blockers:
                    type: object
                    additionalProperties:
                      type: integer
                  builderCoverage:
                    type: array
                    items:
                      type: object
                      properties:
                        slug: *a37
                        name: *a37
                        review:
                          $ref: "#/components/schemas/CatalogueRangeReview"
                        preparedModels:
                          type: integer
                        withTechnicalData:
                          type: integer
                        publishedModels:
                          type: integer
                        withoutPhotographs:
                          type: integer
        "401":
          description: Sign in required
        "403":
          description: Administrator required
        "503":
          description: Unavailable
  /api/charter-offers/{slug}/booking-options:
    get:
      tags:
        - Charter booking
      summary: Published booking terms and real availability periods
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/charter-offers/{slug}/booking-quote:
    get:
      tags:
        - Charter booking
      summary: Calculate booking quote in exact minor units
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: query
          name: startDate
          required: true
          schema:
            type: string
        - in: query
          name: endDate
          required: true
          schema:
            type: string
        - in: query
          name: guests
          required: true
          schema:
            type: integer
            minimum: 1
        - in: query
          name: unit
          required: true
          schema:
            type: string
        - in: query
          name: cabinId
          required: false
          schema:
            type: string
        - in: query
          name: rateId
          required: true
          schema:
            type: string
        - in: query
          name: extra
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/charter/checkouts:
    post:
      tags:
        - Charter booking
      summary: Create, restore, update or submit charter checkout
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/charter/checkouts/{id}:
    get:
      tags:
        - Charter booking
      summary: Create, restore, update or submit charter checkout
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    patch:
      tags:
        - Charter booking
      summary: Create, restore, update or submit charter checkout
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/charter/checkouts/{id}/submit:
    post:
      tags:
        - Charter booking
      summary: Create, restore, update or submit charter checkout
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/account/charter-bookings:
    get:
      tags:
        - Charter booking
      summary: "Unified booking CRM: server filters, global counts and legacy requests"
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
        - in: query
          name: perPage
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: string
        - in: query
          name: payment
          schema:
            type: string
        - in: query
          name: dateFrom
          schema:
            type: string
        - in: query
          name: dateTo
          schema:
            type: string
        - in: query
          name: offerSlug
          schema:
            type: string
        - in: query
          name: company
          schema:
            type: string
        - in: query
          name: assignee
          schema:
            type: string
        - in: query
          name: view
          schema:
            type: string
        - in: query
          name: sort
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceCommerceCRMResponse"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/account/charter-bookings/{id}:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/account/charter-bookings/{id}/actions:
    post:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-bookings:
    get:
      tags:
        - Charter booking
      summary: "Unified booking CRM: server filters, global counts and legacy requests"
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
        - in: query
          name: perPage
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: string
        - in: query
          name: payment
          schema:
            type: string
        - in: query
          name: dateFrom
          schema:
            type: string
        - in: query
          name: dateTo
          schema:
            type: string
        - in: query
          name: offerSlug
          schema:
            type: string
        - in: query
          name: company
          schema:
            type: string
        - in: query
          name: assignee
          schema:
            type: string
        - in: query
          name: view
          schema:
            type: string
        - in: query
          name: sort
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceCommerceCRMResponse"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-bookings/{id}:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-bookings/{id}/actions:
    post:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-bookings:
    get:
      tags:
        - Charter booking
      summary: "Unified booking CRM: server filters, global counts and legacy requests"
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            minimum: 1
        - in: query
          name: perPage
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: string
        - in: query
          name: payment
          schema:
            type: string
        - in: query
          name: dateFrom
          schema:
            type: string
        - in: query
          name: dateTo
          schema:
            type: string
        - in: query
          name: offerSlug
          schema:
            type: string
        - in: query
          name: company
          schema:
            type: string
        - in: query
          name: assignee
          schema:
            type: string
        - in: query
          name: view
          schema:
            type: string
        - in: query
          name: sort
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceCommerceCRMResponse"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-bookings/{id}:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-bookings/{id}/actions:
    post:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-bookings/{id}/test-events:
    post:
      tags:
        - Charter booking
      summary: Local administrator-only payment or payout test event
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-offers/{slug}/booking-cabins:
    post:
      tags:
        - Charter booking
      summary: Add an actual vessel cabin for verified physical mapping
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-offers/{slug}/booking-cabins:
    post:
      tags:
        - Charter booking
      summary: Add an actual vessel cabin for verified physical mapping
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-offers/{slug}/booking-terms:
    get:
      tags:
        - Charter booking
      summary: Read or version operator booking terms
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    put:
      tags:
        - Charter booking
      summary: Read or version operator booking terms
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-offers/{slug}/booking-terms:
    get:
      tags:
        - Charter booking
      summary: Read or version operator booking terms
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    put:
      tags:
        - Charter booking
      summary: Read or version operator booking terms
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceCommand"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/charter/payments/webhooks/{provider}:
    post:
      tags:
        - Charter booking
      summary: Payment webhook boundary (live providers disabled)
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceResult"
        "400":
          description: Validation failed
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/account/charter-bookings/{id}/manifest:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    put:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceBookingManifestRequest"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/seller/charter-bookings/{id}/manifest:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    put:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceBookingManifestRequest"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/admin/charter-bookings/{id}/manifest:
    get:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
    put:
      tags:
        - Charter booking
      summary: Read or transition a charter booking
      description: Private checkout and order responses use private, no-store and noindex. Money.amount is a decimal string in
        integer minor units; precision determines its scale. Crypto atomic amounts are strings; asset and network must
        match the invoice. Test adapters require explicit loopback-only configuration and are unavailable in production.
        Repeated commands are protected by idempotency keys, versions and provider event IDs. The public legacy quote
        remains compatible; rateId switches it to this versioned commerce calculation.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      security:
        - UserBearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CharterCommerceBookingManifestRequest"
      responses:
        "200":
          description: Requested resource or completed transition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CharterCommerceBookingManifest"
        "400":
          description: Validation failed
        "401":
          description: Sign in required
        "403":
          description: Role is not permitted
        "404":
          description: Unknown or inaccessible object
        "409":
          description: Inventory, version, price or state conflict
        "503":
          description: Service or real payment provider unavailable
  /api/account/purchases:
    get:
      operationId: listAccountPurchases
      summary: List purchases in the current workspace
      security:
        - UserBearerAuth: []
      parameters:
        - {"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchasePage"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
  /api/account/purchases/{id}:
    get:
      operationId: readAccountPurchase
      summary: Read a yacht purchase and server-authorised actions
      security:
        - UserBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
    post:
      operationId: actOnAccountPurchase
      summary: Apply an action to the purchase version
      security:
        - UserBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"$ref":"#/components/schemas/SalePurchaseCommand"}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/seller/purchases:
    get:
      operationId: listSellerPurchases
      summary: List purchases in the current workspace
      security:
        - SellerBearerAuth: []
      parameters:
        - {"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchasePage"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
  /api/seller/purchases/{id}:
    get:
      operationId: readSellerPurchase
      summary: Read a yacht purchase and server-authorised actions
      security:
        - SellerBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
    post:
      operationId: actOnSellerPurchase
      summary: Apply an action to the purchase version
      security:
        - SellerBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"$ref":"#/components/schemas/SalePurchaseCommand"}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/admin/purchases:
    get:
      operationId: listAdminPurchases
      summary: List purchases in the current workspace
      security:
        - AdminBearerAuth: []
      parameters:
        - {"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchasePage"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
  /api/admin/purchases/{id}:
    get:
      operationId: readAdminPurchase
      summary: Read a yacht purchase and server-authorised actions
      security:
        - AdminBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
    post:
      operationId: actOnAdminPurchase
      summary: Apply an action to the purchase version
      security:
        - AdminBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"$ref":"#/components/schemas/SalePurchaseCommand"}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/SalePurchaseResult"}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/seller/purchases/from-inquiry/{id}:
    post:
      operationId: prepareSalePurchase
      summary: Open the existing deal from a verified sale inquiry
      security:
        - SellerBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"dealId":{"type":"string"}},"required":["dealId"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/reviews/{kind}/{slug}:
    get:
      operationId: publicTransactionReviews
      summary: Read published reviews and aggregates
      parameters:
        - {"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["charter","sale"]}}
        - {"name":"slug","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"$ref":"#/components/schemas/PublicTransactionReviews"}
  /api/account/reviews/{kind}/{id}:
    get:
      operationId: getMyTransactionReview
      summary: Check eligibility and read an existing review
      security:
        - UserBearerAuth: []
      parameters:
        - {"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["charter","sale"]}}
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"eligible":{"type":"boolean"},"review":{"$ref":"#/components/schemas/TransactionReview"}},"required":["eligible"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
    post:
      operationId: submitTransactionReview
      summary: Submit one review for a completed purchase or charter
      security:
        - UserBearerAuth: []
      parameters:
        - {"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["charter","sale"]}}
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"type":"object","properties":{"score":{"type":"integer","minimum":1,"maximum":10},"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["score","body"]}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"eligible":{"type":"boolean"},"review":{"$ref":"#/components/schemas/TransactionReview"}},"required":["eligible"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/seller/reviews:
    get:
      operationId: listSellerTransactionReviews
      summary: List reviews for the current workspace
      security:
        - SellerBearerAuth: []
      parameters:
        - {"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionReview"}},"page":{"type":"integer","minimum":1}},"required":["items","page"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
  /api/seller/reviews/{id}:
    post:
      operationId: manageSellerTransactionReview
      summary: Reply to or moderate a transaction review
      security:
        - SellerBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"type":"object","properties":{"action":{"type":"string","enum":["reply","publish","reject","publish_reply","reject_reply"]},"version":{"type":"integer","minimum":1},"body":{"type":"string"},"note":{"type":"string"}},"required":["action","version"]}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"review":{"$ref":"#/components/schemas/TransactionReview"}},"required":["review"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
  /api/admin/reviews:
    get:
      operationId: listAdminTransactionReviews
      summary: List reviews for the current workspace
      security:
        - AdminBearerAuth: []
      parameters:
        - {"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionReview"}},"page":{"type":"integer","minimum":1}},"required":["items","page"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
  /api/admin/reviews/{id}:
    post:
      operationId: manageAdminTransactionReview
      summary: Reply to or moderate a transaction review
      security:
        - AdminBearerAuth: []
      parameters:
        - {"name":"id","in":"path","required":true,"schema":{"type":"string"}}
      requestBody:
        required: true
        content:
          application/json:
            schema: {"type":"object","properties":{"action":{"type":"string","enum":["reply","publish","reject","publish_reply","reject_reply"]},"version":{"type":"integer","minimum":1},"body":{"type":"string"},"note":{"type":"string"}},"required":["action","version"]}
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema: {"type":"object","properties":{"review":{"$ref":"#/components/schemas/TransactionReview"}},"required":["review"]}
        "401":
          description: Sign-in required
        "403":
          description: Insufficient role
        "404":
          description: Unknown or inaccessible object
        "400":
          description: Invalid input
        "409":
          description: State, version or event conflict
components:
  securitySchemes:
    UserBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    SellerBearerAuth:
      type: http
      scheme: bearer
      description: Seller/admin JWT. Local SELLER_API_TOKEN fallback is disabled unless ALLOW_LEGACY_ADMIN_TOKEN=true.
    AdminBearerAuth:
      type: http
      scheme: bearer
      description: Admin JWT. Local SELLER_API_TOKEN fallback is disabled unless ALLOW_LEGACY_ADMIN_TOKEN=true.
    PartnerBearerAuth:
      type: http
      scheme: bearer
      description: Partner API token generated by admin API key endpoints.
  responses:
    NotFound:
      description: Resource was not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    ServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    PartnerUnauthorized:
      description: Missing, invalid, revoked or expired partner token. The WWW-Authenticate header is set.
      headers:
        WWW-Authenticate:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    PartnerForbidden:
      description: The token is valid but does not grant the scope required by the endpoint.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    PartnerValidationError:
      description: Request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
    PartnerRateLimited:
      description: Per-minute rate limit or daily quota is exhausted.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorResponse"
  schemas:
    CharterTripPreview: {"type":"object","properties":{"status":{"type":"string","enum":["available","on_request","unavailable"]},"priceStatus":{"type":"string","enum":["firm","estimated","on_request"]},"nights":{"type":"integer","minimum":1},"total":{"$ref":"#/components/schemas/CharterCommerceMoney"},"onSite":{"$ref":"#/components/schemas/CharterCommerceMoney"},"deposit":{"$ref":"#/components/schemas/CharterCommerceMoney"},"freeCancellationUntil":{"type":"string","format":"date"},"rateId":{"type":"string"},"unit":{"type":"string","enum":["yacht","cabin","berth"]},"cabinId":{"type":"string"},"canInstantBook":{"type":"boolean"},"canRequest":{"type":"boolean"}},"required":["status","canInstantBook","canRequest"]}
    TransactionRating: {"type":"object","properties":{"count":{"type":"integer","minimum":0},"average":{"type":"number","minimum":0,"maximum":10}},"required":["count","average"]}
    TransactionReview: {"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["charter","sale"]},"transactionId":{"type":"string"},"offerSlug":{"type":"string"},"score":{"type":"integer","minimum":1,"maximum":10},"body":{"type":"string","maxLength":2000},"state":{"type":"string","enum":["pending","published","rejected"]},"reply":{"type":"string"},"replyState":{"type":"string","enum":["pending","published","rejected"]},"moderationNote":{"type":"string"},"version":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","offerSlug","score","body","createdAt"]}
    PublicTransactionReviews: {"type":"object","properties":{"reviews":{"type":"array","items":{"$ref":"#/components/schemas/TransactionReview"}},"subject":{"$ref":"#/components/schemas/TransactionRating"},"seller":{"$ref":"#/components/schemas/TransactionRating"}},"required":["reviews","subject","seller"]}
    SalePurchaseTerms: {"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD"]},"totalMinor":{"type":"string","pattern":"^[0-9]+$"},"depositMinor":{"type":"string","pattern":"^[0-9]+$"},"agreement":{"type":"string"}},"required":["currency","totalMinor","depositMinor","agreement"]}
    SalePurchaseInvoice: {"allOf":[{"$ref":"#/components/schemas/CharterCommerceAttempt"},{"type":"object","properties":{"stage":{"type":"string","enum":["awaiting_deposit","awaiting_balance"]},"received":{"$ref":"#/components/schemas/CharterCommerceMoney"},"receiptIssue":{"type":"string","enum":["wrong_network","amount_mismatch","late_receipt"]},"receivedNetwork":{"type":"string"}},"required":["stage"]}]}
    SalePurchase: {"type":"object","properties":{"id":{"type":"string"},"yacht":{"type":"string"},"slug":{"type":"string"},"state":{"anyOf":[{"type":"string","enum":["proposed","awaiting_escrow","awaiting_deposit","awaiting_balance","awaiting_handover","awaiting_release","refund_required","completed","cancelled"]},{"const":""}]},"version":{"type":"integer","minimum":0},"terms":{"$ref":"#/components/schemas/SalePurchaseTerms"},"escrowReference":{"type":"string"},"buyerHandover":{"type":"boolean"},"sellerHandover":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/SalePurchaseInvoice"}},"ledger":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["escrow_received","unallocated","refunded","released"]},"invoiceId":{"type":"string"},"eventId":{"type":"string"},"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"at":{"type":"string","format":"date-time"}},"required":["kind","amount","at"]}},"history":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["propose","accept","open_escrow","invoice","test_receipt","handover","release","cancel","refund"]},"at":{"type":"string","format":"date-time"},"by":{"type":"string","enum":["account","seller","admin"]},"note":{"type":"string"}},"required":["action","at","by"]}},"allowedActions":{"anyOf":[{"type":"array","items":{"type":"string","enum":["propose","accept","open_escrow","invoice","test_receipt","handover","release","cancel","refund"]}},{"type":"null"}]}},"required":["id","yacht","slug","state","version","terms","invoices","ledger","history"]}
    SalePurchaseCommand: {"type":"object","properties":{"action":{"type":"string","enum":["propose","accept","open_escrow","invoice","test_receipt","handover","release","cancel","refund"]},"version":{"type":"integer","minimum":0},"terms":{"$ref":"#/components/schemas/SalePurchaseTerms"},"method":{"type":"string","enum":["test_bank","test_crypto"]},"settlement":{"type":"string","enum":["convert","native"]},"invoiceId":{"type":"string"},"eventId":{"type":"string"},"result":{"type":"string","enum":["authorized","captured","failed"]},"amountMinor":{"type":"string","pattern":"^[0-9]+$"},"network":{"type":"string"},"note":{"type":"string"}},"required":["action","version"]}
    SalePurchaseResult: {"type":"object","properties":{"purchase":{"$ref":"#/components/schemas/SalePurchase"},"invoice":{"$ref":"#/components/schemas/SalePurchaseInvoice"}},"required":["purchase"]}
    SalePurchasePage: {"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SalePurchase"}},"page":{"type":"integer","minimum":1},"perPage":{"type":"integer","minimum":1},"totalItems":{"type":"integer","minimum":0}},"required":["items","page","perPage","totalItems"]}
    CharterCommerceAmendment: {"properties":{"after":{"$ref":"#/components/schemas/CharterCommerceQuote"},"before":{"$ref":"#/components/schemas/CharterCommerceQuote"},"createdAt":{"type":"string"},"delta":{"$ref":"#/components/schemas/CharterCommerceMoney"},"deltaDirection":{"type":"string"},"dueNow":{"$ref":"#/components/schemas/CharterCommerceMoney"},"expires":{"type":"string"},"extrasQuoteId":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"note":{"type":"string"},"originalExpires":{"type":"string"},"originalState":{"type":"string"},"refundDue":{"$ref":"#/components/schemas/CharterCommerceMoney"},"requestedBy":{"type":"string"},"requestedSelection":{"$ref":"#/components/schemas/CharterCommerceSelection"},"state":{"type":"string"},"updatedAt":{"type":"string"},"version":{"type":"integer"}},"required":["id","version","state","before","after","delta","deltaDirection","dueNow","refundDue","expires","createdAt","updatedAt","note"],"type":"object"}
    CharterCommerceAttempt: {"properties":{"allowedReconciliationResolutions":{"items":{"type":"string"},"type":"array"},"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"asset":{"type":"string"},"atomic":{"type":"string"},"changeId":{"type":"string"},"charge":{"$ref":"#/components/schemas/CharterCommerceMoney"},"created":{"type":"string"},"exchangeRate":{"type":"string"},"expires":{"type":"string"},"fee":{"$ref":"#/components/schemas/CharterCommerceMoney"},"id":{"type":"string"},"method":{"type":"string"},"network":{"type":"string"},"observed":{"$ref":"#/components/schemas/CharterCommerceObservedReceipt"},"precision":{"type":"integer"},"recognizedAmount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"refunded":{"type":"string"},"settlement":{"type":"string"},"settlementCurrency":{"type":"string"},"source":{"type":"string"},"state":{"type":"string"}},"required":["charge","fee","source","settlementCurrency","id","method","state","amount","settlement","expires","created","refunded"],"type":"object"}
    CharterCommerceAudit: {"properties":{"action":{"type":"string"},"actor":{"type":"string"},"created":{"type":"string"},"id":{"type":"string"},"note":{"type":"string"}},"required":["id","actor","action","created"],"type":"object"}
    CharterCommerceBaseContext: {"properties":{"address":{"additionalProperties":{"type":"string"},"type":"object"},"city":{"type":"string"},"country":{"type":"string"},"id":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"location":{"additionalProperties":{"type":"string"},"type":"object"},"locationId":{"type":"string"},"marina":{"type":"string"},"name":{"additionalProperties":{"type":"string"},"type":"object"},"slug":{"type":"string"}},"required":[],"type":"object"}
    CharterCommerceBoardingContext: {"properties":{"checkIn":{"type":"string"},"checkOut":{"type":"string"},"returnCondition":{"additionalProperties":{"type":"string"},"type":"object"},"timezone":{"type":"string"}},"required":["timezone","checkIn","checkOut"],"type":"object"}
    CharterCommerceBookingContext: {"properties":{"base":{"$ref":"#/components/schemas/CharterCommerceBaseContext"},"boarding":{"$ref":"#/components/schemas/CharterCommerceBoardingContext"},"operator":{"$ref":"#/components/schemas/CharterCommerceOperatorContext"},"version":{"type":"integer"},"vessel":{"$ref":"#/components/schemas/CharterCommerceVesselContext"}},"required":["version","vessel","base","operator","boarding"],"type":"object"}
    CharterCommerceBookingManifest: {"properties":{"canEdit":{"type":"boolean"},"guestLimit":{"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/CharterCommerceGuestManifestEntry"},"type":"array"},"version":{"type":"integer"}},"required":["version","items","canEdit","guestLimit"],"type":"object"}
    CharterCommerceBookingManifestRequest: {"properties":{"idempotencyKey":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/CharterCommerceGuestManifestRequest"},"type":"array"},"version":{"type":"integer"}},"required":["version","idempotencyKey","items"],"type":"object"}
    CharterCommerceCRM: {"properties":{"assignedTo":{"type":"string"},"firstResponseAt":{"type":"string"},"internalNotes":{"items":{"$ref":"#/components/schemas/CharterCommerceInternalNote"},"type":"array"},"nextAction":{"type":"string"},"nextActionAt":{"type":"string"},"overdue":{"type":"boolean"},"responseDueAt":{"type":"string"},"tasks":{"items":{"$ref":"#/components/schemas/CharterCommerceTask"},"type":"array"}},"required":["tasks","overdue"],"type":"object"}
    CharterCommerceCabin: {"properties":{"capacity":{"type":"integer"},"id":{"type":"string"},"name":{"type":"string"},"resourceId":{"type":"string"}},"required":["id","name","capacity","resourceId"],"type":"object"}
    CharterCommerceCancellationPreview: {"properties":{"asOf":{"type":"string"},"manualReview":{"type":"boolean"},"orderVersion":{"type":"integer"},"paid":{"$ref":"#/components/schemas/CharterCommerceMoney"},"policy":{"items":{"$ref":"#/components/schemas/CharterCommerceCancellationRule"},"type":"array"},"quoteId":{"type":"string"},"reasons":{"items":{"type":"string"},"type":"array"},"refund":{"$ref":"#/components/schemas/CharterCommerceMoney"},"retained":{"$ref":"#/components/schemas/CharterCommerceMoney"}},"required":["quoteId","asOf","refund","retained","paid","manualReview","reasons","policy","orderVersion"],"type":"object"}
    CharterCommerceCancellationRule: {"properties":{"daysBefore":{"type":"integer"},"refundPercent":{"type":"integer"}},"required":["daysBefore","refundPercent"],"type":"object"}
    CharterCommerceCharterBookingPriceSummary: {"properties":{"basis":{"type":"string"},"cancellationExtraAmount":{"type":"integer"},"cancellationExtraCurrency":{"type":"string"},"charterAmount":{"type":"integer"},"currency":{"type":"string"},"dueNowAmount":{"type":"integer"},"estimatedTotalAmount":{"type":"integer"},"mandatoryCostsAmount":{"type":"integer"},"mandatoryCostsCurrency":{"type":"string"},"nights":{"type":"integer"},"payAtCheckInAmount":{"type":"integer"},"rentalExtraAmount":{"type":"integer"},"rentalExtraCurrency":{"type":"string"},"securityDepositAmount":{"type":"integer"},"securityDepositCurrency":{"type":"string"},"status":{"type":"string"},"version":{"type":"integer"}},"required":["status","charterAmount","estimatedTotalAmount","dueNowAmount","payAtCheckInAmount","currency"],"type":"object"}
    CharterCommerceCharterBookingRequest: {"properties":{"activatedAt":{"type":"string"},"assignedTo":{"type":"string"},"bookingMode":{"type":"string"},"bookingOrderId":{"type":"string"},"cabinId":{"type":"string"},"cabinName":{"type":"string"},"calendarSource":{"type":"string"},"cancellationOptionId":{"type":"string"},"cancellationTitle":{"additionalProperties":{"type":"string"},"type":"object"},"createdAt":{"type":"string"},"email":{"type":"string"},"endDate":{"type":"string"},"escalatedAt":{"type":"string"},"expiresAt":{"type":"string"},"firstResponseAt":{"type":"string"},"guestCount":{"type":"integer"},"holderConfirmationDueAt":{"type":"string"},"id":{"type":"string"},"lostReason":{"type":"string"},"message":{"type":"string"},"model":{"type":"string"},"name":{"type":"string"},"nights":{"type":"integer"},"notes":{"items":{"$ref":"#/components/schemas/CharterCommerceCharterRequestNote"},"type":"array"},"offerSellerId":{"type":"string"},"offerSlug":{"type":"string"},"operatorName":{"type":"string"},"phone":{"type":"string"},"price":{"$ref":"#/components/schemas/CharterCommerceCharterBookingPriceSummary"},"queuePosition":{"type":"integer"},"queuedAt":{"type":"string"},"rentalOptionId":{"type":"string"},"rentalOptionLabel":{"additionalProperties":{"type":"string"},"type":"object"},"responseDueAt":{"type":"string"},"responseState":{"type":"string"},"startDate":{"type":"string"},"status":{"type":"string"},"termsAccepted":{"type":"boolean"},"updatedAt":{"type":"string"},"yachtName":{"type":"string"}},"required":["id","offerSlug","yachtName","model","operatorName","status","bookingMode","startDate","endDate","nights","name","email","termsAccepted","price","createdAt","updatedAt"],"type":"object"}
    CharterCommerceCharterRequestNote: {"properties":{"authorRole":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"id":{"type":"string"},"status":{"type":"string"}},"required":["body"],"type":"object"}
    CharterCommerceCheckout: {"properties":{"bookingContext":{"$ref":"#/components/schemas/CharterCommerceBookingContext"},"contact":{"$ref":"#/components/schemas/CharterCommerceContact"},"created":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"model":{"type":"string"},"name":{"type":"string"},"orderId":{"type":"string"},"quote":{"$ref":"#/components/schemas/CharterCommerceQuote"},"selection":{"$ref":"#/components/schemas/CharterCommerceSelection"},"updated":{"type":"string"},"version":{"type":"integer"}},"required":["name","id","version","selection","contact","quote","created","updated"],"type":"object"}
    CharterCommerceCommand: {"properties":{"acceptQuote":{"type":"string"},"action":{"type":"string"},"amount":{"type":"string"},"asset":{"type":"string"},"assignedTo":{"type":"string"},"atomic":{"type":"string"},"attemptId":{"type":"string"},"cabin":{"$ref":"#/components/schemas/CharterCommerceCabin"},"changeId":{"type":"string"},"contact":{"$ref":"#/components/schemas/CharterCommerceContact"},"currency":{"type":"string"},"dueAt":{"type":"string"},"event":{"type":"string"},"eventId":{"type":"string"},"exchangeRate":{"type":"string"},"id":{"type":"string"},"idempotencyKey":{"type":"string"},"intake":{"$ref":"#/components/schemas/CharterCommerceIntake"},"message":{"type":"string"},"method":{"type":"string"},"network":{"type":"string"},"note":{"type":"string"},"offerSlug":{"type":"string"},"payoutId":{"type":"string"},"precision":{"type":"integer"},"reference":{"type":"string"},"resolution":{"type":"string"},"selection":{"$ref":"#/components/schemas/CharterCommerceSelection"},"settlement":{"type":"string"},"status":{"type":"string"},"taskId":{"type":"string"},"terms":{"$ref":"#/components/schemas/CharterCommerceTerms"},"termsAccepted":{"type":"boolean"},"title":{"type":"string"},"version":{"type":"integer"}},"required":["intake","cabin","action","selection","contact","terms","termsAccepted"],"type":"object"}
    CharterCommerceCommerceCRMFacets: {"properties":{"assignees":{"items":{"$ref":"#/components/schemas/CharterCommerceCommerceChoice"},"type":"array"},"companies":{"items":{"$ref":"#/components/schemas/CharterCommerceCommerceChoice"},"type":"array"},"offers":{"items":{"$ref":"#/components/schemas/CharterCommerceCommerceChoice"},"type":"array"}},"required":["offers","companies","assignees"],"type":"object"}
    CharterCommerceCommerceCRMItem: {"properties":{"allowedActions":{"items":{"type":"string"},"type":"array"},"attempts":{"items":{"$ref":"#/components/schemas/CharterCommerceAttempt"},"type":"array"},"audit":{"items":{"$ref":"#/components/schemas/CharterCommerceAudit"},"type":"array"},"bookingContext":{"$ref":"#/components/schemas/CharterCommerceBookingContext"},"changes":{"items":{"$ref":"#/components/schemas/CharterCommerceAmendment"},"type":"array"},"checkoutId":{"type":"string"},"companyId":{"type":"string"},"companyName":{"type":"string"},"contact":{"$ref":"#/components/schemas/CharterCommerceContact"},"created":{"type":"string"},"crm":{"$ref":"#/components/schemas/CharterCommerceCRM"},"expires":{"type":"string"},"firstPaymentDeadline":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"kind":{"type":"string"},"ledger":{"items":{"$ref":"#/components/schemas/CharterCommerceLedgerEntry"},"type":"array"},"legacyRequest":{"$ref":"#/components/schemas/CharterCommerceCharterBookingRequest"},"messages":{"items":{"$ref":"#/components/schemas/CharterCommerceMessage"},"type":"array"},"model":{"type":"string"},"name":{"type":"string"},"offerSlug":{"type":"string"},"paymentSchedule":{"$ref":"#/components/schemas/CharterCommercePaymentSchedule"},"paymentState":{"type":"string"},"payouts":{"items":{"$ref":"#/components/schemas/CharterCommercePayout"},"type":"array"},"previousQuotes":{"items":{"$ref":"#/components/schemas/CharterCommerceQuote"},"type":"array"},"proposed":{"$ref":"#/components/schemas/CharterCommerceQuote"},"refundEstimate":{"$ref":"#/components/schemas/CharterCommerceMoney"},"refundStatus":{"type":"string"},"requestId":{"type":"string"},"review":{"type":"string"},"settlementSummary":{"items":{"$ref":"#/components/schemas/CharterCommerceSettlementSummary"},"type":"array"},"snapshot":{"$ref":"#/components/schemas/CharterCommerceQuote"},"state":{"type":"string"},"updated":{"type":"string"},"version":{"type":"integer"}},"required":["changes","crm","messages","id","checkoutId","requestId","offerSlug","name","version","state","paymentState","snapshot","contact","attempts","ledger","payouts","audit","created","updated","kind"],"type":"object"}
    CharterCommerceCommerceCRMResponse: {"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object"},"facets":{"$ref":"#/components/schemas/CharterCommerceCommerceCRMFacets"},"items":{"items":{"$ref":"#/components/schemas/CharterCommerceCommerceCRMItem"},"type":"array"},"page":{"type":"integer"},"perPage":{"type":"integer"},"total":{"type":"integer"}},"required":["items","total","page","perPage","counts","facets"],"type":"object"}
    CharterCommerceCommerceChoice: {"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}
    CharterCommerceContact: {"properties":{"email":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"}},"required":["name","email","phone","message"],"type":"object"}
    CharterCommerceExtraOption: {"properties":{"automatic":{"type":"boolean"},"fee":{"$ref":"#/components/schemas/CharterCommerceFee"},"reasons":{"items":{"type":"string"},"type":"array"},"selected":{"type":"boolean"}},"required":["fee","selected","automatic","reasons"],"type":"object"}
    CharterCommerceExtrasOptions: {"properties":{"canAutoChange":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/CharterCommerceExtraOption"},"type":"array"},"reasons":{"items":{"type":"string"},"type":"array"},"selected":{"items":{"type":"string"},"type":"array"}},"required":["items","selected","canAutoChange","reasons"],"type":"object"}
    CharterCommerceExtrasQuote: {"properties":{"added":{"items":{"type":"string"},"type":"array"},"after":{"$ref":"#/components/schemas/CharterCommerceQuote"},"before":{"$ref":"#/components/schemas/CharterCommerceQuote"},"dueNow":{"$ref":"#/components/schemas/CharterCommerceMoney"},"expires":{"type":"string"},"mode":{"type":"string"},"onSiteDelta":{"$ref":"#/components/schemas/CharterCommerceMoney"},"quoteId":{"type":"string"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["quoteId","mode","reasons","before","added","dueNow","onSiteDelta","expires"],"type":"object"}
    CharterCommerceFee: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"autoAfterBooking":{"type":"boolean"},"id":{"type":"string"},"mandatory":{"type":"boolean"},"name":{"additionalProperties":{"type":"string"},"type":"object"},"payTo":{"type":"string"},"quantityRule":{"type":"string"},"requiresFulfillment":{"type":"boolean"},"rounding":{"type":"string"},"unit":{"type":"string"}},"required":["id","name","amount","unit","mandatory","payTo"],"type":"object"}
    CharterCommerceGuestManifestEntry: {"properties":{"charterRequestId":{"type":"string"},"createdAt":{"type":"string"},"dateOfBirth":{"type":"string"},"documentExpiry":{"type":"string"},"documentNumber":{"type":"string"},"documentType":{"type":"string"},"fullName":{"type":"string"},"id":{"type":"string"},"isLeadGuest":{"type":"boolean"},"issuingState":{"type":"string"},"nationality":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","charterRequestId","fullName","nationality","isLeadGuest","createdAt","updatedAt"],"type":"object"}
    CharterCommerceGuestManifestRequest: {"properties":{"dateOfBirth":{"type":"string"},"documentExpiry":{"type":"string"},"documentNumber":{"type":"string"},"documentType":{"type":"string"},"fullName":{"type":"string"},"id":{"type":"string"},"isLeadGuest":{"type":"boolean"},"issuingState":{"type":"string"},"nationality":{"type":"string"}},"required":["fullName","nationality"],"type":"object"}
    CharterCommerceInstalment: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"due":{"type":"string"},"id":{"type":"string"}},"required":["id","amount","due"],"type":"object"}
    CharterCommerceInstalmentRule: {"properties":{"daysBefore":{"type":"integer"},"percent":{"type":"integer"}},"required":["percent","daysBefore"],"type":"object"}
    CharterCommerceIntake: {"properties":{"offerSlug":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"version":{"type":"integer"},"windows":{"items":{"$ref":"#/components/schemas/CharterCommerceWorkingWindow"},"type":"array"}},"required":["offerSlug","version","status","windows","updatedAt"],"type":"object"}
    CharterCommerceInternalNote: {"properties":{"actor":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"}},"required":["id","body","actor","createdAt"],"type":"object"}
    CharterCommerceLedgerEntry: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"asset":{"type":"string"},"atomic":{"type":"string"},"created":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"network":{"type":"string"},"reference":{"type":"string"}},"required":["id","kind","amount","reference","created"],"type":"object"}
    CharterCommerceLegacyService: {"properties":{"extra":{"$ref":"#/components/schemas/CharterCommerceMoney"},"id":{"type":"string"},"name":{"additionalProperties":{"type":"string"},"type":"object"},"preferred":{"type":"boolean"}},"required":["id","name","extra","preferred"],"type":"object"}
    CharterCommerceLine: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"id":{"type":"string"},"label":{"additionalProperties":{"type":"string"},"type":"object"},"payTo":{"type":"string"},"quantity":{"type":"integer"}},"required":["id","label","amount","quantity","payTo"],"type":"object"}
    CharterCommerceMessage: {"properties":{"authorRole":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"}},"required":["id","body","authorRole","createdAt"],"type":"object"}
    CharterCommerceMoney: {"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"precision":{"type":"integer"}},"required":["amount","currency","precision"],"type":"object"}
    CharterCommerceObservedReceipt: {"properties":{"amount":{"type":"string"},"asset":{"type":"string"},"atomic":{"type":"string"},"currency":{"type":"string"},"network":{"type":"string"},"recognized":{"type":"boolean"},"refundRequired":{"type":"string"},"resolution":{"type":"string"}},"required":["recognized"],"type":"object"}
    CharterCommerceOffer: {"properties":{"bookingContext":{"$ref":"#/components/schemas/CharterCommerceBookingContext"},"cabinCount":{"type":"integer"},"cabinOnly":{"type":"boolean"},"cabinPrices":{"additionalProperties":{"$ref":"#/components/schemas/CharterCommerceMoney"},"type":"object"},"cabins":{"items":{"$ref":"#/components/schemas/CharterCommerceCabin"},"type":"array"},"calendarFresh":{"type":"boolean"},"capacity":{"type":"integer"},"checkInDay":{"type":"string"},"checkOutDay":{"type":"string"},"closedCabins":{"items":{"type":"string"},"type":"array"},"fleetId":{"type":"string"},"image":{"type":"string"},"legacyDeposit":{"$ref":"#/components/schemas/CharterCommerceMoney"},"legacyFees":{"items":{"$ref":"#/components/schemas/CharterCommerceFee"},"type":"array"},"legacyServices":{"items":{"$ref":"#/components/schemas/CharterCommerceLegacyService"},"type":"array"},"legacyWeekly":{"$ref":"#/components/schemas/CharterCommerceMoney"},"minNights":{"type":"integer"},"model":{"type":"string"},"name":{"type":"string"},"periods":{"items":{"$ref":"#/components/schemas/CharterCommercePeriod"},"type":"array"},"resource":{"type":"string"},"sellerId":{"type":"string"},"slug":{"type":"string"},"turnaroundHours":{"type":"integer"}},"required":["cabinCount","checkOutDay","turnaroundHours","cabinOnly","slug","resource","fleetId","sellerId","name","capacity","minNights","checkInDay","legacyWeekly","legacyFees","legacyDeposit","periods","cabins","calendarFresh"],"type":"object"}
    CharterCommerceOperatorContext: {"properties":{"id":{"type":"string"},"logo":{"type":"string"},"name":{"type":"string"}},"required":["name"],"type":"object"}
    CharterCommerceOrder: {"properties":{"allowedActions":{"items":{"type":"string"},"type":"array"},"attempts":{"items":{"$ref":"#/components/schemas/CharterCommerceAttempt"},"type":"array"},"audit":{"items":{"$ref":"#/components/schemas/CharterCommerceAudit"},"type":"array"},"bookingContext":{"$ref":"#/components/schemas/CharterCommerceBookingContext"},"changes":{"items":{"$ref":"#/components/schemas/CharterCommerceAmendment"},"type":"array"},"checkoutId":{"type":"string"},"contact":{"$ref":"#/components/schemas/CharterCommerceContact"},"created":{"type":"string"},"crm":{"$ref":"#/components/schemas/CharterCommerceCRM"},"expires":{"type":"string"},"firstPaymentDeadline":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"ledger":{"items":{"$ref":"#/components/schemas/CharterCommerceLedgerEntry"},"type":"array"},"messages":{"items":{"$ref":"#/components/schemas/CharterCommerceMessage"},"type":"array"},"model":{"type":"string"},"name":{"type":"string"},"offerSlug":{"type":"string"},"paymentSchedule":{"$ref":"#/components/schemas/CharterCommercePaymentSchedule"},"paymentState":{"type":"string"},"payouts":{"items":{"$ref":"#/components/schemas/CharterCommercePayout"},"type":"array"},"previousQuotes":{"items":{"$ref":"#/components/schemas/CharterCommerceQuote"},"type":"array"},"proposed":{"$ref":"#/components/schemas/CharterCommerceQuote"},"refundEstimate":{"$ref":"#/components/schemas/CharterCommerceMoney"},"refundStatus":{"type":"string"},"requestId":{"type":"string"},"review":{"type":"string"},"settlementSummary":{"items":{"$ref":"#/components/schemas/CharterCommerceSettlementSummary"},"type":"array"},"snapshot":{"$ref":"#/components/schemas/CharterCommerceQuote"},"state":{"type":"string"},"updated":{"type":"string"},"version":{"type":"integer"}},"required":["changes","crm","messages","id","checkoutId","requestId","offerSlug","name","version","state","paymentState","snapshot","contact","attempts","ledger","payouts","audit","created","updated"],"type":"object"}
    CharterCommercePaymentSchedule: {"properties":{"canPay":{"type":"boolean"},"currency":{"type":"string"},"deposit":{"$ref":"#/components/schemas/CharterCommerceMoney"},"dueNow":{"$ref":"#/components/schemas/CharterCommerceMoney"},"entries":{"items":{"$ref":"#/components/schemas/CharterCommerceScheduledPayment"},"type":"array"},"nextPayment":{"$ref":"#/components/schemas/CharterCommerceScheduledPayment"},"onSite":{"$ref":"#/components/schemas/CharterCommerceMoney"},"outstanding":{"$ref":"#/components/schemas/CharterCommerceMoney"},"overpaid":{"$ref":"#/components/schemas/CharterCommerceMoney"},"paid":{"$ref":"#/components/schemas/CharterCommerceMoney"},"precision":{"type":"integer"},"status":{"type":"string"}},"required":["currency","precision","status","paid","outstanding","dueNow","overpaid","onSite","deposit","entries","canPay"],"type":"object"}
    CharterCommercePayout: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"approvedBy":{"type":"string"},"asset":{"type":"string"},"atomic":{"type":"string"},"due":{"type":"string"},"exchangeRate":{"type":"string"},"fee":{"$ref":"#/components/schemas/CharterCommerceMoney"},"id":{"type":"string"},"network":{"type":"string"},"note":{"type":"string"},"recovered":{"type":"string"},"recoveredAtomic":{"type":"string"},"recoveryReferences":{"items":{"type":"string"},"type":"array"},"settlement":{"type":"string"},"settlementAmount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"state":{"type":"string"}},"required":["settlementAmount","exchangeRate","fee","id","state","amount","settlement","due","note"],"type":"object"}
    CharterCommercePeriod: {"properties":{"end":{"type":"string"},"priceCurrency":{"type":"string"},"priceMinor":{"type":"string"},"pricePrecision":{"type":"integer"},"priceUnit":{"type":"string"},"rateId":{"type":"string"},"start":{"type":"string"},"state":{"type":"string"}},"required":["start","end","state"],"type":"object"}
    CharterCommercePeriodPreview: {"properties":{"end":{"type":"string"},"priceCurrency":{"type":"string"},"priceMinor":{"type":"string"},"pricePrecision":{"type":"integer"},"priceStatus":{"type":"string"},"priceUnit":{"type":"string"},"rateId":{"type":"string"},"rentalPrice":{"$ref":"#/components/schemas/CharterCommerceMoney"},"start":{"type":"string"},"state":{"type":"string"}},"required":["start","end","state"],"type":"object"}
    CharterCommercePublic: {"properties":{"intake":{"$ref":"#/components/schemas/CharterCommerceIntake"},"methods":{"items":{"type":"string"},"type":"array"},"offer":{"$ref":"#/components/schemas/CharterCommerceOffer"},"periods":{"items":{"$ref":"#/components/schemas/CharterCommercePeriodPreview"},"type":"array"},"readiness":{"$ref":"#/components/schemas/CharterCommerceReadiness"},"terms":{"$ref":"#/components/schemas/CharterCommerceTerms"}},"required":["intake","readiness","periods","offer","terms","methods"],"type":"object"}
    CharterCommerceQuote: {"properties":{"availability":{"type":"string"},"bookingContext":{"$ref":"#/components/schemas/CharterCommerceBookingContext"},"deposit":{"$ref":"#/components/schemas/CharterCommerceMoney"},"expires":{"type":"string"},"id":{"type":"string"},"instalments":{"items":{"$ref":"#/components/schemas/CharterCommerceInstalment"},"type":"array"},"lines":{"items":{"$ref":"#/components/schemas/CharterCommerceLine"},"type":"array"},"nights":{"type":"integer"},"onSite":{"$ref":"#/components/schemas/CharterCommerceMoney"},"platform":{"$ref":"#/components/schemas/CharterCommerceMoney"},"rate":{"$ref":"#/components/schemas/CharterCommerceRate"},"readiness":{"$ref":"#/components/schemas/CharterCommerceReadiness"},"selection":{"$ref":"#/components/schemas/CharterCommerceSelection"},"source":{"type":"string"},"status":{"type":"string"},"terms":{"$ref":"#/components/schemas/CharterCommerceTerms"},"total":{"$ref":"#/components/schemas/CharterCommerceMoney"},"version":{"type":"integer"}},"required":["id","version","expires","status","availability","source","nights","rate","terms","selection","lines","total","platform","onSite","deposit","instalments"],"type":"object"}
    CharterCommerceRate: {"properties":{"cabinId":{"type":"string"},"cancellation":{"items":{"$ref":"#/components/schemas/CharterCommerceCancellationRule"},"type":"array"},"deposit":{"$ref":"#/components/schemas/CharterCommerceMoney"},"fees":{"items":{"$ref":"#/components/schemas/CharterCommerceFee"},"type":"array"},"freeReserveMinutes":{"type":"integer"},"id":{"type":"string"},"included":{"items":{"type":"string"},"type":"array"},"instalments":{"items":{"$ref":"#/components/schemas/CharterCommerceInstalmentRule"},"type":"array"},"name":{"additionalProperties":{"type":"string"},"type":"object"},"price":{"$ref":"#/components/schemas/CharterCommerceMoney"},"pricing":{"type":"string"},"service":{"type":"string"},"units":{"items":{"type":"string"},"type":"array"}},"required":["id","name","units","service","price","pricing","fees","included","instalments","cancellation","freeReserveMinutes","deposit"],"type":"object"}
    CharterCommerceReadiness: {"properties":{"canAcceptRequests":{"type":"boolean"},"canInstantBook":{"type":"boolean"},"effectiveMode":{"type":"string"},"intakeStatus":{"type":"string"},"reasons":{"items":{"type":"string"},"type":"array"}},"required":["intakeStatus","effectiveMode","canAcceptRequests","canInstantBook","reasons"],"type":"object"}
    CharterCommerceResult: {"properties":{"allowedActions":{"items":{"type":"string"},"type":"array"},"assignees":{"items":{"$ref":"#/components/schemas/CharterCommerceCommerceChoice"},"type":"array"},"cancellationPreview":{"$ref":"#/components/schemas/CharterCommerceCancellationPreview"},"checkout":{"$ref":"#/components/schemas/CharterCommerceCheckout"},"createdCabin":{"$ref":"#/components/schemas/CharterCommerceCabin"},"extrasOptions":{"$ref":"#/components/schemas/CharterCommerceExtrasOptions"},"extrasQuote":{"$ref":"#/components/schemas/CharterCommerceExtrasQuote"},"intake":{"$ref":"#/components/schemas/CharterCommerceIntake"},"methods":{"items":{"type":"string"},"type":"array"},"options":{"$ref":"#/components/schemas/CharterCommercePublic"},"order":{"$ref":"#/components/schemas/CharterCommerceOrder"},"physicalCabins":{"items":{"$ref":"#/components/schemas/CharterCommerceCabin"},"type":"array"},"quote":{"$ref":"#/components/schemas/CharterCommerceQuote"},"readiness":{"$ref":"#/components/schemas/CharterCommerceReadiness"},"sourceCabins":{"items":{"$ref":"#/components/schemas/CharterCommerceCabin"},"type":"array"},"terms":{"$ref":"#/components/schemas/CharterCommerceTerms"}},"required":[],"type":"object"}
    CharterCommerceScheduledPayment: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"changeId":{"type":"string"},"due":{"type":"string"},"id":{"type":"string"},"outstanding":{"$ref":"#/components/schemas/CharterCommerceMoney"},"overdue":{"type":"boolean"},"paid":{"$ref":"#/components/schemas/CharterCommerceMoney"},"status":{"type":"string"}},"required":["id","amount","paid","outstanding","due","status","overdue"],"type":"object"}
    CharterCommerceSelection: {"properties":{"cabinId":{"type":"string"},"end":{"type":"string"},"extras":{"items":{"type":"string"},"type":"array"},"guests":{"type":"integer"},"offerSlug":{"type":"string"},"rateId":{"type":"string"},"start":{"type":"string"},"unit":{"type":"string"}},"required":["offerSlug","start","end","guests","unit","rateId","extras"],"type":"object"}
    CharterCommerceSettlementSummary: {"properties":{"amount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"due":{"type":"string"},"id":{"type":"string"},"network":{"type":"string"},"recovered":{"type":"string"},"settlementAmount":{"$ref":"#/components/schemas/CharterCommerceMoney"},"state":{"type":"string"}},"required":["id","state","amount","due","settlementAmount"],"type":"object"}
    CharterCommerceTask: {"properties":{"completedAt":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"dueAt":{"type":"string"},"id":{"type":"string"},"state":{"type":"string"},"title":{"type":"string"}},"required":["id","title","state","createdBy","createdAt"],"type":"object"}
    CharterCommerceTerms: {"properties":{"agreementNote":{"type":"string"},"approvedBy":{"type":"string"},"cabins":{"items":{"$ref":"#/components/schemas/CharterCommerceCabin"},"type":"array"},"calendarVerifiedUntil":{"type":"string"},"checkIn":{"type":"string"},"checkOut":{"type":"string"},"commissionBps":{"type":"integer"},"mode":{"type":"string"},"offerSlug":{"type":"string"},"payoutDaysBefore":{"type":"integer"},"periods":{"items":{"$ref":"#/components/schemas/CharterCommercePeriod"},"type":"array"},"publishedAt":{"type":"string"},"rates":{"items":{"$ref":"#/components/schemas/CharterCommerceRate"},"type":"array"},"returnCondition":{"additionalProperties":{"type":"string"},"type":"object"},"skipperRequirements":{"additionalProperties":{"type":"string"},"type":"object"},"timezone":{"type":"string"},"turnaroundHours":{"type":"integer"},"version":{"type":"integer"}},"required":["turnaroundHours","offerSlug","version","mode","timezone","checkIn","checkOut","returnCondition","skipperRequirements","rates","periods","cabins"],"type":"object"}
    CharterCommerceVesselContext: {"properties":{"berths":{"type":"integer"},"cabins":{"type":"integer"},"gallery":{"items":{"type":"string"},"type":"array"},"guests":{"type":"integer"},"id":{"type":"string"},"lengthM":{"type":"number"},"model":{"type":"string"},"name":{"type":"string"},"year":{"type":"integer"}},"required":["name","gallery"],"type":"object"}
    CharterCommerceWorkingWindow: {"properties":{"availability":{"type":"string"},"end":{"type":"string"},"start":{"type":"string"}},"required":["start","end"],"type":"object"}
    MarketSeller:
      type: object
      required:
        - id
        - name
        - type
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
        profileSlug:
          type: string
        builderSlug:
          type: string
        brokerSlug:
          type: string
    MarketContent:
      type: object
      properties:
        title:
          type: string
        titleRu:
          type: string
        description:
          type: string
        descriptionRu:
          type: string
        categories:
          type: array
          items:
            type: string
        locationSlug:
          type: string
        country:
          type: string
        city:
          type: string
        address:
          type: string
        coverage:
          type: array
          items:
            type: string
        mobileService:
          type: boolean
        equipmentBrands:
          type: array
          items:
            type: string
        photos:
          type: array
          items:
            type: string
        contactEmail:
          type: string
        phone:
          type: string
        website:
          type: string
        priceMode:
          type: string
          enum:
            - fixed
            - from
            - on_request
        priceMinor:
          anyOf:
            - type: integer
              format: int64
            - type: "null"
          description: Integer minor currency units (e.g. EUR cents). No currency conversion is performed.
        currency:
          type: string
        priceUnit:
          type: string
        priceUpdatedAt:
          type: string
        manufacturer:
          type: string
        model:
          type: string
        partNumber:
          type: string
        condition:
          type: string
        completeness:
          type: string
        compatibility:
          type: array
          items:
            type: string
        compatibilityNote:
          type: string
        builderSlugs:
          type: array
          items:
            type: string
        stock:
          type: string
        stockUpdatedAt:
          type: string
        maxLength:
          type: number
        maxBeam:
          type: number
        maxDraft:
          type: number
        latitude:
          anyOf:
            - type: number
            - type: "null"
        longitude:
          anyOf:
            - type: number
            - type: "null"
        berthingTypes:
          type: array
          items:
            type: string
        amenities:
          type: array
          items:
            type: string
        terms:
          type: string
        sourceUrl:
          type: string
        sourceUpdatedAt:
          type: string
        operatorEvidence:
          type: string
      required:
        - title
        - description
        - categories
        - locationSlug
        - country
        - mobileService
        - photos
        - priceMode
        - currency
    MarketItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        sellerId:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - provider
            - marina
            - part
        slug:
          type: string
        externalId:
          type: string
        requestKey:
          type: string
        status:
          type: string
          enum:
            - draft
            - under_review
            - needs_changes
            - published
            - paused
            - archived
            - sold
        version:
          type: integer
          format: int64
        content:
          $ref: "#/components/schemas/MarketContent"
        published:
          anyOf:
            - $ref: "#/components/schemas/MarketContent"
            - type: "null"
        public:
          type: boolean
        operatorApproved:
          type: boolean
        seoApproved:
          type: boolean
        testData:
          type: boolean
        reviewNote:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        sellerName:
          type: string
          description: Published supplier identity name, never the private sign-in email
        sellerType:
          type: string
        seoApprovedLocales:
          type: array
          items:
            type: string
            enum:
              - en
              - ru
          description: Explicit language review of the approved snapshot; legacy seoApproved alone never grants
            translated indexing.
      required:
        - id
        - kind
        - slug
        - status
        - version
        - content
        - public
        - operatorApproved
        - seoApproved
        - testData
        - createdAt
        - updatedAt
    MarketSettings:
      type: object
      properties:
        sellerId:
          type: string
          format: uuid
        activities:
          type: array
          items:
            type: string
        version:
          type: integer
          format: int64
      required:
        - sellerId
        - activities
        - version
    MarketFacet:
      type: object
      properties:
        value:
          type: string
        count:
          type: integer
          format: int64
      required:
        - value
        - count
    MarketPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/MarketItem"
        page:
          $ref: "#/components/schemas/PageInfo"
        facets:
          type: object
          additionalProperties: {}
        seoApprovedCounts:
          type: object
          properties:
            en:
              type: integer
            ru:
              type: integer
          description: Reviewed offers in the entire matching scope, independent of pagination.
      required:
        - items
        - page
        - facets
    MarketSaveInput:
      type: object
      properties:
        id:
          type: string
          format: uuid
        sellerId:
          type: string
          description: Admin only for reassignment. Changing owner unpublishes the record and requires a new review;
            historical inquiries keep their original recipient.
          format: uuid
        kind:
          type: string
        version:
          type: integer
          format: int64
        requestKey:
          type: string
        externalId:
          type: string
        content:
          $ref: "#/components/schemas/MarketContent"
      required:
        - kind
        - version
        - requestKey
        - content
    MarketAction:
      type: object
      properties:
        action:
          type: string
          enum:
            - submit
            - approve
            - needs_changes
            - pause
            - archive
            - sold
            - commercial
        version:
          type: integer
          format: int64
        note:
          type: string
        operatorApproved:
          type: boolean
        seoApproved:
          type: boolean
        priceMode:
          type: string
        priceMinor:
          anyOf:
            - type: integer
              format: int64
            - type: "null"
          description: Integer minor currency units (e.g. EUR cents). No currency conversion is performed.
        currency:
          type: string
        stock:
          type: string
        seoApprovedLocales:
          type: array
          items:
            type: string
            enum:
              - en
              - ru
          description: Explicit language review of the approved snapshot; legacy seoApproved alone never grants
            translated indexing.
      required:
        - action
        - version
    MarketInquiryInput:
      type: object
      properties:
        targetId:
          type: string
          format: uuid
        requestKey:
          type: string
        message:
          type: string
        category:
          type: string
        startDate:
          type: string
        endDate:
          type: string
        length:
          type: number
        beam:
          type: number
        draft:
          type: number
        services:
          type: array
          items:
            type: string
        relatedYachtSlug:
          type: string
      required:
        - targetId
        - requestKey
        - message
    MarketMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        actorId:
          type: string
          format: uuid
        role:
          type: string
        message:
          type: string
        status:
          type: string
          description: Status transition recorded with this event; absent for older messages.
        outcome:
          type: string
        createdAt:
          type: string
      required:
        - id
        - actorId
        - role
        - message
        - createdAt
    MarketInquiry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        buyerId:
          type: string
          format: uuid
        sellerId:
          type: string
          format: uuid
        kind:
          type: string
        input:
          $ref: "#/components/schemas/MarketInquiryInput"
        snapshot:
          $ref: "#/components/schemas/MarketContent"
        targetSlug:
          type: string
        status:
          type: string
        outcome:
          type: string
        version:
          type: integer
          format: int64
        messages:
          type: array
          items:
            $ref: "#/components/schemas/MarketMessage"
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - buyerId
        - sellerId
        - kind
        - input
        - snapshot
        - targetSlug
        - status
        - version
        - messages
        - createdAt
        - updatedAt
    MarketReply:
      type: object
      properties:
        version:
          type: integer
          format: int64
        requestKey:
          type: string
        message:
          type: string
        status:
          type: string
        outcome:
          type: string
      required:
        - version
        - requestKey
        - message
    MarketInquiryPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/MarketInquiry"
        page:
          $ref: "#/components/schemas/PageInfo"
      required:
        - items
        - page
    MarketAudit:
      type: object
      properties:
        id:
          type: string
          format: uuid
        actorId:
          type: string
          format: uuid
        entityId:
          type: string
        action:
          type: string
        note:
          type: string
        before: {}
        after: {}
        createdAt:
          type: string
      required:
        - id
        - actorId
        - entityId
        - action
        - note
        - createdAt
    MarketNotificationTask:
      type: object
      properties:
        id:
          type: string
          format: uuid
        inquiryId:
          type: string
        actorId:
          type: string
          format: uuid
        title:
          type: string
        body:
          type: string
      required:
        - id
        - inquiryId
        - actorId
        - title
        - body
    MarketImportRow:
      type: object
      properties:
        row:
          type: integer
          format: int64
        externalId:
          type: string
        error:
          type: string
        id:
          type: string
          format: uuid
      required:
        - row
        - externalId
    MarketImportResult:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: "#/components/schemas/MarketImportRow"
        valid:
          type: boolean
        committed:
          type: boolean
      required:
        - rows
        - valid
        - committed
    VesselHistoryInput:
      type: object
      required:
        - identifierType
        - identifier
        - idempotencyKey
      properties:
        identifierType:
          type: string
          enum:
            - hin
            - imo
            - registration
        identifier:
          type: string
          maxLength: 64
        country:
          type: string
          description: ISO country code; required for registration numbers
        name:
          type: string
          maxLength: 160
          description: Auxiliary candidate search only
        mmsi:
          type: string
          pattern: ^[0-9]{9}$
          description: Auxiliary candidate search only
        idempotencyKey:
          type: string
          minLength: 8
          maxLength: 100
    VesselHistoryReport:
      type: object
      required:
        - id
        - input
        - status
        - createdAt
        - sections
        - platform
      properties:
        id:
          type: string
        input:
          $ref: "#/components/schemas/VesselHistoryInput"
        status:
          type: string
          enum:
            - queued
            - completed
            - partial
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        sections:
          type: array
          items:
            type: object
            required:
              - key
              - status
              - sourceUrl
            properties:
              key:
                type: string
                enum:
                  - psix
                  - ofac_sdn
                  - ofac_non_sdn
                  - uk
                  - boatsocean
              status:
                type: string
                enum:
                  - found
                  - no_match
                  - unavailable
                  - unsupported
                  - possible_match
                  - matched
                  - ambiguous
                  - partial
              sourceUrl:
                type: string
                format: uri
              fetchedAt:
                type: string
                format: date-time
              dataAsOf:
                type: string
              version:
                type: string
                description: SHA256 of the published sanctions list
              stale:
                type: boolean
              note:
                type: string
              records:
                type: array
                items:
                  type: object
                  additionalProperties: true
              events:
                type: array
                items:
                  type: object
                  additionalProperties: true
        platform:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Public listing snapshots and asking price events only
    Money:
      type: object
      properties:
        amount:
          type: integer
          format: int64
        currency:
          type: string
        display:
          type: string
    YachtImage:
      type: object
      required:
        - url
        - alt
      properties:
        assetId:
          type: string
        url:
          type: string
        alt:
          type: string
        altTranslations:
          type: object
          additionalProperties:
            type: string
        width:
          type: integer
        height:
          type: integer
        isHero:
          type: boolean
        sortOrder:
          type: integer
    PublicSeller:
      type: object
      required:
        - id
        - name
        - type
        - country
      properties:
        id:
          type: string
        userId:
          type: string
        name:
          type: string
        type:
          type: string
        country:
          type: string
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2
        logoUrl:
          type: string
          description: Returned only for a verified seller profile.
        verified:
          type: boolean
    Yacht:
      type: object
      required:
        - id
        - slug
        - name
        - builder
        - model
        - category
        - condition
        - price
        - lengthMeters
        - year
        - location
      properties:
        sellerReviewSummary: {"$ref":"#/components/schemas/TransactionRating"}
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        builder:
          type: string
        model:
          type: string
        category:
          type: string
        condition:
          type: string
        price:
          $ref: "#/components/schemas/Money"
        lengthMeters:
          type: number
        year:
          type: integer
        cabins:
          type: integer
        guests:
          type: integer
        location:
          $ref: "#/components/schemas/Location"
        images:
          type: array
          items:
            $ref: "#/components/schemas/YachtImage"
        seller:
          $ref: "#/components/schemas/PublicSeller"
        promotionType:
          type: string
          enum:
            - featured
            - sponsored
            - premium
        vatStatus:
          type: string
        hullMaterial:
          type: string
        listingStatus:
          type: string
          enum:
            - published
            - sold
        fleetBoatId:
          type: string
        builderCountry:
          type: string
          description: Known country of the manufacturer; distinct from the vessel location.
        summary:
          type: object
          properties:
            ru:
              type: string
            en:
              type: string
          description: Optional concise excerpts of the existing localized listing content.
      allOf:
        - $ref: "#/components/schemas/VesselAttributes"
    YachtListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/Yacht"
        page:
          type: object
          properties:
            page:
              type: integer
            perPage:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
    Builder:
      type: object
      required:
        - slug
        - name
        - url
      properties:
        slug:
          type: string
        name:
          type: string
        url:
          type: string
        count:
          type: integer
          minimum: 0
        country:
          type: string
        description:
          type: string
        descriptionRu:
          type: string
        specialization:
          type: string
        websiteUrl:
          type: string
        logoUrl:
          type: string
        heroImageUrl:
          type: string
        vesselTypes:
          type: array
          items:
            type: string
        minLengthMeters:
          type: number
        maxLengthMeters:
          type: number
        foundedYear:
          type: integer
        modelCount:
          type: integer
          minimum: 0
        featuredRank:
          type: integer
        updatedAt:
          type: string
          format: date-time
    BuilderModel:
      type: object
      required:
        - slug
        - name
      properties:
        slug:
          type: string
        name:
          type: string
        category:
          type: string
        lengthMeters:
          type: number
        beamMeters:
          type: number
        draftMeters:
          type: number
        hullMaterial:
          type: string
        productionStart:
          type: integer
        productionEnd:
          type: integer
        discontinued:
          type: boolean
        lifecycleStatus:
          type: string
          enum:
            - unknown
            - current
            - discontinued
        description:
          type: string
        descriptionRu:
          type: string
        imageUrl:
          type: string
        vesselTypes:
          type: array
          items:
            type: string
        hullLengthMeters:
          type: number
          description: Explicit manufacturer hull length, distinct from length overall.
    BuilderListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/Builder"
        page:
          type: object
          properties:
            page:
              type: integer
            perPage:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
    BuilderDetailResponse:
      type: object
      required:
        - builder
        - models
      properties:
        builder:
          $ref: "#/components/schemas/Builder"
        models:
          type: array
          items:
            $ref: "#/components/schemas/BuilderModel"
        listings:
          type: array
          items:
            $ref: "#/components/schemas/Yacht"
        newBuildInquiry:
          $ref: "#/components/schemas/NewBuildInquiryAvailability"
    NewBuildInquiryAvailability:
      type: object
      required:
        - available
      properties:
        available:
          type: boolean
        partnerName:
          type: string
        partnerType:
          type: string
          enum:
            - builder
            - dealer
        partnerLogoUrl:
          type: string
    Location:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
        country:
          type: string
        city:
          type: string
        marina:
          type: string
        region:
          type: string
        lat:
          type: number
        lng:
          type: number
        displayPrecision:
          type: string
          enum:
            - country
            - region
            - city
            - marina
            - exact
        count:
          type: integer
        url:
          type: string
    LocationHub:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
        country:
          type: string
        city:
          type: string
        marina:
          type: string
        region:
          type: string
        lat:
          type: number
        lng:
          type: number
        displayPrecision:
          type: string
          enum:
            - country
            - region
            - city
            - marina
            - exact
        count:
          type: integer
    SellerProfile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - private
            - broker
            - dealer
            - builder
        onboardingIntent:
          type: string
          enum:
            - sale
            - charter
          default: sale
        country:
          type: string
        websiteUrl:
          type: string
        contactEmail:
          type: string
          format: email
        phone:
          type: string
        linkedBuilderId:
          type: string
        linkedBuilderName:
          type: string
        acceptsNewBuildInquiries:
          type: boolean
        verificationStatus:
          type: string
          enum:
            - unverified
            - pending_review
            - changes_requested
            - verified
            - rejected
            - suspended
        memberRole:
          type: string
        currentVerification:
          $ref: "#/components/schemas/SellerVerificationSubmission"
        charterOperationsApproved:
          type: boolean
          description: The platform has vetted this seller for commercial charter operations.
        charterOperationsRequestedAt:
          type: string
          format: date-time
        charterOperationsReviewedAt:
          type: string
          format: date-time
        charterOperationsNote:
          type: string
          description: The reviewer's note
          kept across approve and revoke.: null
        ownerMandateRequired:
          type: boolean
          description: Derived from the seller type; builders and private owners do not owe one.
        ownerMandateCount:
          type: integer
        ownerMandates:
          type: array
          description: Internal owner-mandate evidence. Never part of a public listing response.
          items:
            $ref: "#/components/schemas/SellerOwnerMandate"
    SellerOwnerMandate:
      type: object
      properties:
        id:
          type: string
        sellerId:
          type: string
        ownerName:
          type: string
        ownerEmail:
          type: string
        ownerPhone:
          type: string
        yachtId:
          type: string
          description: Optional; one mandate can cover a single yacht.
        documentAssetId:
          type: string
        documentUrl:
          type: string
        status:
          type: string
          enum:
            - draft
            - submitted
            - approved
            - rejected
        reviewedAt:
          type: string
          format: date-time
        note:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    SellerOwnerMandateInput:
      type: object
      required:
        - ownerName
      properties:
        ownerName:
          type: string
        ownerEmail:
          type: string
          description: At least one of ownerEmail or ownerPhone is required.
        ownerPhone:
          type: string
        yachtId:
          type: string
        documentAssetId:
          type: string
          description: A document reference is required; this is one form of it.
        documentUrl:
          type: string
        status:
          type: string
          enum:
            - draft
            - submitted
          default: draft
          description: Approval is the platform's decision.
        note:
          type: string
    SellerNewBuildSettingsRequest:
      type: object
      required:
        - acceptsNewBuildInquiries
      properties:
        acceptsNewBuildInquiries:
          type: boolean
    PublicBroker:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - broker
            - dealer
            - builder
        country:
          type: string
        websiteUrl:
          type: string
        verified:
          type: boolean
        listingCount:
          type: integer
        url:
          type: string
        updatedAt:
          type: string
          format: date-time
    CreateSellerProfileRequest:
      type: object
      required:
        - name
        - type
        - country
        - contactEmail
        - phone
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - private
            - broker
            - dealer
            - charter_operator
            - builder
          default: private
        onboardingIntent:
          type: string
          enum:
            - sale
            - charter
          default: sale
        country:
          type: string
        websiteUrl:
          type: string
        contactEmail:
          type: string
          format: email
        phone:
          type: string
        businessRegistrationNumber:
          type: string
    AccountDashboard:
      type: object
      properties:
        user:
          type: object
          properties:
            id:
              type: string
            email:
              type: string
            fullName:
              type: string
            role:
              type: string
            roles:
              type: array
              items:
                type: string
        roles:
          type: array
          items:
            type: string
        sellerProfiles:
          type: array
          items:
            $ref: "#/components/schemas/SellerProfile"
        buyer:
          type: object
          properties:
            favorites:
              type: integer
            comparisons:
              type: integer
            savedSearches:
              type: integer
            openInquiries:
              type: integer
        seller:
          type: object
          properties:
            totalListings:
              type: integer
            draftListings:
              type: integer
            submittedListings:
              type: integer
            publishedListings:
              type: integer
            newLeads:
              type: integer
        broker:
          $ref: "#/components/schemas/BrokerAccountSummary"
        admin:
          type: object
          properties:
            pendingListings:
              type: integer
            pendingFleetBoats:
              type: integer
            pendingCharterOffers:
              type: integer
            pendingCharterBases:
              type: integer
            pendingImports:
              type: integer
            pendingSellers:
              type: integer
            pendingLocations:
              type: integer
            pendingBuilders:
              type: integer
            totalListings:
              type: integer
            publishedListings:
              type: integer
            totalLocations:
              type: integer
            totalBuilders:
              type: integer
            totalFleetBoats:
              type: integer
            publishedFleetBoats:
              type: integer
            totalCharterOffers:
              type: integer
            publishedCharters:
              type: integer
            totalCharterBases:
              type: integer
            publishedBases:
              type: integer
            totalImports:
              type: integer
            totalSellers:
              type: integer
            users:
              type: integer
    BrokerPackage:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        tagline:
          type: string
        target:
          type: string
        monthlyPriceAmount:
          type: integer
        priceCurrency:
          type: string
        activeListingsLimit:
          type: integer
        featuredPlacements:
          type: integer
        sponsoredBoats:
          type: integer
        premiumPlacementEligible:
          type: boolean
        fullPlatformAccess:
          type: boolean
        dedicatedFinancingSupport:
          type: boolean
        features:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              label:
                type: string
              enabled:
                type: boolean
        capabilities:
          type: object
    SellerLeadSummary:
      type: object
      properties:
        id:
          type: string
        yachtId:
          type: string
        yachtSlug:
          type: string
        yachtName:
          type: string
        externalListingId:
          type: string
        externalId:
          type: string
        sourceName:
          type: string
        routeChannel:
          type: string
        routeStatus:
          type: string
        routeToName:
          type: string
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        message:
          type: string
        intent:
          type: string
        status:
          type: string
        createdAt:
          type: string
        assignedTo:
          type: string
          format: uuid
        assignedToName: *a37
    BrokerAccountSummary:
      type: object
      properties:
        subscription:
          type: object
          properties:
            status:
              type: string
            package:
              $ref: "#/components/schemas/BrokerPackage"
            startedAt:
              type: string
            renewsAt:
              type: string
        packages:
          type: array
          items:
            $ref: "#/components/schemas/BrokerPackage"
        insights:
          type: object
          properties:
            listingLimit:
              type: integer
            activeListings:
              type: integer
            draftListings:
              type: integer
            reviewListings:
              type: integer
            newLeads:
              type: integer
            leadResponseTargetHours:
              type: integer
            estimatedMarketplaceReach:
              type: integer
            searchDemandIndex:
              type: integer
            averageListingQuality:
              type: integer
            featuredPlacementsUsed:
              type: integer
            featuredPlacementsLimit:
              type: integer
            sponsoredBoatsUsed:
              type: integer
            sponsoredBoatsLimit:
              type: integer
            leadToListingRate:
              type: number
            impressions:
              type: integer
            clicks:
              type: integer
            conversions:
              type: integer
            clickThroughRate:
              type: number
            conversionRate:
              type: number
        recentLeads:
          type: array
          items:
            $ref: "#/components/schemas/SellerLeadSummary"
    SellerListingSummary:
      type: object
      properties:
        yacht:
          $ref: "#/components/schemas/Yacht"
        status:
          type: string
        sellerProfileId:
          type: string
        sellerVerificationStatus:
          type: string
        submittedAt:
          type: string
        publishedAt:
          type: string
        updatedAt:
          type: string
        fleetBoatId:
          type: string
    SellerListingListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/SellerListingSummary"
        page:
          type: object
          properties:
            page:
              type: integer
            perPage:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
    ModerationRequest:
      type: object
      required:
        - action
      properties:
        action:
          type: string
          enum:
            - approve
            - publish
            - request_changes
            - reject
            - revoke
            - archive
        note:
          type: string
          description: Required for request_changes, reject, revoke and archive.
    YachtDetailResponse:
      type: object
      properties:
        yacht:
          $ref: "#/components/schemas/Yacht"
        locale:
          type: string
          enum:
            - en
            - ru
        metaTitle:
          type: string
        metaDescription:
          type: string
        canonical:
          type: string
        overview:
          type: array
          items:
            type: string
        keySpecs:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              value:
                type: string
              note:
                type: string
        specGroups:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              rows:
                type: array
                items:
                  type: object
                  properties:
                    label:
                      type: string
                    value:
                      type: string
        equipment:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              items:
                type: array
                items:
                  type: string
        documents:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              date:
                type: string
              size:
                type: string
              url:
                type: string
        relatedLinks:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              url:
                type: string
        similar:
          type: array
          items:
            $ref: "#/components/schemas/Yacht"
        seller:
          $ref: "#/components/schemas/PublicSeller"
        brokerContact:
          type: object
          properties:
            name:
              type: string
            phone:
              type: string
            email:
              type: string
              format: email
            country:
              type: string
    SEOLandingPage:
      type: object
      required:
        - slug
        - locale
        - type
        - title
        - description
        - url
      properties:
        slug:
          type: string
        locale:
          type: string
          enum:
            - en
            - ru
        type:
          type: string
          enum:
            - builder
            - yacht_type
            - service
            - editorial
        title:
          type: string
        description:
          type: string
        url:
          type: string
        count:
          type: integer
    SEOLandingPageResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/SEOLandingPage"
    LeadRequest:
      type: object
      required:
        - name
        - email
        - message
      properties:
        yachtSlug:
          type: string
        builderSlug:
          type: string
        modelSlug:
          type: string
        externalListingId:
          type: string
        externalId:
          type: string
        sourceName:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        message:
          type: string
        intent:
          type: string
          description: " catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user.
            catalog_inquiry routes to BoatsOcean without a fictitious seller; guest or authenticated user."
        requestKey:
          type: string
          minLength: 16
          maxLength: 100
          description: Required for catalog_inquiry. Reuse for retries; changed content conflicts.
    ListingEventRequest:
      type: object
      required:
        - eventType
      properties:
        yachtId:
          type: string
        yachtSlug:
          type: string
        yachtIds:
          type: array
          items:
            type: string
        yachtSlugs:
          type: array
          items:
            type: string
        eventType:
          type: string
          enum:
            - impression
            - click
            - conversion
        source:
          type: string
        sessionId:
          type: string
        requestPath:
          type: string
        metadata:
          type: object
          additionalProperties: true
    RegisterRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
        password:
          type: string
          minLength: 8
        fullName:
          type: string
        role:
          type: string
          enum:
            - buyer
            - seller
            - broker
            - builder
            - admin
        returnTo:
          type: string
          description: Local /account/ or /ru/account/ path with wizard query. External/absolute URLs are discarded.
    LoginRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
        password:
          type: string
    VerifyEmailRequest:
      type: object
      required:
        - token
      properties:
        token:
          type: string
    ResendVerificationRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
        returnTo:
          type: string
    AuthResponse:
      type: object
      properties:
        token:
          type: string
        user:
          type: object
          additionalProperties: true
        verificationRequired:
          type: boolean
        verificationSent:
          type: boolean
        devVerificationUrl:
          type: string
    SellerVerificationRequest:
      type: object
      properties:
        contactEmail:
          type: string
          format: email
        phone:
          type: string
        businessRegistrationNumber:
          type: string
        websiteUrl:
          type: string
        linkedBuilderId:
          type: string
        linkedBuilderSlug:
          type: string
        documents:
          type: array
          items:
            type: object
            additionalProperties: true
    SellerVerificationDraftRequest:
      type: object
      description: Incomplete values are accepted while autosaving; submission performs full validation.
      properties:
        name:
          type: string
        type:
          type: string
        onboardingIntent:
          type: string
          enum:
            - sale
            - charter
        country:
          type: string
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
        websiteUrl:
          type: string
        contactEmail:
          type: string
        phone:
          type: string
        businessRegistrationNumber:
          type: string
        linkedBuilderId:
          type: string
        linkedBuilderSlug:
          type: string
        documents:
          type: array
          maxItems: 10
          items:
            type: object
            additionalProperties: true
    SellerVerificationSubmission:
      type: object
      required:
        - id
        - sellerId
        - status
        - name
        - type
        - onboardingIntent
        - country
      properties:
        id:
          type: string
        sellerId:
          type: string
        status:
          type: string
          enum:
            - draft
            - pending_review
            - changes_requested
            - approved
            - rejected
            - withdrawn
            - superseded
        isRevision:
          type: boolean
        name:
          type: string
        type:
          type: string
        onboardingIntent:
          type: string
          enum:
            - sale
            - charter
        country:
          type: string
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
        websiteUrl:
          type: string
        contactEmail:
          type: string
        phone:
          type: string
        businessRegistrationNumber:
          type: string
        linkedBuilderId:
          type: string
        documents:
          type: array
          items:
            type: object
            additionalProperties: true
        adminNote:
          type: string
        submittedAt:
          type: string
          format: date-time
        reviewedAt:
          type: string
          format: date-time
    SellerVerificationModerationRequest:
      type: object
      required:
        - action
      properties:
        action:
          type: string
          enum:
            - verify
            - request_changes
            - reject
            - suspend
        note:
          type: string
          description: Required for request_changes, reject and suspend.
    SelectBrokerPackageRequest:
      type: object
      required:
        - packageCode
      properties:
        packageCode:
          type: string
        status:
          type: string
    AdminBrokerPackageAssignmentRequest:
      type: object
      required:
        - packageCode
        - agreementNote
        - agreedTerms
      properties:
        packageCode:
          type: string
          description: Existing configured package code
        status:
          type: string
          enum:
            - active
            - trialing
            - past_due
          default: active
        agreementNote:
          type: string
          minLength: 1
          maxLength: 4000
        agreedTerms:
          type: boolean
          const: true
        operationId:
          type: string
          format: uuid
          description: Optional open package request for this seller; closed atomically
        idempotencyKey:
          type: string
          maxLength: 100
          description: Optional client request key; same payload replays the stored result. Operation ID independently
            prevents repeated handling.
    FavoriteRequest:
      type: object
      required:
        - yachtSlug
      properties:
        yachtSlug:
          type: string
        userId:
          type: string
    CompareRequest:
      type: object
      required:
        - yachtSlugs
      properties:
        yachtSlugs:
          type: array
          minItems: 2
          items:
            type: string
    UpdateLeadRequest:
      type: object
      properties:
        status:
          type: string
        note:
          type: string
        assignedTo:
          type: string
          format: uuid
          description: Administrator assigns an active platform administrator; retained in the audit trail.
    CreateListingPromotionRequest:
      type: object
      required:
        - yachtId
        - promotionType
      properties:
        yachtId:
          type: string
        promotionType:
          type: string
          enum:
            - featured
            - sponsored
            - premium
    SellerListingRequest:
      type: object
      required:
        - name
        - builder
        - model
        - category
        - condition
        - priceAmount
        - priceCurrency
        - locationSlug
      properties:
        name:
          type: string
        builder:
          type: string
        model:
          type: string
        category:
          type: string
        condition:
          type: string
        priceAmount:
          type: integer
          format: int64
        priceCurrency:
          type: string
        locationSlug:
          type: string
        fleetBoatId:
          type: string
        idempotencyKey:
          type: string
      additionalProperties: true
      allOf:
        - $ref: "#/components/schemas/VesselAttributes"
    SellerFleetBoatRequest:
      type: object
      required:
        - name
        - yachtType
        - builder
        - model
        - locationSlug
      properties:
        name:
          type: string
        yachtType:
          type: string
        builder:
          type: string
        model:
          type: string
        contractType:
          type: string
        locationSlug:
          type: string
        buildYear:
          type: integer
        refitYear:
          type: integer
        lengthMeters:
          type: number
        beamMeters:
          type: number
        draftMeters:
          type: number
        enginePowerHp:
          type: number
        engineCount:
          type: integer
        engineType:
          type: string
        cabins:
          type: integer
        guests:
          type: integer
        toilets:
          type: integer
        documents:
          type: array
          items:
            type: object
            additionalProperties: true
        idempotencyKey:
          type: string
      additionalProperties: true
      allOf:
        - $ref: "#/components/schemas/VesselAttributes"
    SellerProfileUpdateRequest:
      type: object
      required:
        - name
        - type
        - country
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - private
            - broker
            - dealer
            - charter_operator
            - builder
        onboardingIntent:
          type: string
          enum:
            - sale
            - charter
          default: sale
        country:
          type: string
        websiteUrl:
          type: string
        contactEmail:
          type: string
          format: email
        phone:
          type: string
        businessRegistrationNumber:
          type: string
    SellerFleetBoatListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
    SellerCharterBaseRequest:
      type: object
      required:
        - name
        - locationSlug
        - managerName
        - managerPhone
        - managerEmail
      properties:
        name:
          type: string
        locationSlug:
          type: string
        managerName:
          type: string
        managerPhone:
          type: string
        managerEmail:
          type: string
          format: email
        meetingLat:
          type: number
        meetingLng:
          type: number
      additionalProperties: true
    SellerCharterBaseListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
    SellerLocationRequest:
      type: object
      required:
        - country
        - city
        - marinaName
      properties:
        country:
          type: string
        city:
          type: string
        marinaName:
          type: string
        address:
          type: string
        lat:
          type: number
        lng:
          type: number
    SellerLocationRequestListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
    SellerBuilderRequest:
      type: object
      required:
        - name
        - country
        - websiteUrl
      properties:
        name:
          type: string
        country:
          type: string
        websiteUrl:
          type: string
          format: uri
    SellerBuilderRequestListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
    SellerCharterOfferListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
    CharterOfferListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/CharterOffer"
        page:
          type: object
          properties:
            page:
              type: integer
            perPage:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
    CharterDestinationListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - slug
              - count
            properties:
              slug:
                type: string
              count:
                type: integer
                minimum: 1
    CharterBookingPriceSummary:
      type: object
      required:
        - status
        - charterAmount
        - estimatedTotalAmount
        - dueNowAmount
        - payAtCheckInAmount
        - currency
      description: Weekly amount prorated by nights/7 with integer rounding; an exact dated slot price overrides it.
        Costs are added once, refundable deposit stays separate. Legacy snapshots are retained without
        recalculation.
      properties:
        version:
          type: integer
          enum:
            - 1
        status:
          type: string
          enum:
            - estimated
            - on_request
            - legacy_unverified
        basis:
          type: string
          enum:
            - weekly
            - slot
            - berth
        nights:
          type: integer
          minimum: 1
        charterAmount:
          type: integer
          format: int64
        rentalExtraAmount:
          type: integer
          format: int64
        cancellationExtraAmount:
          type: integer
          format: int64
        mandatoryCostsAmount:
          type: integer
          format: int64
        securityDepositAmount:
          type: integer
          format: int64
        estimatedTotalAmount:
          type: integer
          format: int64
        dueNowAmount:
          type: integer
          format: int64
        payAtCheckInAmount:
          type: integer
          format: int64
        currency:
          type: string
        mandatoryCostsCurrency:
          type: string
        securityDepositCurrency:
          type: string
        rentalExtraCurrency:
          type: string
        cancellationExtraCurrency:
          type: string
    CharterQuote:
      type: object
      required:
        - offerSlug
        - startDate
        - endDate
        - guestCount
        - nights
        - availability
        - bookingMode
        - price
      properties:
        offerSlug:
          type: string
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        guestCount:
          type: integer
          minimum: 1
        nights:
          type: integer
          minimum: 1
        availability:
          type: string
          enum:
            - available
            - on_request
            - waiting_list
        bookingMode:
          type: string
        price:
          $ref: "#/components/schemas/CharterBookingPriceSummary"
    CharterBookingRequestInput:
      type: object
      required:
        - offerSlug
        - startDate
        - endDate
        - name
        - email
        - guestCount
        - termsAccepted
      properties:
        offerSlug:
          type: string
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        rentalOptionId:
          type: string
        cancellationOptionId:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        guestCount:
          type: integer
          minimum: 1
        cabins:
          type: integer
          minimum: 0
        waitingList:
          type: boolean
          default: false
        cabinId:
          type: string
        message:
          type: string
        termsAccepted:
          type: boolean
    APIClientRequest:
      type: object
      required:
        - name
      properties:
        sellerId:
          type: string
        name:
          type: string
        contactEmail:
          type: string
          format: email
        allowedOrigins:
          type: array
          items:
            type: string
        rateLimitPerMinute:
          type: integer
        dailyQuota:
          type: integer
        status:
          type: string
          enum:
            - active
            - suspended
        sandbox:
          type: boolean
          default: false
          description: Sandbox clients receive deterministic fixtures and never touch the production catalogue.
    APIKeyRequest:
      type: object
      required:
        - name
        - scopes
      properties:
        name:
          type: string
        scopes:
          type: array
          items:
            type: string
            enum:
              - listings:read
              - feeds:read
              - leads:create
              - leads:read
              - imports:write
              - imports:read
              - analytics:read
              - webhooks:manage
        expiresAt:
          type: string
          format: date-time
    APIWebhookRequest:
      type: object
      required:
        - url
        - events
      properties:
        url:
          type: string
          description: HTTPS URL. HTTP is accepted only for localhost development.
        events:
          type: array
          items:
            type: string
            enum:
              - lead.created
              - listing.approved
              - listing.updated
              - price.changed
              - import.completed
        status:
          type: string
          enum:
            - active
            - paused
        secret:
          type: string
          description: Optional signing secret. If omitted, Portigram generates one and returns it once in the create
            response.
    APIWebhook:
      type: object
      properties:
        id:
          type: string
        clientId:
          type: string
        url:
          type: string
        events:
          type: array
          items:
            type: string
        status:
          type: string
        secret:
          type: string
          description: Returned only when creating the webhook.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    APIClient:
      type: object
      properties:
        id:
          type: string
        sellerId:
          type: string
        name:
          type: string
        contactEmail:
          type: string
          format: email
        status:
          type: string
          enum:
            - active
            - suspended
        sandbox:
          type: boolean
        allowedOrigins:
          type: array
          items:
            type: string
        rateLimitPerMinute:
          type: integer
        dailyQuota:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    APIKeyResponse:
      type: object
      properties:
        id:
          type: string
        clientId:
          type: string
        name:
          type: string
        token:
          type: string
          description: Returned only in the create response.
        tokenPrefix:
          type: string
        scopes:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
            - active
            - revoked
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
        revokedAt:
          type: string
          format: date-time
    PartnerWebhookUpdateRequest:
      type: object
      properties:
        url:
          type: string
          description: HTTPS URL. HTTP is accepted only for localhost development.
        events:
          type: array
          items:
            type: string
            enum:
              - lead.created
              - listing.approved
              - listing.updated
              - price.changed
              - import.completed
        status:
          type: string
          enum:
            - active
            - paused
    PartnerLeadStatus:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        routeChannel:
          type: string
          enum:
            - email
            - phone
            - internal
        routeStatus:
          type: string
        sourceName:
          type: string
        externalId:
          type: string
        yachtSlug:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PartnerImportStatus:
      type: object
      properties:
        id:
          type: string
        sourceName:
          type: string
        externalId:
          type: string
        status:
          type: string
          enum:
            - pending_review
            - approved
            - rejected
            - published
        title:
          type: string
        yachtId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        lastSeenAt:
          type: string
          format: date-time
    PartnerPrincipal:
      type: object
      properties:
        clientId:
          type: string
        keyId:
          type: string
        name:
          type: string
        scopes:
          type: array
          items:
            type: string
        sandbox:
          type: boolean
        rateLimitPerMinute:
          type: integer
        dailyQuota:
          type: integer
    PartnerProfileResponse:
      type: object
      properties:
        partner:
          $ref: "#/components/schemas/PartnerPrincipal"
        apiVersion:
          type: string
          example: "1.0"
        docsUrl:
          type: string
          example: /developers/api/
    PartnerWebhookListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/APIWebhook"
    PartnerWebhookDelivery:
      type: object
      properties:
        id:
          type: string
        webhookId:
          type: string
        url:
          type: string
        eventType:
          type: string
        status:
          type: string
          enum:
            - pending
            - sending
            - retry
            - delivered
            - failed
        attempts:
          type: integer
        lastStatusCode:
          type: integer
        lastError:
          type: string
        createdAt:
          type: string
          format: date-time
        deliveredAt:
          type: string
          format: date-time
    PartnerWebhookDeliveryListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/PartnerWebhookDelivery"
    PartnerEndpointUsage:
      type: object
      properties:
        method:
          type: string
        path:
          type: string
        requests:
          type: integer
        errors:
          type: integer
    PartnerAnalytics:
      type: object
      properties:
        clientId:
          type: string
        range:
          type: string
          enum:
            - 24h
            - 7d
            - 30d
        generatedAt:
          type: string
          format: date-time
        requests:
          type: integer
        errors:
          type: integer
        successRate:
          type: number
          format: double
        byStatus:
          type: object
          additionalProperties:
            type: integer
        topEndpoints:
          type: array
          items:
            $ref: "#/components/schemas/PartnerEndpointUsage"
        webhookDeliveries:
          type: integer
        webhookFailures:
          type: integer
    PartnerImportResponse:
      type: object
      properties:
        source:
          type: string
        total:
          type: integer
        imported:
          type: integer
        ids:
          type: array
          items:
            type: string
    PartnerListingFeed:
      type: object
      properties:
        version:
          type: string
          example: 2026-05-24
        generatedAt:
          type: string
          format: date-time
        items:
          type: array
          items:
            $ref: "#/components/schemas/Yacht"
        page:
          $ref: "#/components/schemas/PageInfo"
    PageInfo:
      type: object
      properties:
        page:
          type: integer
        perPage:
          type: integer
        totalItems:
          type: integer
        totalPages:
          type: integer
    LeadResponse:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          example: accepted
        routeChannel:
          type: string
          enum:
            - email
            - phone
            - internal
        routeStatus:
          type: string
          example: captured
        createdAt:
          type: string
          format: date-time
    ImportURLRequest:
      type: object
      required:
        - url
      properties:
        sourceName:
          type: string
        url:
          type: string
        useBrowser:
          type: boolean
          deprecated: true
          description: Use the import-yachts command for browser-based imports. The server accepts HTTP and HTTPS imports.
    ImportReviewRequest:
      type: object
      required:
        - payload
      properties:
        payload:
          type: object
          additionalProperties: true
    StatusComponent:
      type: object
      required:
        - name
        - status
      properties:
        name:
          type: string
        status:
          type: string
          enum:
            - operational
            - degraded
            - outage
            - configured
            - disabled
    StatusIncident:
      type: object
      properties:
        id:
          type: string
        component:
          type: string
        severity:
          type: string
          enum:
            - minor
            - major
            - critical
        status:
          type: string
          enum:
            - investigating
            - identified
            - monitoring
            - resolved
        title:
          type: string
        summary:
          type: string
        startedAt:
          type: string
          format: date-time
        resolvedAt:
          type: string
          format: date-time
    StatusResponse:
      type: object
      required:
        - status
        - checkedAt
        - version
        - components
      properties:
        status:
          type: string
          enum:
            - operational
            - degraded
            - outage
        checkedAt:
          type: string
          format: date-time
        version:
          type: string
        components:
          type: array
          items:
            $ref: "#/components/schemas/StatusComponent"
        incidents:
          type: array
          items:
            $ref: "#/components/schemas/StatusIncident"
        webhookDelivery:
          type: object
          properties:
            pending:
              type: integer
            delivered24h:
              type: integer
            failed24h:
              type: integer
            successRate:
              type: number
              format: double
        sla:
          type: object
          additionalProperties:
            type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    VesselAttributes:
      type: object
      properties:
        purpose:
          type: string
          enum:
            - leisure
            - commercial
        hullConfiguration: &a40
          type: string
        propulsion:
          type: string
          enum:
            - motor
            - sail
            - motor_sailer
        vesselClass: *a40
        commercialUse: *a40
        passengerCapacity:
          type: integer
          minimum: 0
        certification: *a40
        deadweightTonnes:
          type: number
          minimum: 0
          description: Deadweight in metric tonnes.
        cargoCapacityM3:
          type: number
          minimum: 0
          description: Cargo volume in cubic metres.
        grossTonnage:
          type: integer
          minimum: 0
          description: Gross tonnage (GT), a dimensionless volume index, not weight.
        netTonnage:
          type: integer
          minimum: 0
          description: Net tonnage (NT), a dimensionless volume index, not weight.
        bollardPullTonnes:
          type: number
          minimum: 0
          description: Bollard pull in tonnes-force.
        priceOnRequest:
          type: boolean
        availabilityType:
          type: string
          enum:
            - in_stock
            - new_build
            - under_construction
        deliveryYear:
          type: integer
          minimum: 0
          maximum: 2200
        listingObjectType:
          type: string
          enum:
            - vessel
            - builder_model
          default: vessel
          description: Concrete hull vs a model offer. Builder models may omit physical build year and cannot be
            chartered.
    BoatDraft:
      type: object
      properties:
        id:
          type: string
        version:
          type: integer
          minimum: 1
        payload:
          type: object
          additionalProperties: true
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - version
        - payload
        - updatedAt
    BoatDraftWrite:
      type: object
      properties:
        version:
          type: integer
          minimum: 0
          description: 0 creates; otherwise exact current version. A stale version returns 409.
        payload:
          type: object
          additionalProperties: true
      required:
        - version
        - payload
    FacetValue:
      type: object
      properties:
        value: &a41
          type: string
        label: *a41
        count:
          type: integer
          minimum: 0
      required:
        - value
        - label
        - count
    CatalogFacets:
      type: object
      properties:
        builders:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        types:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        locations:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        purposes:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        operators:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        builderCountries:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
        hullMaterials:
          type: array
          items:
            $ref: "#/components/schemas/FacetValue"
      required:
        - builders
        - types
        - locations
        - purposes
    Company:
      type: object
      properties:
        id: &a42
          type: string
        name: *a42
        role:
          type: string
          enum:
            - owner
            - admin
            - editor
            - manager
            - viewer
        active:
          type: boolean
      required:
        - id
        - name
        - role
        - active
    TeamInvite:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
          format: email
        role:
          type: string
          enum:
            - admin
            - editor
            - manager
            - viewer
        status:
          type: string
          enum:
            - pending
            - accepted
            - revoked
            - expired
        expiresAt:
          type: string
          format: date-time
      required:
        - id
        - email
        - role
        - status
        - expiresAt
    CompanyMember:
      type: object
      properties:
        userId: &a43
          type: string
        sellerProfileId: *a43
        email: *a43
        fullName: *a43
        role:
          type: string
          enum:
            - owner
            - admin
            - editor
            - manager
            - viewer
        createdAt: *a43
    Team:
      type: object
      properties:
        sellerId: &a44
          type: string
        role: *a44
        members:
          type: array
          items:
            $ref: "#/components/schemas/CompanyMember"
        invites:
          type: array
          items:
            $ref: "#/components/schemas/TeamInvite"
      required:
        - sellerId
        - role
        - members
        - invites
    BulkListingPatch:
      type: object
      properties:
        priceAmount:
          type: integer
          format: int64
          minimum: 0
        priceOnRequest:
          type: boolean
        availabilityType:
          type: string
          enum:
            - in_stock
            - new_build
            - under_construction
    BulkListingResult:
      type: object
      properties:
        updated:
          type: integer
        errors:
          type: array
          items:
            type: object
            properties:
              id: &a45
                type: string
              message: *a45
      required:
        - updated
        - errors
    ImportResult:
      type: object
      properties:
        id: &a47
          type: string
        status:
          type: string
          enum:
            - completed
            - completed_with_errors
            - preview
        created: &a46
          type: integer
        updated: *a46
        skipped: *a46
        errors:
          type: array
          items:
            type: object
            properties:
              row: *a46
              message: *a47
        createdAt: *a47
      required:
        - status
        - created
        - updated
        - skipped
        - errors
    InventoryImportRequest:
      type: object
      properties:
        format:
          type: string
          enum:
            - csv
            - xml
        content:
          type: string
          description: CSV with externalId or NautiX XML. Up to 10000 rows. Stable company/source/externalId upsert.
            Creates drafts; absent rows never delete inventory. NautiX boat_data/vessel_attributes is the
            optional BoatsOcean commercial extension.
        dryRun:
          type: boolean
        fieldMapping:
          type: object
          additionalProperties:
            type: string
          description: CSV source header → canonical field. Empty value explicitly skips the column. Header names are
            case insensitive.
      required:
        - format
        - content
    SellerIntegration:
      type: object
      properties:
        id: &a48
          type: string
        name: *a48
        url:
          type: string
          format: uri
        feedUrl:
          type: string
          format: uri
        format:
          type: string
          enum:
            - csv
            - xml
        offerId: *a48
        offerSlug: *a48
        enabled:
          type: boolean
        intervalMinutes:
          type: integer
          minimum: 30
          maximum: 10080
          description: Inventory feed default360/min60 minutes; iCal default30/min30 minutes.
        lastRunAt: *a48
        lastSyncAt: *a48
        nextRunAt: *a48
        lastError: *a48
        exportUrl:
          type: string
          format: uri
        fieldMapping:
          type: object
          additionalProperties:
            type: string
          description: CSV source header → canonical field. Empty value explicitly skips the column. Header names are
            case insensitive.
    ICalWrite:
      type: object
      properties:
        feedUrl:
          type: string
          description: Public http(s) feed URL, no credentials, private addresses, nonstandard ports or own export URL.
        enabled:
          type: boolean
        intervalMinutes:
          type: integer
          minimum: 30
          maximum: 10080
          default: 30
      required:
        - enabled
    EventCounts:
      type: object
      properties:
        impressions: &a49
          type: integer
        clicks: *a49
        conversions: *a49
      required:
        - impressions
        - clicks
        - conversions
    ListingAnalytics:
      allOf:
        - $ref: "#/components/schemas/EventCounts"
        - type: object
          properties:
            yachtId: &a50
              type: string
            yachtName: *a50
            slug: *a50
          required:
            - yachtId
            - yachtName
            - slug
    SellerAnalytics:
      type: object
      properties:
        totals:
          $ref: "#/components/schemas/EventCounts"
        listings:
          type: array
          items:
            $ref: "#/components/schemas/ListingAnalytics"
        from: &a51
          type: string
        to: *a51
      required:
        - totals
        - listings
        - from
        - to
    BackgroundJob:
      type: object
      properties:
        id: &a52
          type: string
        kind: *a52
        status: *a52
        attempts:
          type: integer
        lastError: *a52
        createdAt: *a52
        updatedAt: *a52
        availableAt: *a52
        retryable:
          type: boolean
      required:
        - id
        - kind
        - status
        - attempts
        - retryable
    OperationObject:
      type: object
      properties:
        id: &a53
          type: string
        kind: *a53
        status: *a53
        title: *a53
        sellerId: *a53
        assignedTo: *a53
        createdAt: *a53
        updatedAt: *a53
        context:
          type: object
          additionalProperties: *a53
      required:
        - id
        - kind
        - status
        - title
        - createdAt
    OperationQueue:
      type: object
      properties:
        name: &a54
          type: string
        pending:
          type: integer
        oldestAt: *a54
      required:
        - name
        - pending
    Operations:
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: "#/components/schemas/BackgroundJob"
        totals:
          type: object
          additionalProperties:
            type: integer
        checks:
          type: array
          items:
            type: object
            properties:
              name: &a55
                type: string
              status: *a55
              detail: *a55
        queues:
          type: array
          items:
            $ref: "#/components/schemas/OperationQueue"
        objects:
          type: array
          items:
            $ref: "#/components/schemas/OperationObject"
      required:
        - jobs
        - totals
        - checks
        - queues
        - objects
    CharterOffer:
      allOf:
        - $ref: "#/components/schemas/VesselAttributes"
        - type: object
          properties:
            bookingPreview: {"$ref":"#/components/schemas/CharterTripPreview"}
            reviewSummary: {"$ref":"#/components/schemas/TransactionRating"}
            operatorReviewSummary: {"$ref":"#/components/schemas/TransactionRating"}
            id: &a56
              type: string
            slug: *a56
            yachtName: *a56
            model: *a56
            operatorName: *a56
            vesselType: *a56
            year: &a57
              type: integer
            lengthMeters:
              type: number
            cabins:
              type: integer
              minimum: 0
              description: Zero cabins is valid for a day boat.
            guests:
              type: integer
              minimum: 1
            destinationSlug: *a56
            countryCode: *a56
            location:
              type: object
              additionalProperties: *a56
            image: *a56
            gallery:
              type: array
              items: *a56
            weeklyPrice:
              $ref: "#/components/schemas/Money"
            bookingMode:
              type: string
              enum:
                - request_only
                - reservation
                - instant
            availableOnRequest:
              type: boolean
            defaultDurationDays: *a57
            minNights: *a57
            availabilitySlots:
              type: array
              items:
                type: object
                properties:
                  startDate: *a56
                  endDate: *a56
                  status: *a56
            calendarSource: *a56
            calendarUpdatedAt: *a56
            calendarStale:
              type: boolean
              description: "For iCal: no enabled successful connection, last error, or age beyond2 configured intervals
                (default60min). Busy blocks remain; available slots become on_request."
    CharterAvailabilityView:
      type: object
      properties:
        offerSlug: &a58
          type: string
        bookingMode: *a58
        calendarSource: *a58
        calendarUpdatedAt: *a58
        calendarStale:
          type: boolean
        slots:
          type: array
          items:
            type: object
            additionalProperties: true
        events:
          type: array
          items:
            type: object
            additionalProperties: true
        days:
          type: array
          items:
            type: object
            properties:
              date: *a58
              status: *a58
              source: *a58
              eventType: *a58
    InquiryPage:
      type: object
      required:
        - items
        - page
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/SellerLeadSummary"
        page:
          type: object
          required:
            - page
            - perPage
            - totalItems
            - totalPages
          properties:
            page:
              type: integer
            perPage:
              type: integer
            totalItems:
              type: integer
            totalPages:
              type: integer
    ListingPromotion:
      type: object
      required:
        - id
        - yachtId
        - sellerId
        - promotionType
        - status
        - startsAt
        - createdAt
      properties:
        id:
          type: string
        yachtId:
          type: string
        sellerId:
          type: string
        packageCode:
          type: string
        promotionType:
          type: string
        status:
          type: string
        startsAt:
          type: string
          format: date-time
        endsAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        agreementNote:
          type: string
        activatedBy:
          type: string
    ManualSalePromotionRequest:
      type: object
      required:
        - promotionType
        - endsAt
        - agreementNote
      properties:
        promotionType:
          type: string
          enum:
            - featured
            - sponsored
            - premium
        endsAt:
          type: string
          format: date-time
          description: Required future expiry.
        agreementNote:
          type: string
          minLength: 1
          maxLength: 4000
          description: Required record of the agreed placement terms; no wallet charge.
    MarketSEOKey:
      type: object
      properties:
        kind:
          type: string
          enum:
            - provider
            - marina
            - part
        locale:
          type: string
          enum:
            - en
            - ru
        category: *a29
        location: *a29
        builder: *a29
      required:
        - kind
        - locale
    MarketSEOContent:
      type: object
      properties:
        title:
          type: string
          maxLength: 180
        description:
          type: string
          maxLength: 400
        h1:
          type: string
          maxLength: 180
        intro:
          type: string
          maxLength: 4000
        blocks:
          type: array
          items:
            type: object
            properties:
              heading: *a29
              text: *a29
            required:
              - heading
              - text
        faq:
          type: array
          items:
            type: object
            properties:
              question: *a29
              answer: *a29
            required:
              - question
              - answer
        links:
          type: array
          items:
            type: object
            properties:
              label: *a29
              href: *a29
            required:
              - label
              - href
        ogImage: *a29
      required:
        - title
        - description
        - h1
        - intro
        - blocks
        - faq
        - links
        - ogImage
    MarketSEOEvent:
      type: object
      properties:
        action: *a29
        actorId: *a29
        at:
          type: string
          format: date-time
        version:
          type: integer
        content:
          $ref: "#/components/schemas/MarketSEOContent"
      required:
        - action
        - actorId
        - at
        - version
        - content
    MarketSEOPage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        key:
          $ref: "#/components/schemas/MarketSEOKey"
        content:
          $ref: "#/components/schemas/MarketSEOContent"
        published:
          $ref: "#/components/schemas/MarketSEOContent"
        version:
          type: integer
        publishedVersion:
          type: integer
        updatedAt: *a29
        publishedAt: *a29
        updatedBy: *a29
        history:
          type: array
          items:
            $ref: "#/components/schemas/MarketSEOEvent"
      required:
        - id
        - key
        - content
        - version
        - publishedVersion
        - updatedAt
        - updatedBy
        - history
    MarketSEOView:
      type: object
      properties:
        id: *a29
        key:
          $ref: "#/components/schemas/MarketSEOKey"
        path: *a29
        content:
          $ref: "#/components/schemas/MarketSEOContent"
        publishedVersion:
          type: integer
        updatedAt: *a29
        totalOffers:
          type: integer
        approvedOffers:
          type: integer
        eligible:
          type: boolean
          description: Published editorial text, reviewed real inventory in this language, enabled section and API
            PUBLIC_SITE_INDEXABLE. The frontend independently requires PUBLIC_SITE_INDEXABLE.
        reasons:
          type: array
          items:
            type: string
            enum:
              - text_unpublished
              - no_offers
              - locale_unreviewed
              - section_disabled
              - environment_closed
      required:
        - key
        - path
        - publishedVersion
        - totalOffers
        - approvedOffers
        - eligible
        - reasons
    MarketSEORecord:
      type: object
      properties:
        page:
          $ref: "#/components/schemas/MarketSEOPage"
        readiness:
          $ref: "#/components/schemas/MarketSEOView"
      required:
        - page
        - readiness
    MarketSEOInput:
      type: object
      properties:
        key:
          $ref: "#/components/schemas/MarketSEOKey"
        content:
          $ref: "#/components/schemas/MarketSEOContent"
        version:
          type: integer
          minimum: 0
        action:
          type: string
          enum:
            - save
            - publish
            - unpublish
          description: Save creates/updates a draft. Publish promotes the stored draft at the supplied version, without
            trusting content in this action. Unpublish retains the draft and immutable history.
      required:
        - key
        - version
        - action
    CatalogueMedia:
      type: object
      properties:
        url: *a37
        sourceUrl: *a37
        author: *a37
        license: *a37
        licenseUrl: *a37
        changes: *a37
        depicts: *a37
        evidenceUrl: *a37
        checkedAt: *a37
        alt: *a37
        altRu: *a37
        kind: *a37
        approved:
          type: boolean
    CatalogueContent:
      type: object
      properties:
        name: *a37
        country: *a37
        companyName: *a37
        companyCountry: *a37
        groupName: *a37
        websiteUrl: *a37
        description: *a37
        descriptionRu: *a37
        category: *a37
        sourceUrl: *a37
        discoveryUrl: *a37
        checkedAt: *a37
        sourceStatus: *a37
        sourceHash: *a37
        notes: *a37
        productionCountries:
          type: array
          items: *a37
        lifecycle:
          type: string
          enum:
            - unknown
            - current
            - announced
            - discontinued
        approvedLocales:
          type: array
          items:
            type: string
            enum:
              - ru
              - en
        media:
          type: array
          items:
            $ref: "#/components/schemas/CatalogueMedia"
        contacts:
          type: array
          items:
            type: object
            properties:
              kind: *a37
              value: *a37
              sourceUrl: *a37
              checkedAt: *a37
        specs:
          type: object
          additionalProperties: *a37
        aliases:
          type: array
          items: *a37
        rangeReview:
          $ref: "#/components/schemas/CatalogueRangeReview"
        factSources:
          type: array
          items:
            $ref: "#/components/schemas/CatalogueFactSource"
    CatalogueEntry:
      type: object
      properties:
        key: *a37
        kind:
          type: string
          enum:
            - builder
            - series
            - model
            - candidate
            - source
        slug: *a37
        builderSlug: *a37
        seriesSlug: *a37
        version:
          type: integer
        publishedVersion:
          type: integer
        content:
          $ref: "#/components/schemas/CatalogueContent"
        published:
          $ref: "#/components/schemas/CatalogueContent"
        manualFields:
          type: array
          items: *a37
        conflicts:
          type: array
          items: *a37
        history:
          type: array
          items:
            type: object
            properties:
              action: *a37
              actor: *a37
              at: *a37
              version:
                type: integer
              note: *a37
        updatedAt: *a37
    CataloguePage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/CatalogueEntry"
        page:
          $ref: "#/components/schemas/PageInfo"
        reasons:
          type: object
          additionalProperties:
            type: array
            items: *a37
    CatalogueRun:
      type: object
      properties:
        id: *a37
        source: *a37
        status: *a37
        startedAt: *a37
        finishedAt: *a37
        new:
          type: integer
        changed:
          type: integer
        unchanged:
          type: integer
        conflicts:
          type: array
          items: *a37
        errors:
          type: array
          items: *a37
        entries:
          type: array
          items:
            $ref: "#/components/schemas/CatalogueEntry"
    CatalogueRangeReview:
      type: object
      properties:
        status:
          type: string
          enum:
            - complete
            - partial
            - unavailable
            - custom
            - needs_review
        checkedAt: *a37
        sourceUrls:
          type: array
          items: *a37
        officialModelCount:
          type: integer
        reviewedModelCount:
          type: integer
        note: *a37
    CatalogueFactSource:
      type: object
      properties:
        field: *a37
        url: *a37
        checkedAt: *a37
        label: *a37
        publishedValue: *a37
    SavedSearchFilters:
      type: object
      description: Stored catalogue conditions. Missing fields mean no restriction. cabinsMin is retained for
        backward compatibility.
      properties:
        query:
          type: string
        type:
          type: string
        builder:
          type: string
        builderCountries:
          type: array
          items:
            type: string
        location:
          type: string
        condition:
          type: string
        hullMaterial:
          type: string
        seller:
          type: string
        purpose:
          type: string
        hullConfiguration:
          type: string
        propulsion:
          type: string
        vesselClass:
          type: string
        minPrice:
          type: number
          minimum: 0
        maxPrice:
          type: number
          minimum: 0
        minLength:
          type: number
          minimum: 0
        maxLength:
          type: number
          minimum: 0
        minYear:
          type: number
          minimum: 0
        maxYear:
          type: number
          minimum: 0
        cabinsMin:
          type: number
          minimum: 0
        guestsMin:
          type: number
          minimum: 0
        currency:
          type: string
