{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-program-update-schema.json",
  "title": "ProgramUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-programs-api-openapi.yml#/components/schemas/ProgramUpdate",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "product_name": {
      "type": "string",
      "minLength": 1
    },
    "website_url": {
      "type": "string",
      "format": "uri"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ]
    },
    "terms_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "cookie_days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365
    },
    "commission_on_net_revenue": {
      "type": "boolean"
    },
    "holding_period_days": {
      "type": "integer",
      "minimum": 0,
      "maximum": 180
    },
    "min_payout_minor": {
      "type": "integer",
      "minimum": 0,
      "description": "Integer minor units (cents, pence). Never a float, never a string."
    },
    "payout_term": {
      "type": "string",
      "enum": [
        "net_15",
        "net_30",
        "net_60"
      ]
    },
    "block_self_referrals": {
      "type": "boolean"
    },
    "blocked_countries": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 2
      }
    },
    "require_tax_forms": {
      "type": "boolean"
    }
  }
}