{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/decide-fyi/json-schema/decide-fyi-decision-crm-sync-request-schema.json",
  "title": "DecisionCrmSyncRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/decide-fyi-crm-sync-api-openapi.yml#/components/schemas/DecisionCrmSyncRequest",
  "type": "object",
  "required": [
    "sync_status",
    "crm_provider",
    "crm_object_type",
    "crm_object_id"
  ],
  "properties": {
    "decision_id": {
      "type": "string",
      "maxLength": 600
    },
    "sync_status": {
      "type": "string",
      "description": "Normalized to queued, written, failed, skipped, stale, unknown, or a compact custom status."
    },
    "sync_direction": {
      "type": "string",
      "enum": [
        "writeback",
        "inbound",
        "bidirectional"
      ]
    },
    "crm_provider": {
      "type": "string"
    },
    "crm_object_type": {
      "type": "string"
    },
    "crm_object_id": {
      "type": "string"
    },
    "crm_record_url": {
      "type": "string"
    },
    "field_mapping": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "mapped_fields": {
      "type": "object",
      "additionalProperties": true
    },
    "decision_record_hash": {
      "type": "string"
    },
    "decision_receipt_hash": {
      "type": "string"
    },
    "decision_verdict": {
      "type": "string"
    },
    "decision_action": {
      "type": "string"
    },
    "policy_id": {
      "type": "string"
    },
    "policy_version": {
      "type": "string"
    },
    "crm_revision": {
      "type": "string"
    },
    "crm_modified_at": {
      "type": "string"
    },
    "reported_at": {
      "type": "string"
    }
  },
  "additionalProperties": true
}