{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ordogrid/json-schema/ordogrid-fidelity-reward-schema.json",
  "title": "FidelityReward",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ordogrid-fidelity-api-openapi.yml#/components/schemas/FidelityReward",
  "properties": {
    "archived": {
      "type": "boolean"
    },
    "category": {
      "default": "gift",
      "enum": [
        "gift",
        "discounts",
        "exclusive"
      ],
      "type": "string"
    },
    "cost_points": {
      "default": 0,
      "minimum": 0,
      "type": "integer"
    },
    "created_at": {
      "description": "UTC, ISO 8601 with milliseconds and Z, e.g. 2026-10-22T10:00:00.123Z.",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$",
      "type": [
        "string",
        "null"
      ]
    },
    "default_language": {
      "default": "en",
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "discount": {
      "properties": {
        "max_discount_cap": {
          "type": [
            "number",
            "null"
          ]
        },
        "min_order_amount": {
          "type": "number"
        },
        "type": {
          "type": "string"
        },
        "value": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "issued_count": {
      "type": "integer"
    },
    "languages": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "name": {
      "minLength": 1,
      "type": "string"
    },
    "object": {
      "const": "fidelity_reward"
    },
    "redemptions": {
      "type": "integer"
    },
    "status": {
      "default": "active",
      "enum": [
        "active",
        "inactive"
      ],
      "type": "string"
    },
    "translations": {
      "additionalProperties": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "object"
    },
    "updated_at": {
      "description": "UTC, ISO 8601 with milliseconds and Z, e.g. 2026-10-22T10:00:00.123Z.",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object"
}