v1

latestOpenAPI 3.1.02026-08-06236494759.4 KB
Workflows

Update Workflow

Endpoint to update an existing Workflow,for some types, this might generate a new ID.

put/business/v2/workflows/{workflowId}

Path parameters

workflowIdstring required

The workflow ID.

Example:7bf79328-a7ae-4222-aa54-091ff7f429a7

Request body

namestring

The name of the Workflow.

descriptionstring

The description of the Workflow.

policy_urlstring

The URL of the policy document for the Workflow.

target_type'FUNDS' | 'GOODS_AND_SERVICES' | 'TRIP' required

Example request

{
  "name": "Workflow",
  "description": "My Workflow Description",
  "policy_url": "https://www.example.com/policy.pdf",
  "steps": [
    {
      "step_number": 2,
      "reviewer_info": {
        "ids": [
          "7bf79328-a7ae-4222-aa54-091ff7f429a7",
          "2d65bd5e-3fdf-4002-b166-bde7fb8863fa"
        ]
      },
      "automation_rule": {
        "required_info": true,
        "amount_condition": {
          "amount": 10.25
        }
      }
    }
  ],
  "visibilities": [
    {
      "value": [
        "7bf79328-a7ae-4222-aa54-091ff7f429a7",
        "2d65bd5e-3fdf-4002-b166-bde7fb8863fa"
      ]
    }
  ]
}

Response

The updated Workflow.

idstring

The Workflow ID.

namestring

The name of the Workflow.

descriptionstring

The description of the Workflow.

policy_urlstring

The URL of the policy document for the Workflow.

status'ACTIVE' | 'DEACTIVATED' | 'DELETED'
target_type'FUNDS' | 'GOODS_AND_SERVICES' | 'TRIP'
priorityinteger

The priority of the Workflow.

steps_countinteger

The number of steps in the Workflow.

Example response

{
  "id": "7bf79328-a7ae-4222-aa54-091ff7f429a7",
  "name": "Workflow",
  "description": "My Workflow Description",
  "policy_url": "https://www.example.com/policy.pdf",
  "priority": 1,
  "steps_count": 1,
  "steps": [
    {
      "step_number": 2,
      "reviewer_info": {
        "ids": [
          "7bf79328-a7ae-4222-aa54-091ff7f429a7",
          "2d65bd5e-3fdf-4002-b166-bde7fb8863fa"
        ]
      },
      "automation_rule": {
        "required_info": true,
        "amount_condition": {
          "amount": 10.25
        }
      }
    }
  ],
  "visibilities": [
    {
      "value": [
        "7bf79328-a7ae-4222-aa54-091ff7f429a7",
        "2d65bd5e-3fdf-4002-b166-bde7fb8863fa"
      ]
    }
  ]
}