Syncs

Choose a consumer's capabilities and modes

Changed on

Replaces the consumer's choice of main capabilities and modes. Whatever they need is turned on automatically. Answers with the resulting setup and what changed. Mapping values of tables no longer needed are kept. Send preflight: true to get that answer without saving anything.

put/consumers/{consumer_id}/syncs/{syncid}/capabilities

Request

Path parameters

consumer_idstring uuid required
syncidstring uuid required

Query parameters

languagestring nullable

ISO 639-1 code of the language of the texts (en, fr, nl, de, es; any case), falling back to English. Without it, translation keys.

Request body

selectedstring[] required

Keys of the main capabilities the consumer turns on. Replaces the previous choice.

modesobject

Capability key -> mode key, for the capabilities where the consumer chooses.

preflightboolean

Check the choice without saving it: the answer, or the refusal, is the one saving it would give, so a draft can be shown as it would run.

Example request

{
  "selected": [
    "spend_to_accounting.SupplierInvoices"
  ],
  "modes": {
    "spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry"
  }
}

Response

Successful Response

flowidstring uuid required

The sync's one flow: what enable, disable, the answers' PATCH and the executions take as {flowid}.

enabledboolean required

Whether the sync is enabled for this consumer.

latest_preview_idstring uuid nullable required

The most recent preview of this consumer sync, if any.

Example response

{
  "capabilities": [
    {
      "key": "spend_to_accounting.SupplierInvoices",
      "default_mode": "spend_to_accounting.SupplierInvoices.AsInvoice",
      "modes": [
        {
          "key": "spend_to_accounting.SupplierInvoices.AsInvoice",
          "requires_modes": [
            {
              "capability": "spend_to_accounting.SupplierInvoices",
              "mode": "spend_to_accounting.SupplierInvoices.AsInvoice"
            }
          ]
        }
      ]
    }
  ],
  "tables": [
    {
      "key": "spend_to_accounting.PurchaseVatCodes"
    }
  ],
  "questions": [
    {
      "key": "spend_to_accounting.ExpensesSince"
    }
  ],
  "connections": [
    {
      "vertical": "accounting"
    }
  ]
}

Changes