Mappings

Replace the mappings document

Full replace: anything omitted is unmapped, omitted settings revert to defaults — fetch-modify-put is the intended editing pattern. {"create": {"name": "…"}} placeholders create the table/field on that side, typed from the mapped counterpart; retries safely adopt already-created objects. Referenced tables whose fields were never fetched are fetched during the call, so a first PUT can take a few seconds. Any change returns the sync to draft for a human to review and start. The read-only filter and advanced_settings a GET reports are ignored here and keep their stored values — they are edited in the app.

put/v1/sync/syncs/{sync_id}/mappings

Request

  • Base URL: https://api.whalesync.com
  • URL: https://api.whalesync.com/v1/sync/syncs/{sync_id}/mappings
  • Auth: HTTP bearer

Path parameters

sync_idstring required
Example:sync_1d0b06b0-6f5e-4a3e-9d15-3a7b0e2f9a41

Headers

Idempotency-Keystring

Makes retries safe.

If-Matchstring

The revision the edit was based on; 412 on mismatch.

Request body

Example request

{
  "tables": [
    {
      "left": {
        "view": "viwActive"
      },
      "right": {
        "view": "viwActive"
      },
      "filter": {
        "conditions": [
          {
            "left_field": "fldStage",
            "right_field": "stage"
          }
        ],
        "summary": "Only records where Stage is \"Won\" and Amount is at least \"100\" are synced.",
        "docs_url": "https://docs.whalesync.com/features/filters"
      }
    }
  ]
}

Response

The resolved document, with created objects under their real remote ids.

Example response

{
  "tables": [
    {
      "left": {
        "view": "viwActive"
      },
      "right": {
        "view": "viwActive"
      },
      "filter": {
        "conditions": [
          {
            "left_field": "fldStage",
            "right_field": "stage"
          }
        ],
        "summary": "Only records where Stage is \"Won\" and Amount is at least \"100\" are synced.",
        "docs_url": "https://docs.whalesync.com/features/filters"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.