{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/webshare-io/json-schema/webshare-io-patch-api-v2-referral-config-response-schema.json",
  "title": "PatchApiV2ReferralConfigResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/webshare-io-openapi-generated.yml#/components/schemas/PatchApiV2ReferralConfigResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier of the referral config instance."
    },
    "mode": {
      "type": "string",
      "description": "Indicates whether the system is in payout or credits mode."
    },
    "paypal_payout_email": {
      "type": "string",
      "description": "May be null if mode is credits. Must be set if the mode is payout."
    },
    "id_verification_required": {
      "type": "boolean",
      "description": "After an account is eligible for a payout, they must complete ID verification."
    },
    "credits_earned": {
      "type": "number",
      "description": "Amount of USD earned and pending to be converted to account credits."
    },
    "payouts_earned": {
      "type": "number",
      "description": "Amount of USD earned and pending to be earned out to PayPal account."
    },
    "total_credits_earned": {
      "type": "number",
      "description": "Total amount of credits earned so far."
    },
    "total_payouts_earned": {
      "type": "number",
      "description": "Total amount of payouts earned so far."
    },
    "number_of_users_referred": {
      "type": "integer",
      "description": "Number of unique users referred."
    },
    "number_of_users_upgraded": {
      "type": "integer",
      "description": "Number of unique users who upgraded."
    },
    "earn_out_frequency": {
      "type": "string",
      "description": "Frequency of earn-outs. Format is [DD] [HH:MM:SS]."
    },
    "next_earn_out_date": {
      "type": "string",
      "description": "Timestamp of the next earn-out."
    },
    "minimum_earn_out_amount": {
      "type": "number",
      "description": "Minimum USD need to be earned for the earn-out to be processed."
    },
    "referral_code": {
      "type": "string",
      "description": "Unique referral code of this user."
    },
    "referral_url": {
      "type": "string",
      "description": "Example referral URL to the Webshare home page."
    },
    "referral_maximum_credits": {
      "type": "number",
      "description": "Maximum amount of credits/payouts can be earned from a single referral."
    },
    "referral_credit_ratio": {
      "type": "number",
      "description": "Ratio of credits/payouts earned from a referral purchase."
    },
    "referral_payment_pending_days": {
      "type": "string",
      "description": "Grace period for a referral credit/payouts to become available."
    },
    "promo_type": {
      "type": "string",
      "description": "The type of promotion referrals will receive."
    },
    "promo_value": {
      "type": "integer",
      "description": "The value of the promotion referrals will receive."
    },
    "created_at": {
      "type": "string",
      "description": "The timestamp of when this instance was created."
    },
    "updated_at": {
      "type": "string",
      "description": "The timestamp when this instance was last updated."
    }
  }
}