Workflows

Patch a workflow

Update a workflow.

patch/workflows/{workflowId}

Request

Path parameters

workflowIdstring required

The workflow identifier

Request body

namestring

A name to describe the workflow

activeboolean

Indicates whether the workflow is currently active

Example request

{
  "name": "Webhooks workflow",
  "active": true,
  "conditions": [
    {
      "type": "event",
      "events": {
        "gateway": [
          "payment_approved",
          "payment_pending",
          "payment_declined"
        ]
      }
    },
    {
      "type": "entity",
      "entities": [
        "ent_xyfdshfudosfdshfdiosfds",
        "ent_fidjosfjdisofdjsifdosfu"
      ]
    },
    {
      "type": "processing_channel",
      "processing_channels": [
        "pc_axclravnqf5u5ejkweijnp5zc4"
      ]
    }
  ],
  "actions": [
    {
      "workflow_action_id": "wfa_itja4x7zgzye3andzqq62u4hvq",
      "type": "webhook",
      "url": "https://example.com/webhooks",
      "headers": {
        "Authorization": "<AUTHORIZATION_UUID>"
      },
      "signature": {
        "method": "HMACSHA256",
        "key": "8V8x0dLK%AyD*DNS8JJr"
      }
    }
  ]
}

Response

Workflow updated successfully

idstring

The workflow identifier

namestring

A name you can use to describe your workflow

activeboolean

Indicates whether the workflow is currently active

Example response

{
  "id": "wf_c7svxlvo2bbuva4f6s3xu4f7wm",
  "name": "Webhooks workflow",
  "active": true,
  "conditions": [
    {
      "id": "wfc_tisekcawefze3l27uaai6hz74e",
      "type": "event",
      "events": {
        "gateway": [
          "payment_approved",
          "payment_pending",
          "payment_declined"
        ]
      }
    },
    {
      "id": "wfc_tisekcawefze3l27uaai6hz74y",
      "type": "entity",
      "entities": [
        "ent_xyfdshfudosfdshfdiosfds",
        "ent_fidjosfjdisofdjsifdosfu"
      ]
    },
    {
      "id": "wfc_tisekcawefze3l27uaai6hz26y",
      "type": "processing_channel",
      "processing_channels": [
        "pc_axclravnqf5u5ejkweijnp5zc4"
      ]
    }
  ],
  "actions": [
    {
      "id": "wfa_itja4x7zgzye3andzqq62u4hvq",
      "type": "webhook",
      "url": "https://example.com/webhooks",
      "headers": {
        "Authorization": "<AUTHORIZATION_UUID>"
      },
      "signature": {
        "method": "HMACSHA256",
        "key": "8V8x0dLK%AyD*DNS8JJr"
      }
    }
  ],
  "_links": {
    "self": {
      "href": "http://flow.cko.lon/client/workflows/wf_c7svxlvo2bbuva4f6s3xu4f7wm"
    }
  }
}

Changes

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