Create Sync

Create a new sync from one or more models to a destination.

All of the functionality described in the product documentation is configurable via the API.

Guides:

Targets (Destinations)

Polytomic refers to a model sync’s destination as the “target object”, or target. Target objects are identified by a connection ID and an object ID. You can retrieve a list of all target objects for a connection using the Get Target Objects endpoint.

The target object in the request specifies information about the sync destination.

1"target": {
2 "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
3 "object": "Users",
4},

Some connections support additional configuration for targets. For example, Salesforce connections support optionally specifying the ingestion API to use. The target specific options are passed as configuration; consult the integration guides for details about specific connection configurations.

Creating a new target

Some integrations support creating a new target when creating a model sync. For example, an ad audience or database table.

When creating a new target, object is omitted and create is specified instead. The create property is an object containing integration specific configuration for the new target.

1"target": {
2 "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
3 "create": {
4 "name": "New audience",
5 "type": "user_audience"
6 }
7},

The Get Target List endpoint returns information about whether a connection supports target creation.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

X-Polytomic-VersionstringOptional

Request

This endpoint expects an object.
fieldslist of objectsRequired

Fields to sync from source to destination.

modestringRequired
namestringRequired
scheduleobjectRequired
targetobjectRequired
activebooleanOptional

Whether the sync is enabled and scheduled.

filter_logicstringOptional

Logical expression to combine filters.

filterslist of objectsOptional

Filters to apply to the source data.

identityobjectOptional
only_enrich_updatesbooleanOptional

Whether to use enrichment models as a source of possible changes to sync. If true, only changes to the base models will cause a record to sync.

organization_idstringOptionalformat: "uuid"

Organization ID for the sync; read-only with a partner key.

override_fieldslist of objectsOptional

Values to set in the target unconditionally.

overrideslist of objectsOptional

Conditional value replacement for fields.

policieslist of stringsOptional
skip_initial_backfillbooleanOptional

Whether to skip the initial backfill of records; if true only records seen after the sync is enabled will be synced.

sync_all_recordsbooleanOptional

Whether to sync all records from the source, regardless of whether they’ve changed since the previous execution.

Response

OK

dataobjectOptional

Errors