> ## 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.

# Orders

> Your CPC (Cost Per Click) orders.



## OpenAPI

````yaml GET /cpc/orders
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:
  /cpc/orders:
    get:
      tags:
        - CPC
      summary: Orders
      description: Your CPC (Cost Per Click) orders.
      operationId: getCpcOrders
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
        - name: order_id
          in: query
          schema:
            type: string
          description: Filter by order public ID
        - name: of_account_id
          in: query
          schema:
            type: integer
          description: Filter by OnlyFans account ID
        - name: status
          in: query
          schema:
            type: string
            enum:
              - waiting
              - active
              - rejected
              - completed
          description: Filter by order status
        - name: offer_id
          in: query
          schema:
            type: integer
          description: Filter by numeric offer id.
        - name: creative_public_id
          in: query
          schema:
            type: string
          description: >-
            Filter by creative public id (e.g. `cpcr_p1bzku7u`). Only orders
            running on this specific creative are returned. Take the value from
            the response's `creative.public_id` field or from the studio UI.
        - $ref: '#/components/parameters/SinceChangedAt'
        - $ref: '#/components/parameters/UntilChangedAt'
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - created_at_desc
              - created_at_asc
              - changed_at_desc
              - changed_at_asc
              - completed_at_desc
              - clicks_desc
              - clicks_delivered_desc
              - clicks_today_desc
            default: created_at_desc
          description: >-
            Sort order.

            - `created_at_desc`: newest orders first (default).

            - `created_at_asc`: oldest orders first.

            - `changed_at_desc`: most recently changed first (delta-sync
            friendly).

            - `changed_at_asc`: least recently changed first.

            - `completed_at_desc`: most recently completed first.

            - `clicks_desc`: by ordered click count, descending.

            - `clicks_delivered_desc`: by actually delivered clicks (lifetime),
            descending.

            - `clicks_today_desc`: by clicks delivered since today's UTC
            midnight, descending (real-time).
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CpcOrder'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          description: Unauthorized
          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:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number, 1-indexed.
      example: 1
    PageSize:
      name: page_size
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
      description: Items per page. Default 50, max 100.
      example: 50
    SinceChangedAt:
      name: since_changed_at
      in: query
      schema:
        type: integer
        minimum: 0
      description: >-
        Delta-sync filter. Return only rows whose `changed_at` is at or after
        this UNIX timestamp. Pair with `until_changed_at` for a window.
      example: 1738000000
    UntilChangedAt:
      name: until_changed_at
      in: query
      schema:
        type: integer
        minimum: 0
      description: >-
        Delta-sync filter. Return only rows whose `changed_at` is strictly
        before this UNIX timestamp. Useful to lock the upper bound while
        paginating an open delta range.
      example: 1738604800
  schemas:
    CpcOrder:
      type: object
      properties:
        order_id:
          type: string
          description: Unique order public ID
          example: cpco_xxxxxxx
        order_number:
          type: integer
          nullable: true
          description: Sequential order number for your account
          example: 42
        offer_marketer_uuid:
          type: string
          description: Marketer UUID
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        offer_marketer_name:
          type: string
          description: Marketer name
          example: 🥷 Owen
        of_account_id:
          type: integer
          description: Your OnlyFans account ID
          example: 123456
        creative:
          type: object
          properties:
            public_id:
              type: string
              description: >-
                Creative public id. Use this value as `creative_public_id` query
                param to filter.
              example: cpcr_p1bzku7u
            name:
              type: string
              description: Creative name
              example: My Creative
            images:
              type: array
              description: Creative images with optional performance stats
              items:
                type: object
                properties:
                  hash:
                    type: string
                    nullable: true
                    description: >-
                      Stable 6-char hex id of the image. Pass it back as
                      `image_hashes[]` on `POST /cpc/creatives` to reuse the
                      same image on a new creative without re-uploading. `null`
                      for legacy rows that pre-date the multi-image carousel.
                    example: d3e401
                  url:
                    type: string
                    description: CDN URL of the image (200px webp thumbnail)
                    example: https://cdn.otsync.com/creatives/d3e401_200.webp
                  stats:
                    type: object
                    nullable: true
                    description: >-
                      Performance stats for this image. Present only if stats
                      are available for this order and image.
                    properties:
                      ctr:
                        type: number
                        format: float
                        description: Click-through rate
                        example: 0.0472
                      in_testing:
                        type: boolean
                        description: Whether the image is still in the testing phase
                        example: false
                required:
                  - url
        url:
          type: string
          description: Target URL
          example: https://onlyfans.com/...
        can_stop:
          type: boolean
          description: Whether `POST /cpc/orders/{public_id}/stop` would succeed right now.
        clicks:
          type: object
          properties:
            ordered:
              type: integer
              description: Clicks ordered
              example: 1000
            delivered:
              type: integer
              description: Clicks delivered
              example: 450
            today:
              type: integer
              description: Clicks delivered today
              example: 17
        price_per_click:
          type: number
          format: float
          description: Price per click (USD)
          example: 0.55
        total_spent:
          type: number
          format: float
          description: Total amount spent (USD)
          example: 550
        status:
          type: string
          enum:
            - waiting
            - active
            - rejected
            - completed
          description: Order status
          example: active
        stats:
          $ref: '#/components/schemas/OrderStats'
        created_at:
          type: string
          format: date-time
          description: Creation date (ISO 8601)
          example: '2026-01-30T17:05:12+03:00'
        created_at_ts:
          type: integer
          description: Creation date as a Unix timestamp
          example: 1738249512
        changed_at:
          type: string
          format: date-time
          description: >-
            Last time anything visible on this order changed: order status,
            payment status, clicks_delivered, or related campaign data. Use with
            the `since_changed_at` query param for delta-sync polling.
          example: '2026-05-05T13:24:30+00:00'
        changed_at_ts:
          type: integer
          description: Last-changed date as a Unix timestamp
          example: 1746450270
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: Completion date (ISO 8601), null if active
          example: null
    Pagination:
      type: object
      description: >-
        Page-based pagination, returned by every list endpoint that isn't a
        cursor feed.
      properties:
        page:
          type: integer
          description: Current page number (1-indexed).
          example: 1
        page_size:
          type: integer
          description: Number of items per page. Default 50, max 100.
          example: 50
        total:
          type: integer
          description: Total number of records matching the filters.
          example: 150
        total_pages:
          type: integer
          description: Total pages available.
          example: 3
        has_next:
          type: boolean
          description: >-
            `true` when `page < total_pages` (i.e. there is at least one more
            page to fetch).
          example: true
    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.
    OrderStats:
      type: object
      nullable: true
      description: >-
        Unified delivery-stats block used by /cpl/orders, /cpc/orders,
        /revshare/campaigns and /swaps/orders. `null` when the resource has no
        marketing data yet, or when the income side is hidden (swaps without
        `stats_public_arpu`).
      properties:
        fans_subscribed:
          type: object
          properties:
            total:
              type: integer
            today:
              type: integer
        transactions_sum:
          type: object
          nullable: true
          description: >-
            Sum of OnlyFans transactions on this resource's fans, USD. `null` on
            swap orders where the income side is hidden.
          properties:
            total:
              type: number
              format: float
            today:
              type: number
              format: float
        arpu:
          type: number
          format: float
          nullable: true
          description: >-
            transactions_sum.total / fans_subscribed.total. `null` when income
            is hidden.
        arpu_paying:
          type: number
          format: float
          nullable: true
          description: >-
            ARPU restricted to fans who paid at least once. `null` when income
            is hidden.
        romi:
          type: integer
          nullable: true
          description: >-
            ((transactions_sum.total / cost) - 1) * 100. `null` for revshare or
            when cost is 0.
        pay_subscribe:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans on an initial paid subscription.
        pay_resubscribe:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans on a recurring paid subscription.
        purchases_1:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans who made ≥ 1 paid purchase.
        purchases_2:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans who made ≥ 2 paid purchases.
        purchases_5:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans who made ≥ 5 paid purchases.
        whale:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans who spent ≥ $500 lifetime.
        messages_3:
          $ref: '#/components/schemas/OrderStatsBucket'
          description: Fans who exchanged ≥ 3 messages.
    OrderStatsBucket:
      type: object
      properties:
        total:
          type: integer
          description: Lifetime count.
        today:
          type: integer
          description: Added since today's midnight (server time).
        percent:
          type: number
          format: float
          description: '`total / fans_subscribed.total * 100`.'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key from the Studio Dashboard

````