Model Sync

Create Sync

POST

Request

This endpoint expects an object.
mode
stringRequired
name
stringRequired
schedule
objectRequired
target
objectRequired
active
booleanOptional
enricher
objectOptional
fields
list of objectsOptional
filter_logic
stringOptional
filters
list of objectsOptional

Either field or field_id must be provided. If field is provided, field_id is ignored.

identity
objectOptional
organization_id
stringOptional
override_fields
list of objectsOptional
Values to set as sync target fields.
overrides
list of objectsOptional
Conditional value replacement for field mappings.
policies
list of stringsOptional
sync_all_records
booleanOptional

Response

This endpoint returns an object
data
objectOptional

Errors

POST
1curl -X POST https://app.polytomic.com/api/syncs \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "mode": "create",
6 "name": "Users Sync",
7 "schedule": {},
8 "target": {
9 "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
10 "object": "Users"
11 }
12}'
1{
2 "data": {
3 "active": true,
4 "fields": [
5 {
6 "source": {
7 "field": "id",
8 "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
9 },
10 "target": "name"
11 }
12 ],
13 "filter_logic": "filter_logic",
14 "filters": [
15 {
16 "function": "Equality",
17 "field": {
18 "field": "id",
19 "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
20 },
21 "field_id": "field1",
22 "label": "A"
23 }
24 ],
25 "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
26 "identity": {
27 "function": "Equality",
28 "source": {
29 "field": "id",
30 "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
31 },
32 "target": "name",
33 "new_field": true,
34 "remote_field_type_id": "string"
35 },
36 "mode": "create",
37 "name": "Users Sync",
38 "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
39 "override_fields": [
40 {
41 "source": {
42 "field": "id",
43 "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
44 },
45 "target": "name"
46 }
47 ],
48 "overrides": [
49 {
50 "field": {
51 "field": "id",
52 "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
53 },
54 "field_id": "field1"
55 }
56 ],
57 "policies": [
58 "248df4b7-aa70-47b8-a036-33ac447e668d"
59 ],
60 "schedule": {
61 "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
62 "day_of_month": "1",
63 "day_of_week": "monday",
64 "frequency": "manual",
65 "hour": "12",
66 "job_id": 1,
67 "minute": "30",
68 "month": "1",
69 "run_after": {
70 "bulk_sync_ids": [
71 "248df4b7-aa70-47b8-a036-33ac447e668d"
72 ],
73 "sync_ids": [
74 "248df4b7-aa70-47b8-a036-33ac447e668d"
75 ]
76 }
77 },
78 "sync_all_records": false,
79 "target": {
80 "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
81 "object": "Users",
82 "configuration": {
83 "key": "value"
84 },
85 "filter_logic": "filter_logic",
86 "new_name": "new_name",
87 "search_values": {
88 "name": "value"
89 }
90 }
91 }
92}