{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/unified-to/refs/heads/main/json-schema/unified-to-crm-deal-schema.json",
  "title": "CrmDeal",
  "description": "A deal represents an opportunity with companies and/or contacts",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "name": {
      "type": "string"
    },
    "amount": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "closed_at": {
      "type": "string",
      "format": "date-time"
    },
    "closing_at": {
      "type": "string",
      "format": "date-time"
    },
    "stage": {
      "type": "string"
    },
    "stage_id": {
      "type": "string"
    },
    "pipeline": {
      "type": "string"
    },
    "pipeline_id": {
      "type": "string"
    },
    "stages": {
      "$ref": "#/components/schemas/property_CrmDeal_stages"
    },
    "pipelines": {
      "$ref": "#/components/schemas/property_CrmDeal_pipelines"
    },
    "source": {
      "type": "string"
    },
    "probability": {
      "type": "number"
    },
    "tags": {
      "$ref": "#/components/schemas/property_CrmDeal_tags"
    },
    "lost_reason": {
      "type": "string"
    },
    "won_reason": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "contact_ids": {
      "$ref": "#/components/schemas/property_CrmDeal_contact_ids"
    },
    "company_ids": {
      "$ref": "#/components/schemas/property_CrmDeal_company_ids"
    },
    "metadata": {
      "$ref": "#/components/schemas/property_CrmDeal_metadata"
    },
    "raw": {
      "type": "object",
      "additionalProperties": true
    }
  }
}