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

# Quote Order

> Preview a CPL order without placing it.

Runs the full [`POST /cpl/orders`](/api/cpl-orders-create) validation matrix without committing. Surfaces server-computed pricing, the balance check, and a list of eligibility errors.

`eligible: true` means the same body would succeed against `POST /cpl/orders`.


## OpenAPI

````yaml GET /cpl/orders/quote
openapi: 3.0.3
info:
  title: OnlyTraffic Studio API
  version: 1.0.0
  description: >-
    External API for OnlyTraffic Studio. Manage and retrieve data about your
    subscribers, CPL orders, and CPC orders.
servers:
  - url: https://studio-api.onlytraffic.com/api/external/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: API key holder's wallet, profile, and aggregate state.
  - name: Accounts
    description: OnlyFans accounts attached to the API key holder.
  - name: Agencies
    description: Agency CRUD and image management. All edits stage in moderation.
  - name: CPL
    description: >-
      Cost-per-lead orders: place, list, cancel, manage settings, browse partner
      offers.
  - name: CPC
    description: Cost-per-click orders and creative management.
  - name: RevShare
    description: Revenue-share campaigns and invoices.
  - name: Swaps
    description: Two-sided traffic swap orders and offers.
  - name: Subscribers
    description: Per-fan delivery feed (cursor-paginated).
  - name: Transactions
    description: Per-transaction OF revenue feed (cursor-paginated).
paths:
  /cpl/orders/quote:
    get:
      tags:
        - CPL
      summary: Preview a CPL order.
      description: Preview a CPL order without placing it.
      operationId: quoteCplOrder
      parameters:
        - name: offer_id
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
        - name: of_account_id
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
        - name: quantity
          in: query
          required: true
          schema:
            type: integer
            minimum: 1
        - name: campaign_type
          in: query
          required: true
          schema:
            type: string
            enum:
              - free
              - paid
              - paid_trial
        - name: trial_days
          in: query
          schema:
            type: integer
            enum:
              - 1
              - 3
              - 7
              - 14
              - 30
              - 90
              - 180
              - 360
          description: Required when `campaign_type=paid_trial`.
        - name: content_channels
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - lifestyle
                - tiktok
                - lingerie
                - light_nudes
                - nudes
          style: form
          explode: true
          description: >-
            Optional filter. When omitted, every live channel on the model is
            used. When set, the order uses only the listed channels (intersected
            with the live ones).
      responses:
        '200':
          description: Quote.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/CplOrderQuote'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Offer or OF account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            Server error. Body always reads `{success:false,
            error:"server_error", message:"Server error"}` (no internal details
            leak).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CplOrderQuote:
      type: object
      description: >-
        Pre-flight validation + pricing for a CPL order. `eligible: true` means
        the same input would succeed against `POST /cpl/orders`.
      properties:
        eligible:
          type: boolean
        errors:
          type: array
          items:
            type: string
          description: >-
            Stable machine-readable codes, e.g. `quantity_below_minimum`,
            `campaign_type_paid_requires_paid_model`, `model_country_blocked`,
            `model_busy_with_other_campaign`, `model_session_inactive`,
            `no_approved_channels_selected`, `unpaid_invoices`,
            `insufficient_balance`, `trial_days_required`,
            `trial_days_not_available`.
        warnings:
          type: array
          items:
            type: string
          description: Codes that do not block placement, e.g. `offer_in_queue`.
        pricing:
          type: object
          properties:
            price_per_fan:
              type: number
              format: float
              description: Per-fan price in USD, after offer markup and your tier discount.
            total_cost:
              type: number
              format: float
              description: '`price_per_fan × quantity`.'
            client_discount_percent:
              type: number
              format: float
              description: Your CPL tier discount, percent.
        balance:
          type: object
          properties:
            current:
              type: number
              format: float
              description: Available wallet balance in USD.
            sufficient:
              type: boolean
              description: '`current >= total_cost`.'
        unpaid_invoices:
          type: object
          nullable: true
          description: >-
            Present (non-null) only when the unpaid-invoices gate is tripped
            (outstanding total > $500 or oldest invoice older than 3 days).
          properties:
            count:
              type: integer
            total:
              type: number
              format: float
            oldest_date_ts:
              type: integer
              nullable: true
        pay_as_you_go:
          type: object
          properties:
            enabled:
              type: boolean
              description: >-
                When true, the order is automatically created in `incremental`
                mode: a deposit on accept, then per-fan billing as fans deliver.
            deposit_percent:
              type: integer
              description: Deposit percent applied on accept when PAYG is on.
        offer:
          type: object
          properties:
            id:
              type: integer
            min_quantity:
              type: integer
            max_quantity:
              type: integer
              nullable: true
            campaign_types:
              type: array
              items:
                type: string
            trial_days_available:
              type: array
              items:
                type: integer
        model:
          type: object
          properties:
            of_account_id:
              type: integer
            username:
              type: string
            session_status:
              type: string
              description: '`active` is the only state the order can launch from.'
            subscribe_price:
              type: number
              format: float
        content_channels:
          type: object
          properties:
            available:
              type: array
              items:
                type: string
              description: All live channels on the model.
            selected:
              type: array
              items:
                type: string
              description: >-
                Channels that will actually be used (intersection of `available`
                and the request's `content_channels[]`, or `available` itself
                when no filter was sent).
        queue:
          type: object
          nullable: true
          description: >-
            Present only when the offer has hit `campaigns_count` and your order
            would queue.
          properties:
            position:
              type: integer
            estimated_days:
              type: integer
    ErrorResponse:
      type: object
      description: Standard error envelope for all 4xx/5xx responses.
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
          description: Always false on error responses.
        error:
          type: string
          description: Stable snake_case machine-readable error code. Branch on this.
          example: validation_failed
        message:
          type: string
          description: >-
            Human-friendly text. For 5xx this is always the literal `Server
            error`. For 4xx an actionable validation/auth message is returned.
        details:
          type: object
          nullable: true
          description: >-
            Optional per-field diagnostic information. On 422 carries `{<field>:
            ["error_code", ...]}`. On 402 (`insufficient_balance`) carries
            `{required, current}`. On 426 (`unpaid_invoices`) carries `{count,
            total, oldest_date_ts}`. Absent on most other errors.
          additionalProperties: true
        retry_after:
          type: integer
          nullable: true
          description: >-
            Seconds until the next request will succeed. Present only on 429
            responses (rate limit). Mirrors the `Retry-After` HTTP header.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key from the Studio Dashboard

````