{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compteam-io/json-schema/compteam-io-offering-create-schema.json",
  "title": "OfferingCreate",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compteam-io-openapi.yml#/components/schemas/OfferingCreate",
  "properties": {
    "type": {
      "type": "string",
      "title": "Type",
      "description": "drop_in | private_lesson | seminar"
    },
    "discipline": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "bjj",
            "luta_livre",
            "taekwondo",
            "karate",
            "muay_thai",
            "sambo",
            "kickboxing",
            "judo",
            "aikido",
            "mma"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Discipline",
      "default": "bjj"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "price_amount": {
      "type": "number",
      "title": "Price Amount"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Currency"
    },
    "stripe_price_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stripe Price Id"
    },
    "occurrence_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Occurrence Key"
    },
    "purchase_order_item_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Purchase Order Item Id"
    },
    "coach_user_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Coach User Id"
    },
    "scheduled_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Scheduled At"
    },
    "duration_min": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duration Min"
    },
    "sessions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/OfferingSession"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sessions"
    },
    "location_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Location Id"
    },
    "location_text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Location Text"
    },
    "capacity": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Capacity"
    },
    "rrule": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rrule"
    },
    "dtstart_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Dtstart Date"
    },
    "until_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Until Date"
    },
    "start_time": {
      "anyOf": [
        {
          "type": "string",
          "format": "time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Time"
    },
    "is_organization_wide": {
      "type": "boolean",
      "title": "Is Organization Wide",
      "default": false
    },
    "visitor_billing_mode": {
      "type": "string",
      "enum": [
        "home_branch_invoice",
        "host_branch_invoice"
      ],
      "title": "Visitor Billing Mode",
      "default": "host_branch_invoice"
    },
    "host_invoice_payment_method": {
      "type": "string",
      "enum": [
        "manual",
        "stripe"
      ],
      "title": "Host Invoice Payment Method",
      "default": "manual"
    },
    "home_branch_commission_pct": {
      "type": "number",
      "maximum": 100.0,
      "minimum": 0.0,
      "title": "Home Branch Commission Pct",
      "default": 0
    }
  },
  "type": "object",
  "required": [
    "type",
    "title",
    "price_amount"
  ],
  "$defs": {
    "OfferingSession": {
      "properties": {
        "scheduled_at": {
          "type": "string",
          "format": "date-time",
          "title": "Scheduled At"
        },
        "duration_min": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Duration Min"
        }
      },
      "type": "object",
      "required": [
        "scheduled_at",
        "duration_min"
      ],
      "title": "OfferingSession"
    }
  }
}