Create Sync
Changed onCreates a new model 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:
- Model sync (Reverse ETL) from Snowflake query to Salesforce
- Joined model sync from Postgres, Airtable, and Stripe to Hubspot
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.
"target": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"object": "Users",
},
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.
"target": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"create": {
"name": "New audience",
"type": "user_audience"
}
},
The Get Target List endpoint returns information about whether a connection supports target creation.
Request
- Base URLhttps://app.polytomic.com
- Auth
- HTTP bearer
- or HTTP basic
Headers
Request body
Example request
{
"active": true,
"fields": [
{
"override_value": "fixed_value",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"sync_mode": "create",
"target": "name"
}
],
"filter_logic": "A and B or C",
"filters": [
{
"field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"field_id": "field1",
"label": "A",
"value": "value",
"value_field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}
],
"identities": {
"mappings": [
{
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
}
],
"strategy": "priority"
},
"identity": {
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
},
"model_filters": {
"conditions": [
{
"label": "A",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"value": "value"
}
],
"logic": "A and B or C"
},
"name": "Users Sync",
"organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"override_fields": [
{
"override_value": "fixed_value",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"sync_mode": "create",
"target": "name"
}
],
"overrides": [
{
"field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"field_id": "field1",
"override": "new_value",
"value": "value"
}
],
"policies": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
],
"schedule": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"day_of_month": "1",
"day_of_week": "1",
"hour": "12",
"minute": "30",
"month": "1",
"run_after": {
"bulk_sync_ids": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
],
"sync_ids": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
]
}
},
"target": {
"configuration": {
"key": "value"
},
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"create": {
"name": "value"
},
"object": "Users",
"search_values": {
"name": "value"
}
},
"target_filters": {
"conditions": [
{
"field": "Email",
"label": "A",
"value": "value",
"value_source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}
],
"logic": "A and B"
}
}Response
OK
Example response
{
"data": {
"active": true,
"created_by": {
"id": "12345678-1234-1234-1234-123456789012",
"name": "John Doe",
"type": "user"
},
"fields": [
{
"override_value": "fixed_value",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"sync_mode": "create",
"target": "name"
}
],
"filters": [
{
"field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"field_id": "field1",
"label": "A",
"value": "value",
"value_field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}
],
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"identities": {
"mappings": [
{
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
}
],
"strategy": "priority"
},
"identity": {
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
},
"model_filters": {
"conditions": [
{
"label": "A",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"value": "value"
}
],
"logic": "A and B or C"
},
"name": "Users Sync",
"organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"override_fields": [
{
"override_value": "fixed_value",
"sync_mode": "create",
"target": "name"
}
],
"overrides": [
{
"field": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"field_id": "field1",
"override": "new_value",
"value": "value"
}
],
"policies": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
],
"problems": [
{
"code": "unknown_target_field",
"path": "target_filters.conditions[1].field",
"severity": "error"
}
],
"schedule": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"day_of_month": "1",
"day_of_week": "1",
"hour": "12",
"minute": "30",
"month": "1",
"run_after": {
"bulk_sync_ids": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
],
"sync_ids": [
"248df4b7-aa70-47b8-a036-33ac447e668d"
]
}
},
"target": {
"configuration": {
"key": "value"
},
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"create": {
"name": "value"
},
"object": "Users",
"search_values": {
"name": "value"
}
},
"target_filters": {
"conditions": [
{
"field": "Email",
"label": "A",
"value": "value",
"value_source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}
],
"logic": "A and B"
},
"updated_by": {
"id": "12345678-1234-1234-1234-123456789012",
"name": "John Doe",
"type": "user"
}
}
}Changes
- breaking
added to the
//request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
////request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
////request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
//request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
removed the enum value
ArrayContainsof the request property// - breaking
removed the enum value
ArrayContainsof the request property// - breaking
removed the enum value
ArrayDoesNotContainof the request property// - breaking
removed the enum value
ArrayDoesNotContainof the request property// - breaking
removed the enum value
Betweenof the request property// - breaking
removed the enum value
Betweenof the request property// - breaking
removed the enum value
DomainMatchof the request property//// - breaking
removed the enum value
DomainMatchof the request property// - breaking
removed the enum value
Equalityof the request property// - breaking
removed the enum value
Equalityof the request property//// - breaking
removed the enum value
Equalityof the request property// - breaking
removed the enum value
Equalityof the request property// - breaking
removed the enum value
Falseof the request property// - breaking
removed the enum value
Falseof the request property// - breaking
removed the enum value
GreaterThanof the request property// - breaking
removed the enum value
GreaterThanof the request property// - breaking
removed the enum value
GreaterThanEqualof the request property// - breaking
removed the enum value
GreaterThanEqualof the request property// - breaking
removed the enum value
HostnameMatchof the request property//// - breaking
removed the enum value
HostnameMatchof the request property// - breaking
removed the enum value
ISubstringof the request property//// - breaking
removed the enum value
ISubstringof the request property// - breaking
removed the enum value
InTheLastof the request property// - breaking
removed the enum value
InTheLastof the request property// - breaking
removed the enum value
Inequalityof the request property// - breaking
removed the enum value
Inequalityof the request property// - breaking
removed the enum value
IsNotNullof the request property// - breaking
removed the enum value
IsNotNullof the request property// - breaking
removed the enum value
IsNullof the request property// - breaking
removed the enum value
IsNullof the request property// - breaking
removed the enum value
LessThanof the request property// - breaking
removed the enum value
LessThanof the request property// - breaking
removed the enum value
LessThanEqualof the request property// - breaking
removed the enum value
LessThanEqualof the request property// - breaking
removed the enum value
Modelof the request property// - breaking
removed the enum value
OnOrAfterof the request property// - breaking
removed the enum value
OnOrAfterof the request property// - breaking
removed the enum value
OnOrBeforeof the request property// - breaking
removed the enum value
OnOrBeforeof the request property// - breaking
removed the enum value
OneOfof the request property//// - breaking
removed the enum value
OneOfof the request property// - breaking
removed the enum value
RelativeOnOrAfterof the request property// - breaking
removed the enum value
RelativeOnOrAfterof the request property// - breaking
removed the enum value
RelativeOnOrBeforeof the request property// - breaking
removed the enum value
RelativeOnOrBeforeof the request property// - breaking
removed the enum value
StringContainsof the request property// - breaking
removed the enum value
StringContainsof the request property// - breaking
removed the enum value
StringDoesNotContainof the request property// - breaking
removed the enum value
StringDoesNotContainof the request property// - breaking
removed the enum value
StringDoesNotEndWithof the request property// - breaking
removed the enum value
StringDoesNotEndWithof the request property// - breaking
removed the enum value
StringDoesNotStartWithof the request property// - breaking
removed the enum value
StringDoesNotStartWithof the request property// - breaking
removed the enum value
StringEndsWithof the request property// - breaking
removed the enum value
StringEndsWithof the request property// - breaking
removed the enum value
StringLikeof the request property// - breaking
removed the enum value
StringLikeof the request property// - breaking
removed the enum value
StringMatchesTrimmedof the request property// - breaking
removed the enum value
StringMatchesTrimmedof the request property// - breaking
removed the enum value
StringNotLikeof the request property// - breaking
removed the enum value
StringNotLikeof the request property// - breaking
removed the enum value
StringNotOneOfof the request property// - breaking
removed the enum value
StringNotOneOfof the request property// - breaking
removed the enum value
StringOneOfof the request property// - breaking
removed the enum value
StringOneOfof the request property// - breaking
removed the enum value
StringStartsWithof the request property// - breaking
removed the enum value
StringStartsWithof the request property// - breaking
removed the enum value
Targetof the request property// - breaking
removed the enum value
Trueof the request property// - breaking
removed the enum value
Trueof the request property// - breaking
removed the enum value
appendof the request property - breaking
removed the enum value
createof the request property - breaking
removed the enum value
removeof the request property - breaking
removed the enum value
replaceof the request property - breaking
removed the enum value
snapshotof the request property - breaking
removed the enum value
updateof the request property - breaking
removed the enum value
updateOrCreateof the request property - breaking
the
//request property type changed fromobjectto no type - breaking
the
//request property type changed fromobjectto no type - breaking
the
//request property type changed fromstringto no type - breaking
the
//request property type changed fromstringto no type - breaking
the
////request property type changed fromstringto no type - breaking
the
////request property type changed fromobjectto no type - breaking
the
//request property type changed fromstringto no type - breaking
the
//request property type changed fromobjectto no type - breaking
the
request property type changed fromstringto no type - breaking
the
request property type changed fromobjectto no type - breaking
the
//request property type changed fromobjectto no type - breaking
the
//request property type changed fromstringto no type - breaking
the
request property type changed fromobjectto no type - breaking
the
request property type changed fromobjectto no type - breaking
the
request property type changed fromobjectto no type - breaking
the
response's property type changed fromobjectto no type for status - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
///// - warning
removed the request property
///// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added to the
response propertyallOflist for the response status
- breaking
- breaking
added to the
request propertyallOflist - breaking
the
request property type changed fromobjectto no type - breaking
the
/response's property type changed fromobjectto no type for status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the request property
/ - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - info
added the new optional request property
- info
added the optional property
/to the response with the status - info
added to the
/response propertyallOflist for the response status
- breaking