{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapeatlas/json-schema/scrapeatlas-referral-dashboard-response-schema-schema.json",
  "title": "referralDashboardResponseSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapeatlas-dashboard-api-openapi.yml#/components/schemas/referralDashboardResponseSchema",
  "type": "object",
  "properties": {
    "partnershipStatus": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "APPROVED",
            "PENDING",
            "REJECTED"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "link": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048,
      "format": "uri",
      "x-runtime-refinement": true
    },
    "trackingId": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "currency": {
      "type": "string",
      "const": "USD"
    },
    "stats": {
      "type": "object",
      "properties": {
        "clicks": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "leads": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sales": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "pending": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "approved": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "paid": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        }
      },
      "required": [
        "clicks",
        "leads",
        "sales",
        "pending",
        "approved",
        "paid"
      ],
      "additionalProperties": false
    },
    "earnings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "commission": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "APPROVED",
              "PAID",
              "REFUNDED",
              "DECLINED"
            ]
          }
        },
        "required": [
          "date",
          "amount",
          "commission",
          "status"
        ],
        "additionalProperties": false
      },
      "maxItems": 10
    }
  },
  "required": [
    "partnershipStatus",
    "link",
    "trackingId",
    "currency",
    "stats",
    "earnings"
  ],
  "additionalProperties": false
}