Source data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNoUnique identifier for this source object
created_atstring (date-time)NoThe date that this source object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoThe last date that this source object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoThe name of the inbound data source
slugstringNoA stable handle/key for the source
typestringNoThe connector/source type (eg. the provider's connector slug or plugin id)
directionenumNoSOURCE, or BIDIRECTIONAL for import+export connectors Values: SOURCE, DESTINATION, BIDIRECTIONAL
is_enabledbooleanNoWhether the source is active/enabled
metadataCdpMetadata[]No
metadata[].idstringNo
metadata[].slugstringNoThe attribute/trait key (eg. lifetime_value)
metadata[].valueobjectNoThe attribute/trait value
metadata[].namespacestringNoThe scope or origin of the attribute (eg. computed, event, visitor)
metadata[].formatenumNoThe data type of the attribute value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNo

TypeScript

TypeScript
export type CdpSource = {
	id?: string; // Unique identifier for this source object
	created_at?: string-time; // The date that this source object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // The last date that this source object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // The name of the inbound data source
	slug?: string; // A stable handle/key for the source
	type?: string; // The connector/source type (eg. the provider's connector slug or plugin id)
	direction?: 'SOURCE' | 'DESTINATION' | 'BIDIRECTIONAL'; // SOURCE, or BIDIRECTIONAL for import+export connectors
	is_enabled?: boolean; // Whether the source is active/enabled
	metadata?: [];
	raw?: any; // The raw data returned by the integration for this source
} 

Zod

Zod
import { z } from 'zod';

export const ZodCdpSource = z.object({
	id: z.string().optional().describe("Unique identifier for this source object"),
	created_at: z.string-time().optional().describe("The date that this source object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("The last date that this source object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("The name of the inbound data source"),
	slug: z.string().optional().describe("A stable handle/key for the source"),
	type: z.string().optional().describe("The connector/source type (eg. the provider's connector slug or plugin id)"),
	direction: z.enum("SOURCE", "DESTINATION", "BIDIRECTIONAL").optional().describe("SOURCE, or BIDIRECTIONAL for import+export connectors"),
	is_enabled: z.boolean().optional().describe("Whether the source is active/enabled"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class CdpSourceDirection(str, Enum):
	SOURCE = 'SOURCE'
	DESTINATION = 'DESTINATION'
	BIDIRECTIONAL = 'BIDIRECTIONAL'

@dataclasses.dataclass
class CdpSource:
	"""Unique identifier for this source object"""
	id: Optional[str]
	"""The date that this source object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""The last date that this source object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The name of the inbound data source"""
	name: Optional[str]
	"""A stable handle/key for the source"""
	slug: Optional[str]
	"""The connector/source type (eg. the provider's connector slug or plugin id)"""
	type: Optional[str]
	"""SOURCE, or BIDIRECTIONAL for import+export connectors"""
	direction: Optional[CdpSourceDirection]
	"""Whether the source is active/enabled"""
	is_enabled: Optional[bool]
	metadata: Optional[PropertyCdpSourceMetadata]
Are we missing anything? Let us know
Was this page helpful?