{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ordogrid/json-schema/ordogrid-fidelity-program-write-schema.json",
  "title": "FidelityProgramWrite",
  "description": "Partial upsert; settings merge with stored settings. Unknown settings are discarded.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ordogrid-fidelity-api-openapi.yml#/components/schemas/FidelityProgramWrite",
  "properties": {
    "mode": {
      "enum": [
        "points",
        "stamps"
      ],
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "settings": {
      "properties": {
        "brand_color": {
          "type": "string"
        },
        "earn_rate": {
          "default": 1,
          "exclusiveMinimum": 0,
          "type": "number"
        },
        "expiry_reminder_days": {
          "default": 3,
          "minimum": 0,
          "type": "integer"
        },
        "expiry_reminder_enabled": {
          "default": true,
          "type": "boolean"
        },
        "from_name": {
          "type": "string"
        },
        "google_review_url": {
          "type": "string"
        },
        "logo_url": {
          "type": "string"
        },
        "min_order_amount": {
          "default": 0,
          "minimum": 0,
          "type": "number"
        },
        "reply_to": {
          "type": "string"
        },
        "rounding": {
          "const": "floor",
          "default": "floor"
        },
        "wallet_enabled": {
          "default": true,
          "type": "boolean"
        },
        "welcome_bonus_points": {
          "default": 0,
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "status": {
      "enum": [
        "active",
        "inactive"
      ],
      "type": "string"
    }
  },
  "type": "object"
}