Batch update workflows

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://restapi.wyzio.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Wyzio MCP server": {
    "url": "https://restapi.wyzio.com/mcp"
  }
}

Close
POST /api-v1/workflow/batch

Updates multiple workflows.

Headers

  • WEAL-TOKEN Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer

    Entity ID. If negative value, a new entity will be created

  • moduleType string Required

    Module this workflow applies to

    Values are SALES_INVOICES, PURCHASE_INVOICES, ORDERS, or TIME_DETAILS.

  • name string Required

    Workflow name

  • description string

    Workflow description

  • blocks array[object]

    Ordered list of workflow blocks

    Hide blocks attributes Show blocks attributes object
    • id integer

      Entity ID. If negative value, a new entity will be created

    • position integer

      Position of the block within the workflow

    • blockType string Required

      Block type

      Values are TRIGGER or ACTION.

    • actionType string Required

      Action type this block reacts to

      Values are ADVANCED_INVOICING, CREATE, DELETE, GENERATE_PAYMENT, GENERATE_PDF_SEND, MODIFY, NONE, SEND_CONFIRMATION, SEND_OFFER, STATUS_BILLABLE, STATUS_CONFIRMED, SUBMIT, or VALIDATE.

    • userGroupIds array[integer]

      User group IDs assigned to this block

    • users array[object]

      Users assigned to this block. Only id is required per entry

      Hide users attribute Show users attribute object
      • id integer Required

        Contact ID

    • users2 array[object]

      Secondary set of users assigned to this block. Only id is required per entry

      Hide users2 attribute Show users2 attribute object
      • id integer Required

        Contact ID

    • userGroupIds2 array[integer]

      Secondary set of user group IDs assigned to this block

    • isSystemUserGroup boolean

      Whether the primary assignee is the system-defined user group

    • isSystemUserGroup2 boolean

      Whether the secondary assignee is the system-defined user group

    • contacts array[object]

      Contacts to notify for this block. Only id is required per entry

      Hide contacts attribute Show contacts attribute object
      • id integer Required

        Contact ID

    • canModify boolean

      Whether this block can be modified

    • filters string

      JSON-stringified filter expression applied by this block

    • generateParams string

      JSON-stringified parameters used to generate documents/actions for this block

  • isActive boolean

    Whether the workflow is active

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • errorCode string
          • fieldName string
          • data string
          • isSevere boolean
      • freshData

        Refreshed domain data

      • freshRow

        Refreshed table row data

      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer(int64)
        • name string
      • error boolean
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

POST /api-v1/workflow/batch
curl \
 --request POST 'https://wyzio.app/api-v1/workflow/batch' \
 --header "Content-Type: application/json" \
 --data '[{"id":12345678,"moduleType":"PURCHASE_INVOICES","name":"Purchase Invoice Approval","description":"Requires manager approval above 1000 CHF","blocks":[{"id":12345678,"position":1,"blockType":"APPROVAL","actionType":"MODIFY","userGroupIds":[12345678],"users":[{"id":12345678}],"users2":[{"id":12345678}],"userGroupIds2":[12345678],"isSystemUserGroup":false,"isSystemUserGroup2":false,"contacts":[{"id":12345678}],"canModify":true,"filters":"string","generateParams":"string"}],"isActive":true}]'
Request examples
# Headers

# Payload
[
  {
    "id": 12345678,
    "moduleType": "PURCHASE_INVOICES",
    "name": "Purchase Invoice Approval",
    "description": "Requires manager approval above 1000 CHF",
    "blocks": [
      {
        "id": 12345678,
        "position": 1,
        "blockType": "APPROVAL",
        "actionType": "MODIFY",
        "userGroupIds": [
          12345678
        ],
        "users": [
          {
            "id": 12345678
          }
        ],
        "users2": [
          {
            "id": 12345678
          }
        ],
        "userGroupIds2": [
          12345678
        ],
        "isSystemUserGroup": false,
        "isSystemUserGroup2": false,
        "contacts": [
          {
            "id": 12345678
          }
        ],
        "canModify": true,
        "filters": "string",
        "generateParams": "string"
      }
    ],
    "isActive": true
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}