Reference
API Reference

API Reference

Complete method reference for the DealCloud Python SDK. The documentation targets dealcloud-sdk 1.x; the package is available on PyPI (opens in a new tab).

Client Properties

Read-Only Configuration

PropertyTypeDescription
site_urlstrDealCloud site URL
api_urlstrFull API base URL
auth_scopestrOAuth2 scope string
refresh_id_mapsboolWhether to refresh ID maps on operations
page_sizeintDefault page size
read_concurrencyintRead operation parallelism
delete_page_sizeintDelete batch size

API Endpoint URLs

PropertyTypeDescription
api_url_v1strBase v1 API URL
schema_urlstrSchema endpoint URL
data_urlstrData endpoint URL
entrydata_urlstrEntry data endpoint URL
rows_urlstrRows endpoint URL
query_urlstrQuery endpoint URL
views_urlstrViews endpoint URL
cells_urlstrCells endpoint URL
history_urlstrHistory endpoint URL
files_urlstrFiles endpoint URL
usermanagement_urlstrUser management endpoint URL
publications_urlstrPublications endpoint URL
backups_urlstrBackups endpoint URL
relationship_intelligence_urlstrRelationship Intelligence endpoint URL
merge_urlstrMerge endpoint URL

Mutable Configuration

PropertyTypeDescription
retry_status_codesdictHTTP status codes to retry (mutable)
concurrency_limitsConcurrencyLimitsConcurrency settings (mutable)
query_settingsQuerySettingsPagination settings (mutable)

Client Access

PropertyTypeDescription
clientRestClientUnderlying REST client for custom API calls

Schema Caching

Property / MethodTypeDescription
cache_schemaboolWhether to cache schema (default: True). Set in constructor.
schema_cache_ttlfloatSchema cache TTL in seconds (default: 300). Set in constructor.
refresh_schema()methodForce refresh of schema and user map; updates cache.
clear_schema_cache()methodClear schema cache for this site.

Client Initialization

DealCloud

from dealcloud_sdk import DealCloud, DealCloudConfig
 
# Direct initialization
dc = DealCloud(
    site_url="yoursite.dealcloud.com",
    client_id="12345",
    client_secret="your-secret",
    cache_schema=True,       # Default: use schema cache
    schema_cache_ttl=300.0   # Default: 5 minutes
)
 
# Factory methods (prefer full DealCloudConfig)
config = DealCloudConfig(
    siteUrl="yoursite.dealcloud.com",
    clientId=12345,
    clientSecret="your-secret",
)
dc = DealCloud.from_config_object(config)
dc = DealCloud.from_config("dealcloud_config.json")  # Full config file (path)
dc = DealCloud.from_json("config.json")           # Legacy/simple credential file
dc = DealCloud.from_yaml("config.yaml")            # Legacy/simple credential file
# Environment variables only: DealCloud.from_env()

For full configuration (timeouts, retry, query settings), use from_config(config_path) or DealCloudConfig.from_json_file / from_yaml_file plus from_config_object(config). Use from_json() / from_yaml() for legacy or simple credential-only files.

Schema API

MethodDescriptionReturns
get_objects()Get all objectsList[Object]
get_fields(object_id)Get fields for objectList[Field]
get_fields()Get all fieldsList[Field]
get_fields_by_ids(ids)Get specific fieldsList[Field]
get_schema()Get complete schemaSchema
get_users()Get all usersList[User]
get_currencies()Get currenciesList[str]
get_field_types()Get field typesList[dict]
get_system_field_types()Get system field typesList[dict]
get_system_entry_types()Get system entry typesList[dict]
get_filter_operations()Get filter operationsList[dict]
export_schema_to_excel(path)Export schema to ExcelPath

Data API - Read

