v1

latestOpenAPI 3.0.32026-08-06138294578.6 KB
Model Sync

Get Sync Target

Returns the fields, modes, and properties of a target object on a connection.

Pass the target object identifier to retrieve the fields available for mapping on that object. These are the destination fields you can reference when configuring field mappings in a model sync.

📘 To list available target objects and their identifiers, use GET /api/connections/{id}/modelsync/targetobjects.

Fields returned here reflect the connection's current cached state. If the upstream object schema has changed, trigger a schema refresh with POST /api/connections/{id}/schemas/refresh before calling this endpoint.

Fields for a target that hasn't been created yet

Some connections support creating a new destination object as part of a model sync — for example, a Facebook Ads custom audience or a LinkedIn Ads contact list. In that case there is no existing target identifier to pass; instead, describe the new target with the same properties returned in the target_creation block of GET /api/connections/{id}/modelsync/targetobjects, and this endpoint will return the fields the new target will expose.

Exactly one of target or properties must be supplied. Each input is sent as a separate properties[key]=value query parameter. For a Facebook Ads connection that requires an account and a name:

GET /api/connections/{id}/modelsync/target/fields
  ?properties[account]=act_1234567
  &properties[name]=My%20new%20audience

The response shape is identical to the existing-target form. For backends where the new target's field set is fixed (most ads platforms), fields contains those fields; for backends where the columns are user-defined (e.g. a SQL database), fields will be empty and the caller defines the columns at mapping time.

When properties is supplied, the refresh parameter is ignored — a not-yet-created target has no cached schema to refresh.

get/api/connections/{id}/modelsync/target/fields

Path parameters

idstring uuid required

Unique identifier of the connection.

Example:248df4b7-aa70-47b8-a036-33ac447e668d

Unique identifier of the connection.

Query parameters

targetstring

Identifier of the target object (e.g. schema.table for a database destination, object name for a SaaS destination). Required unless properties is supplied.

Example:database.table

Identifier of the target object (e.g. schema.table for a database destination, object name for a SaaS destination). Required unless properties is supplied.

refreshboolean

When true, force a cache refresh of the target's schema before returning its fields. Ignored when properties is supplied.

When true, force a cache refresh of the target's schema before returning its fields. Ignored when properties is supplied.

propertiesobject

Target-creation property values, supplied as properties[key]=value, matching the target_creation.properties returned by GET /api/connections/{id}/modelsync/targetobjects. When supplied, the response describes the not-yet-created target that would result from these inputs, in the same shape as for an existing target. Exactly one of target or properties must be supplied.

Target-creation property values, supplied as properties[key]=value, matching the target_creation.properties returned by GET /api/connections/{id}/modelsync/targetobjects. When supplied, the response describes the not-yet-created target that would result from these inputs, in the same shape as for an existing target. Exactly one of target or properties must be supplied.

Headers

X-Polytomic-Versionstring

Response

OK

Example response

{
  "data": {
    "fields": [
      {
        "createable": true,
        "description": "Field description",
        "filterable": true,
        "id": "field1",
        "identity_functions": [
          {
            "id": "Equality",
            "label": "Equality"
          }
        ],
        "name": "Field",
        "required": true,
        "source_type": "string",
        "type": "string",
        "updateable": true
      }
    ],
    "id": "database.table",
    "modes": [
      {
        "description": "Create records when they don't exist; don't update existing ones",
        "label": "Create",
        "mode": "create",
        "requires_identity": true
      }
    ],
    "name": "Table",
    "refreshed_at": "2024-01-01T00:00:00Z"
  }
}