{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lindo-ai/json-schema/lindo-ai-product-create-request-schema.json",
  "title": "ProductCreateRequest",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/lindo-ai-api-openapi.json#/components/schemas/ProductCreateRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 250
    },
    "description": {
      "type": "string",
      "maxLength": 5000,
      "default": ""
    },
    "type": {
      "type": "string",
      "enum": [
        "fixed",
        "subscription",
        "free"
      ],
      "description": "Product billing type"
    },
    "price": {
      "type": "number",
      "minimum": 0,
      "default": 0,
      "description": "Price in major currency units (for example, 49.99)"
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "default": "USD"
    },
    "interval": {
      "type": "string",
      "enum": [
        "month",
        "week",
        "year"
      ],
      "default": "month",
      "description": "Billing interval for subscription products"
    },
    "link_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "string",
          "enum": [
            ""
          ]
        }
      ],
      "default": "",
      "description": "Optional URL to open after purchase"
    },
    "file_url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "string",
          "enum": [
            ""
          ]
        }
      ],
      "default": "",
      "description": "Optional downloadable file URL"
    },
    "instruction": {
      "type": "string",
      "maxLength": 5000,
      "default": "",
      "description": "Post-purchase instructions"
    },
    "trial": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Trial length in days for a subscription"
    },
    "features": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "discount",
          "phone",
          "address",
          "quantity"
        ],
        "description": "Checkout option: discount allows promotion codes; phone collects a phone number; address collects a shipping address; quantity lets the customer adjust quantity."
      },
      "maxItems": 4,
      "default": [],
      "description": "Checkout options enabled for this product"
    },
    "client_limit": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    }
  },
  "required": [
    "name",
    "type"
  ]
}