MethodDescriptionReturns
read_data(object_id, output)Read dataDataFrame | List[dict]
read_data_streaming(object_id)Stream dataIterator[dict]
aread_data_streaming(object_id)Async streamAsyncIterator[dict]
typed_read_data(model, object_id)Typed readList[T]
typed_read_data_streaming(model, object_id)Typed streamIterator[T]
typed_aread_data_streaming(model, object_id)Async typed streamAsyncIterator[T]
list_entries(object_id, ...)Get entry IDsList[int]
list_entries_with_filter(object_id, filters)Filtered entry IDs (filters: List[dict])List[int]
get_cells(object_id, ...)Cell-level readList[dict]

read_data() Parameters

ParameterTypeDefaultDescription
object_idstr | int-Object API name or ID
view_idstr | int-View (alternative)
outputstrRequired"pandas", "list", "polars", or "polars_lazy"
fieldsList[str]AllFields to fetch
querystrNoneDealCloud query string
view_filterList[dict]NoneValue Later / view filter values
resolvestrNoneLegacy reference format ("id" / "name")
include_nullsboolTrueInclude null columns
column_headersstr"api"Column naming: "api", "name", or "id"
reference_formatReferenceFormatFULLReference formatting
reference_cacheReferenceCacheNoneReference cache
error_handlingErrorHandlingFAIL_FASTError behavior (e.g. COLLECT)
progress_callbackCallableNoneProgress callback

Data API - Write

MethodDescriptionReturns
insert_data(object_id, data)Insert recordsList[dict] | DataFrame | BatchResult | RowsWriteResult
update_data(object_id, data)Update recordsList[dict] | DataFrame | BatchResult | RowsWriteResult
upsert_data(object_id, data, match_field)Upsert recordsList[dict] | DataFrame | BatchResult | RowsWriteResult
delete_data(object_id, entry_ids)Delete recordsList[dict] | BatchResult
write_cells(object_id, data, mode="upsert")Write cellsList[dict] | BatchResult | RowsWriteResult
delete_cells(object_id, entry_ids, field_ids=None)Delete entries via Cells DELETE (body is entry ID list; field_ids ignored)List[dict] | BatchResult
typed_insert_data(object_id, data, model)Typed insertList[T]
typed_update_data(object_id, data, model)Typed updateList[T]
typed_upsert_data(object_id, data, model, match_field)Typed upsertList[T]

Write Parameters

ParameterTypeDefaultDescription
object_idstr | intRequiredObject API name or ID
dataList[dict] | pd.DataFrame | pl.DataFrameRequiredRecords (pandas or Polars supported)
use_dealcloud_idsboolTrueUse IDs vs lookups
lookup_columnstrNoneLookup field
outputstr"list""list", "write_result", "pandas", or "polars"
error_handlingErrorHandlingFAIL_FASTParallel transport error behavior (COLLECT → BatchResult)
raise_on_row_errorsbool | NoneNoneRaise DealCloudValidationError when any row has "Errors"; None inherits DealCloudConfig.raiseOnRowErrors
progress_callbackCallableNoneProgress callback

Delta Sync

MethodDescriptionReturns
get_modified_entries(object_id, since)Get modified IDsList[ModifiedEntry]
aget_modified_entries(object_id, since)Async versionList[ModifiedEntry]
sync_delta(object_id, since, output)Full delta syncDeltaSyncResult
build_entry_id_cache(object_id, key_field)Build ID cacheEntryIdCache
map_ids(data, cache, external_id_field)Map IDsList[dict]

sync_delta() Parameters

ParameterTypeDefaultDescription
object_idstr | intRequiredObject API name or ID
modified_sincedatetime | strRequiredCutoff datetime
fieldsList[str]AllFields to fetch
outputstr"list""list", "pandas", "polars", or "polars_lazy"
include_deletedboolTrueInclude deleted entries

Template Reports

Template reports use the Data API base URL (GET .../reports/template, POST .../reports/generate, GET .../reports/{requestId}). Methods are on the main DealCloud client. See the DealCloud docs for Template Reports (opens in a new tab).

MethodDescriptionReturns
get_report_templates(page_size=None, page_number=None, id=None)List available template reportsList[dict]
generate_report(template_id, remove_empty_table=None, entries=None, user_ids=None, filters=None)Start report generationdict
get_report_status(request_id)Poll status or retrieve generated outputdict

