{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-click-list-schema.json",
  "title": "ClickList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-clicks-api-openapi.yml#/components/schemas/ClickList",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Click"
      }
    },
    "has_more": {
      "type": "boolean",
      "description": "Pass the last object's id as `starting_after` to fetch the next page"
    },
    "total_count": {
      "type": "integer",
      "description": "Count of every object matching the filters, ignoring the cursor"
    }
  },
  "required": [
    "data",
    "has_more",
    "total_count"
  ],
  "$defs": {
    "Click": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^(sample_)?clk_",
          "description": "Prefixed id (`clk_…`)"
        },
        "object": {
          "type": "string",
          "enum": [
            "click"
          ]
        },
        "program_id": {
          "type": "string",
          "pattern": "^(sample_)?prg_",
          "description": "Prefixed id (`prg_…`)"
        },
        "partner_id": {
          "type": "string",
          "pattern": "^(sample_)?part_",
          "description": "Prefixed id (`part_…`)"
        },
        "link_id": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^(sample_)?lnk_",
          "description": "Prefixed id (`lnk_…`)"
        },
        "referral_id": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^(sample_)?ref_",
          "description": "Prefixed id (`ref_…`)"
        },
        "user_agent": {
          "type": [
            "string",
            "null"
          ]
        },
        "referer": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "device": {
          "type": [
            "string",
            "null"
          ]
        },
        "landing_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "ISO-8601, UTC"
        }
      },
      "required": [
        "id",
        "object",
        "program_id",
        "partner_id",
        "link_id",
        "referral_id",
        "user_agent",
        "referer",
        "country",
        "device",
        "landing_url",
        "created_at"
      ]
    }
  }
}