{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/affise/main/json-schema/affise-offer-affiliate-schema.json",
  "title": "offer_affiliate",
  "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_affiliate",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "offer_id": {
      "type": "string"
    },
    "bundle_id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "preview_url": {
      "type": "string"
    },
    "description_lang": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "cr": {
      "type": "number"
    },
    "epc": {
      "type": "number"
    },
    "logo": {
      "type": "string"
    },
    "logo_source": {
      "type": "string"
    },
    "stop_at": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "allowed": {
            "type": "integer"
          }
        }
      }
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "full_categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "payments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "type": "array",
            "items": {}
          },
          "devices": {
            "type": "array",
            "items": {}
          },
          "os": {
            "type": "array",
            "items": {}
          },
          "goal": {
            "type": "string"
          },
          "revenue": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "country_exclude": {
            "type": "boolean"
          }
        }
      }
    },
    "caps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "goals": {
            "type": "object"
          },
          "period": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "integer"
          },
          "goal_type": {
            "type": "string"
          },
          "country_type": {
            "type": "string"
          },
          "country": {
            "type": "array",
            "items": {}
          }
        }
      }
    },
    "caps_status": {
      "type": "array",
      "items": {}
    },
    "required_approval": {
      "type": "boolean"
    },
    "is_cpi": {
      "type": "boolean"
    },
    "creatives": {
      "type": "array",
      "items": {}
    },
    "creatives_zip": {
      "type": [
        "string",
        "null"
      ]
    },
    "impressions_link": {
      "type": [
        "string",
        "null"
      ]
    },
    "landings": {
      "type": "array",
      "items": {}
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          },
          "postbacks": {
            "type": "array",
            "items": {}
          },
          "created": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "macro_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "link": {
      "type": "string"
    },
    "use_https": {
      "type": "boolean"
    },
    "use_http": {
      "type": "boolean"
    },
    "hold_period": {
      "type": "integer"
    },
    "kpi": {
      "type": "object",
      "properties": {
        "en": {
          "type": "string"
        }
      }
    },
    "click_session": {
      "type": "string"
    },
    "minimal_click_session": {
      "type": "string"
    },
    "targeting": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "condition": {
            "type": "string"
          },
          "country": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "region": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "city": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "os": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "os_deny": {
            "type": "boolean"
          },
          "isp": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "isp_organization": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              },
              "deny_empty": {
                "type": "boolean"
              }
            }
          },
          "ip": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              },
              "ipv6_deny": {
                "type": "boolean"
              }
            }
          },
          "browser": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "browser_version": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "brand": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "device_type": {
            "type": "array",
            "items": {}
          },
          "device_type_deny": {
            "type": "boolean"
          },
          "device_model": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              }
            }
          },
          "connection": {
            "type": "array",
            "items": {}
          },
          "connection_deny": {
            "type": "boolean"
          },
          "referrer": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              },
              "deny_empty": {
                "type": "boolean"
              }
            }
          },
          "ua": {
            "type": "object",
            "properties": {
              "allow": {
                "type": "array",
                "items": {}
              },
              "deny": {
                "type": "array",
                "items": {}
              },
              "deny_crawlers": {
                "type": "boolean"
              }
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "block_proxy": {
            "type": "boolean"
          }
        }
      }
    },
    "commission_tiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "goals": {
            "type": "array",
            "items": {}
          },
          "timeframe": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "integer"
          },
          "target_goals": {
            "type": "array",
            "items": {}
          },
          "modifier_type": {
            "type": "string"
          },
          "modifier_value": {
            "type": "number"
          },
          "countries": {
            "type": "array",
            "items": {}
          },
          "conversion_status": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "modifier_payment_type": {
            "type": "string"
          }
        }
      }
    },
    "enabled_commission_tiers": {
      "type": "boolean"
    },
    "consider_personal_targeting_only": {
      "type": "boolean"
    },
    "hosts_only": {
      "type": "boolean"
    },
    "uniq_ip_only": {
      "type": "boolean"
    },
    "reject_not_uniq_ip": {
      "type": "integer"
    },
    "sign_clicks_integration": {
      "type": "string",
      "description": "Sign clicks integration setting"
    },
    "allow_duplicate_conversions": {
      "type": "boolean"
    },
    "enable_impression_sub3_uniqueness": {
      "type": "boolean"
    }
  }
}