Files API

Paths use entryfiles/{entryId}/fields/{fieldId} (no object in the download URL). Prefer download_file / download_attachment (aliases).

MethodDescriptionReturns
download_file(entry_id, field_id, output_path=None, progress_callback=None)Streaming download; output_path may be local path or fsspec URIbytes or str (path)
download_attachment(...)Alias of download_filesame
download_attachment_metadata(entry_id, field_id)File metadatadict
upload_attachment(object_id, content, file_name, ...)Upload to attachments object (multipart)dict
upload_file_to_entry_field(object_id, entry_id, field, content, file_name, ...)Upload bytes to existing row fielddict
delete_file(entry_id, field_id)Delete attachmentbool
delete_attachment(...)Alias of delete_filebool
export_images(output_dir)Export imagesExportResult
export_documents(output_dir)Export documentsExportResult
export_files(output_dir)Export all filesExportResult
export_entry_files(object_id, entry_id, output_dir)Export entry filesExportResult

User Management

MethodDescriptionReturns
get_users()List usersList[User]
get_user(user_id)Get userUser
create_user(email, first_name, last_name)Create userUser
update_user(user_id, ...)Update userNone
deactivate_user(user_id)DeactivateNone
activate_user(user_id)ActivateNone
get_groups()List groupsList[Group]
get_group_members(group_id)Get membersList[User]
add_user_to_group(user_id, group_id)Add to groupNone
remove_user_from_group(user_id, group_id)Remove from groupNone

Backups

MethodDescriptionReturns
request_backup()Request backupstr (backup ID)
get_backup_status(backup_id)Check statusdict
download_backup(backup_id, output_path)Downloadbytes or None
list_backups()List backupsList[dict]

History API

MethodDescriptionReturns
get_entry_history(object_id, entry_id, start_date=None, end_date=None, field_ids=None, limit=1000, skip=0)Change history for a specific entryList[dict]
get_object_history(object_id, start_date=None, end_date=None, entry_ids=None, field_ids=None, user_ids=None, limit=1000, skip=0)All change history for an object typeList[dict]
get_historical_data(object_id, entry_ids, as_of_date, fields=None)Data as it existed at a point in timeList[dict]

Publications API

MethodDescriptionReturns
get_topics()List topic name stringsList[str]
poll_events(topics, *, count, time_out_ms, http_timeout_seconds=None)Long-poll for events (time_out_ms server wait)List[dict]
stream_poll_events(topics, *, count, time_out_ms, ...)Context manager: streaming HTTP response for large poll bodieshttpx.Response
topic_offsets_from_events(events)Build acknowledge payload from poll resultsList[dict]
acknowledge_topic_offsets(topic_offsets)Acknowledge by topic name/offsetNone
init_bootstrap(entity_type, entity_format)Request bootstrap drainNone
subscribe(topics, *, callback, time_out_ms, poll_interval=5, count=100, auto_acknowledge=True)Blocking poll loopNone
subscribe_async(topics, *, callback, time_out_ms, ...)Async subscription helperNone

Merge API

MethodDescriptionReturns
merge_entries(object_id, winner_entry_id, loser_entry_ids, field_overrides=None, delete_losers=True, transfer_relationships=True)Merge duplicate entries into winnerdict
merge_preview(object_id, winner_entry_id, loser_entry_ids)Preview merge resultdict
find_duplicates(object_id, field_names, ...)Find duplicate entriesList[dict]

Relationship Intelligence API

MethodDescriptionReturns
import_emails(...)Bulk email importdict
import_email(...)Single email importdict
import_meetings(...)Bulk meetings importdict
import_meeting(...)Single meeting importdict
get_processing_status(...)Processing statusdict
get_settings()RI settingsdict

Other APIs

MethodDescriptionReturns
list_configured_views()List viewsRows
resolve_view(view)Resolve view ID or name to metadata rowdict
resolve_view_display_name(view)Resolve view ID or name to display namestr