{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/brevo/main/json-schema/brevo-loyalty-program-schema.json",
  "title": "loyaltyProgram",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brevo-program-api-openapi.yml#/components/schemas/loyaltyProgram",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Loyalty Program unique identifier."
    },
    "name": {
      "type": "string",
      "description": "Loyalty Program name."
    },
    "description": {
      "type": "string",
      "description": "Loyalty Program description."
    },
    "meta": {
      "type": "object",
      "additionalProperties": {
        "description": "Any type"
      },
      "description": "Loyalty Program metadata."
    },
    "state": {
      "$ref": "#/$defs/LoyaltyProgramState",
      "description": "Current state of the loyalty program."
    },
    "subscriptionPoolId": {
      "type": "string",
      "format": "uuid",
      "description": "Loyalty Program subscription pool ID."
    },
    "subscriptionGeneratorId": {
      "type": "string",
      "format": "uuid",
      "description": "Loyalty Program subscription generator ID."
    },
    "pattern": {
      "type": "string",
      "description": "Subscription code pattern."
    },
    "codeCount": {
      "type": "integer",
      "format": "int64",
      "description": "Number of available subscription codes."
    },
    "documentId": {
      "type": "string",
      "format": "uuid",
      "description": "Associated document identifier."
    },
    "birthdayAttribute": {
      "type": "string",
      "description": "Contact attribute name used for birthday tracking."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the loyalty program was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the loyalty program was last modified."
    }
  },
  "$defs": {
    "LoyaltyProgramState": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "draft"
      ],
      "description": "Current state of the loyalty program.",
      "title": "LoyaltyProgramState"
    }
  }
}