{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/switchlabs/main/json-schema/switchlabs-deal-schema.json",
  "title": "Deal",
  "x-generated": "2026-10-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crm-switchlabs-openapi.json#/components/schemas/Deal",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "organization_id": {
      "type": "string"
    },
    "pipeline_id": {
      "type": "string"
    },
    "stage_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "currency": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "won",
        "lost"
      ]
    },
    "priority": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high",
        "urgent"
      ]
    },
    "customer_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "owner_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "position": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}