{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eloqua/json-schema/eloqua-import-definition-schema.json",
  "title": "ImportDefinition",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eloqua-account-imports-api-openapi.yml#/components/schemas/ImportDefinition",
  "type": "object",
  "required": [
    "name",
    "fields",
    "identifierFieldName"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "description": "URI of the import definition",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Name of the import definition"
    },
    "fields": {
      "type": "object",
      "description": "Map of source column names to Eloqua field statement identifiers (e.g., {\"EmailAddress\": \"{{Contact.Field(C_EmailAddress)}}\"})",
      "additionalProperties": {
        "type": "string"
      }
    },
    "identifierFieldName": {
      "type": "string",
      "description": "The field used to match import data to existing records (e.g., \"EmailAddress\")"
    },
    "isSyncTriggeredOnImport": {
      "type": "boolean",
      "description": "Whether a sync is automatically triggered when data is pushed",
      "default": false
    },
    "syncActions": {
      "type": "array",
      "description": "Actions to perform during sync",
      "items": {
        "$ref": "#/$defs/SyncAction"
      }
    },
    "dataRetentionDuration": {
      "type": "string",
      "description": "How long imported data is retained"
    },
    "isUpdatingMultipleMatchedRecords": {
      "type": "boolean",
      "description": "Whether to update all matching records or just the first",
      "default": false
    },
    "autoDeleteDuration": {
      "type": "string",
      "description": "Auto-delete duration for the import definition"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Creation timestamp",
      "readOnly": true
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Last update timestamp",
      "readOnly": true
    },
    "syncedInstanceUri": {
      "type": "string",
      "description": "URI of the last sync associated with this definition",
      "readOnly": true
    },
    "status": {
      "type": "string",
      "description": "Status of the import definition",
      "readOnly": true
    }
  },
  "$defs": {
    "SyncAction": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "add",
            "remove",
            "setStatus"
          ],
          "description": "The action to perform"
        },
        "destination": {
          "type": "string",
          "description": "The destination for the action (e.g., a contact list URI or subscription status)"
        },
        "status": {
          "type": "string",
          "description": "The status to set (when action is setStatus)"
        }
      }
    }
  }
}