{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/affise/main/json-schema/affise-offer-tier-structure-schema.json",
  "title": "offer_tier_structure",
  "description": "Commission tier item structure",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affise-admin-offers-api-openapi.yml#/components/schemas/offer_tier_structure",
  "type": "object",
  "properties": {
    "timeframe": {
      "type": "string",
      "enum": [
        "day",
        "week",
        "month",
        "all"
      ],
      "description": "Possible values: day, week, month, all"
    },
    "type": {
      "type": "string",
      "enum": [
        "budget",
        "conversions"
      ],
      "description": "Possible values: budget, conversions"
    },
    "value": {
      "type": "number",
      "description": "The integer value for the type of conversion and the float value for the budget type."
    },
    "modifier_value": {
      "type": "number",
      "format": "float",
      "description": "The float value."
    },
    "modifier_type": {
      "type": "string",
      "enum": [
        "by_fix",
        "by_percent",
        "to_fix",
        "to_percent"
      ],
      "description": "Possible values: by_fix, by_percent, to_fix, to_percent."
    },
    "goals": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array[string]. Either specifies goal value or is empty."
    },
    "target_goals": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array[string]. Either specifies target goal value or is empty."
    },
    "affiliate_type": {
      "type": "string",
      "enum": [
        "all",
        "each",
        "exact"
      ],
      "default": "each",
      "description": "Possible values: all, each, exact. Default: each."
    },
    "affiliates": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "Array[integer]. Either specifies affiliate ID or is empty filed."
    },
    "modifier_payment_type": {
      "type": "string",
      "enum": [
        "payout",
        "total",
        "payout_and_total"
      ],
      "default": "payout",
      "description": "Possible values: payout, total, payout_and_total. Default: payout."
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array[string]. Countries ISO codes"
    },
    "conversion_status": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "confirmed",
          "pending",
          "declined",
          "hold"
        ]
      },
      "description": "Array[string]. Possible values: confirmed, pending, declined, hold."
    }
  }
}