Starting a workflow

Starting a workflow by HTTP request

Starting workflows that begin with a custom trigger can be done by sending an HTTP request to the Flow Companion app.

The request headers are the same for all types of events:

Content-Type: Application/Json
Authorization: bearer {token}

You can create a bearer token for authorization on the application page in the SettingsManage authentication tokens section.

Below are the URLs and request bodies for each type of event. All additional parameters are optional.

Custom trigger

POST https://flow-companion.mivicle.app/rest/1/flow/start

{
  "specifier": "Specifier to use in a workflow condition",
  "additionalParameters": {
    "stringParameter": "some string parameter",
    "numberParameter": 0,
    "booleanParameter": true
  }
}

Order: custom trigger

POST https://flow-companion.mivicle.app/rest/1/flow/start/order

{
  "itemId": "ID (207119551) or legacyResourceId (gid://shopify/Order/207119551) of the order",
  "specifier": "Specifier to use in a workflow condition",
  "additionalParameters": {
    "stringParameter": "some string parameter",
    "numberParameter": 0,
    "booleanParameter": true
  }
}

Customer: custom trigger

POST https://flow-companion.mivicle.app/rest/1/flow/start/customer

{
  "itemId": "ID (207119551) or legacyResourceId (gid://shopify/Customer/207119551) of the customer",
  "specifier": "Specifier to use in a workflow condition",
  "additionalParameters": {
    "stringParameter": "some string parameter",
    "numberParameter": 0,
    "booleanParameter": true
  }
}

Product: custom trigger

POST https://flow-companion.mivicle.app/rest/1/flow/start/product

{
  "itemId": "ID (207119551) or legacyResourceId (gid://shopify/Product/207119551) of the product",
  "specifier": "Specifier to use in a workflow condition",
  "additionalParameters": {
    "stringParameter": "some string parameter",
    "numberParameter": 0,
    "booleanParameter": true
  }
}

See also: