{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crevio-co/json-schema/crevio-co-booking-schema.json",
  "title": "Booking",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crevio-co-bookings-api-openapi.yml#/components/schemas/Booking",
  "type": "object",
  "properties": {
    "object": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "event_type_id": {
      "type": "string"
    },
    "customer_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "order_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "confirmed",
        "cancelled",
        "completed",
        "no_show"
      ]
    },
    "livemode": {
      "type": "boolean"
    },
    "time_zone": {
      "type": "string"
    },
    "attendee_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "attendee_email": {
      "type": [
        "string",
        "null"
      ]
    },
    "attendee_phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_details": {
      "type": [
        "string",
        "null"
      ]
    },
    "meet_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancel_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "intake_answers": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "start_time": {
      "type": "string",
      "format": "date-time"
    },
    "end_time": {
      "type": "string",
      "format": "date-time"
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "event_type": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/EventType"
        },
        {
          "type": "null"
        }
      ],
      "description": "ID by default, full object when expanded"
    },
    "checkout": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/Checkout"
        },
        {
          "type": "null"
        }
      ],
      "description": "ID by default, full object when expanded"
    }
  },
  "required": [
    "object",
    "id",
    "event_type_id",
    "customer_id",
    "order_id",
    "status",
    "livemode",
    "time_zone",
    "attendee_name",
    "attendee_email",
    "attendee_phone",
    "location_details",
    "meet_url",
    "cancel_reason",
    "created_at",
    "updated_at",
    "intake_answers",
    "start_time",
    "end_time",
    "cancelled_at"
  ],
  "$defs": {
    "Checkout": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "complete",
            "abandoned",
            "expired"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "metadata": {
          "type": "object"
        },
        "mode": {
          "type": "string"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "total": {
          "type": "number"
        },
        "purchase_url": {
          "type": "string"
        },
        "customer": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/Customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "ID by default, full object when expanded"
        },
        "checkout_items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CheckoutItem"
          }
        }
      },
      "required": [
        "id",
        "object",
        "status",
        "created_at",
        "updated_at",
        "metadata",
        "mode",
        "currency",
        "total",
        "purchase_url",
        "checkout_items"
      ]
    },
    "CheckoutItem": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string"
        },
        "quantity": {
          "type": "integer"
        },
        "amount": {
          "type": "integer"
        },
        "price_variant": {
          "type": "string"
        },
        "product": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "object",
        "quantity",
        "amount",
        "price_variant",
        "product"
      ]
    },
    "Customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "first_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "customer_type": {
          "type": "string",
          "enum": [
            "paid",
            "free",
            "lead"
          ]
        },
        "notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "confirmed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "purge_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "anonymized": {
          "type": "boolean"
        },
        "metadata": {
          "type": "object"
        },
        "orders_count": {
          "type": "integer"
        },
        "total_spend": {
          "type": "number"
        },
        "tags": {
          "type": "array"
        }
      },
      "required": [
        "id",
        "object",
        "email",
        "name",
        "first_name",
        "last_name",
        "phone_number",
        "customer_type",
        "notes",
        "confirmed_at",
        "created_at",
        "updated_at",
        "deleted_at",
        "purge_at",
        "anonymized",
        "metadata",
        "orders_count",
        "total_spend",
        "tags"
      ]
    },
    "EventType": {
      "type": "object",
      "properties": {
        "object": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "duration_minutes": {
          "type": "integer"
        },
        "buffer_before_minutes": {
          "type": "integer"
        },
        "buffer_after_minutes": {
          "type": "integer"
        },
        "min_notice_minutes": {
          "type": "integer"
        },
        "booking_window_days": {
          "type": "integer"
        },
        "max_per_day": {
          "type": [
            "integer",
            "null"
          ]
        },
        "reminder_minutes": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "location_type": {
          "type": "string",
          "enum": [
            "google_meet",
            "zoom",
            "custom_link",
            "physical",
            "phone"
          ]
        },
        "location_details": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "form_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "form": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/Form"
            },
            {
              "type": "null"
            }
          ],
          "description": "ID by default, full object when expanded"
        },
        "free": {
          "type": "boolean"
        },
        "schedule_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "experience_id": {
          "type": "string"
        },
        "product_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "price_variants": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PriceVariant"
          }
        }
      },
      "required": [
        "object",
        "id",
        "name",
        "slug",
        "duration_minutes",
        "buffer_before_minutes",
        "buffer_after_minutes",
        "min_notice_minutes",
        "booking_window_days",
        "max_per_day",
        "reminder_minutes",
        "location_type",
        "location_details",
        "created_at",
        "updated_at",
        "form_id",
        "free",
        "schedule_id",
        "experience_id",
        "product_id",
        "price_variants"
      ]
    },
    "Form": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "redirect_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "settings": {
          "type": "object"
        },
        "archived_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "confirmation_required": {
          "type": "boolean"
        },
        "tag_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "delivery_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "delivery_subject": {
          "type": [
            "string",
            "null"
          ]
        },
        "delivery_message": {
          "type": [
            "string",
            "null"
          ]
        },
        "delivery_type": {
          "type": "string",
          "enum": [
            "none",
            "file",
            "link",
            "experience"
          ]
        },
        "delivery_file": {
          "type": [
            "object",
            "null"
          ]
        },
        "experience_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "submissions_count": {
          "type": "number"
        },
        "form_fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FormField"
          }
        }
      },
      "required": [
        "id",
        "object",
        "name",
        "redirect_url",
        "settings",
        "archived_at",
        "created_at",
        "updated_at",
        "confirmation_required",
        "tag_ids",
        "delivery_url",
        "delivery_subject",
        "delivery_message",
        "delivery_type",
        "delivery_file",
        "experience_id",
        "submissions_count",
        "form_fields"
      ]
    },
    "FormField": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "field_type": {
          "type": "string",
          "enum": [
            "email",
            "text",
            "phone",
            "textarea",
            "radio",
            "select",
            "checkbox",
            "consent"
          ]
        },
        "required": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "position": {
          "type": [
            "integer",
            "null"
          ]
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "id",
        "object",
        "name",
        "field_type",
        "required",
        "position",
        "options"
      ]
    },
    "PriceVariant": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "object": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "amount_type": {
          "type": "string",
          "enum": [
            "free",
            "fixed",
            "custom"
          ]
        },
        "billing_type": {
          "type": "string",
          "enum": [
            "subscription",
            "one_time",
            "payment_plan"
          ]
        },
        "recurring_interval": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "day",
            "week",
            "month",
            "year",
            null
          ]
        },
        "interval_count": {
          "type": "integer"
        },
        "installment_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "setup_fee_amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "trial_period_days": {
          "type": [
            "integer",
            "null"
          ]
        },
        "revoke_after_days": {
          "type": [
            "integer",
            "null"
          ]
        },
        "quantity_available": {
          "type": [
            "integer",
            "null"
          ]
        },
        "archived": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "position": {
          "type": "integer"
        },
        "hidden": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "discounted_from_amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "minimum_amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "maximum_amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "preset_amount": {
          "type": [
            "integer",
            "null"
          ]
        },
        "waitlist": {
          "type": "boolean"
        },
        "form_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The form (`form_...`) asked at every checkout of this variant, including waitlist applications. Its answers become a form submission on the order or waitlist entry."
        },
        "benefits": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "purchase_url": {
          "type": "string"
        },
        "product": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "object",
        "name",
        "amount",
        "amount_type",
        "billing_type",
        "recurring_interval",
        "interval_count",
        "installment_count",
        "setup_fee_amount",
        "trial_period_days",
        "revoke_after_days",
        "quantity_available",
        "archived",
        "position",
        "hidden",
        "created_at",
        "updated_at",
        "currency",
        "discounted_from_amount",
        "minimum_amount",
        "maximum_amount",
        "preset_amount",
        "waitlist",
        "form_id",
        "purchase_url",
        "product"
      ]
    }
  }
}