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

# Get rotator rules

> Returns rotator routing rules ordered by priority: rule conditions plus weighted streams of landings and offers. Read-only in public API v1. Rules are managed in the panel.



## OpenAPI

````yaml openapi.public.yaml GET /api/v1/rotators/{id}/rules
openapi: 3.0.3
info:
  title: Metricanic API
  version: 1.0.0
  description: >
    # Metricanic API


    Use the Metricanic REST API to manage campaigns, traffic sources, affiliate
    networks, landings, offers and rotators, and to read performance reports and
    individual events.


    Base URL: `https://panel.metricanic.com/api/v1`. Requests require an
    account-scoped Bearer key created in **Profile → API keys**. Use `read` for
    GET requests or `write` for supported mutations. Keys are intended for
    server-side integrations. Cross-origin browser writes are rejected.


    Start with the [API
    quickstart](https://docs.metricanic.com/api-reference/introduction), then
    follow the guides for
    [authentication](https://docs.metricanic.com/api-reference/authentication),
    [reports and event
    pagination](https://docs.metricanic.com/api-reference/reports-and-events),
    and [errors and retries](https://docs.metricanic.com/api-reference/errors).


    Only the operations in this specification are supported under `/api/v1`.
    Individual endpoint schemas define the request and response shapes. List
    endpoints do not all share the same pagination model. The product's OAuth
    MCP connection has separate, read-only capabilities.
  license:
    name: Proprietary
    url: https://metricanic.com/legal/terms
servers:
  - url: https://panel.metricanic.com
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Authentication and session endpoints.
  - name: Campaigns
    description: Campaign and campaign-related management endpoints.
  - name: Landings
    description: Landing page management endpoints.
  - name: Offers
    description: Offer management endpoints.
  - name: Reports
    description: Aggregated reporting and chart endpoints.
  - name: Rotators
    description: Rotator setup and routing-rule endpoints.
  - name: TrafficSources
    description: Traffic source configuration endpoints.
  - name: AffiliateNetworks
    description: Affiliate network management endpoints.
  - name: Events
    description: Raw event and error inspection endpoints.
paths:
  /api/v1/rotators/{id}/rules:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Rotators
      summary: Get rotator rules
      description: >-
        Returns rotator routing rules ordered by priority: rule conditions plus
        weighted streams of landings and offers. Read-only in public API v1.
        Rules are managed in the panel.
      operationId: getRotatorRules
      responses:
        '200':
          description: Rules list
          content:
            application/json:
              example:
                ok: true
                data:
                  - id: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5e
                    label: Default
                    priority: 0
                    enabled: true
                    conditions: {}
                    streams:
                      - streamIdx: 0
                        name: Stream A
                        weight: 100
                        enabled: true
                        pathId: 5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e
                        deletedAt: null
                        landers:
                          - landingId: 4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f
                            weight: 100
                            enabled: true
                        offers:
                          - offerId: 2e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b
                            weight: 100
                            enabled: true
              schema:
                $ref: '#/components/schemas/RotatorRulesResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    RotatorRulesResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/RotatorRule'
      required:
        - ok
        - data
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
          additionalProperties: false
        requestId:
          type: string
      required:
        - ok
        - error
      additionalProperties: false
    RotatorRule:
      type: object
      properties:
        id:
          type: string
          description: Server-owned stable rule identity returned by the API.
        label:
          type: string
          maxLength: 120
          description: >-
            User-facing rule label. It is metadata only and does not affect
            routing.
          nullable: true
        priority:
          type: integer
        conditions:
          type: object
        enabled:
          type: boolean
          description: >-
            Disabled rules are retained but ignored when routing traffic.
            Priority 0 rule is always enabled.
        streams:
          type: array
          items:
            $ref: '#/components/schemas/RotatorRuleStream'
      required:
        - id
        - label
        - priority
        - streams
    RotatorRuleStream:
      type: object
      allOf:
        - $ref: '#/components/schemas/RotatorRuleStreamInput'
        - type: object
          properties:
            deletedAt:
              type: integer
              nullable: true
    RotatorRuleStreamInput:
      type: object
      properties:
        streamIdx:
          type: integer
        weight:
          type: integer
        name:
          type: string
        enabled:
          type: boolean
          description: Toggle to temporarily exclude the path from rotation.
        pathId:
          type: string
          nullable: true
        landers:
          type: array
          items:
            $ref: '#/components/schemas/RotatorStreamLander'
        offers:
          type: array
          items:
            $ref: '#/components/schemas/RotatorStreamOffer'
      required:
        - streamIdx
        - name
        - landers
        - offers
    RotatorStreamLander:
      type: object
      properties:
        landingId:
          type: string
        weight:
          type: integer
        enabled:
          type: boolean
          description: >-
            When false the landing stays attached but does not participate in
            traffic split.
      required:
        - landingId
    RotatorStreamOffer:
      type: object
      properties:
        offerId:
          type: string
        weight:
          type: integer
        enabled:
          type: boolean
          description: Disable to keep the offer configured without sending traffic to it.
      required:
        - offerId
  responses:
    RateLimitedError:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying when available.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailableError:
      description: A required platform dependency is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ErrorResponse:
      description: >-
        Standard API error envelope. Common platform errors include
        authentication failures, forbidden scope or origin, billing gate, rate
        limiting, and temporary service unavailability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````