Trigger a scenario run by scenario ID

Use scenario ID from the GET dev-portal/scenarios to select your scenario, and include the necessary parameters that the scenario description included.

Earlier when you retrieved a list of scenarios, they may include a field like this:

"parameters": [
  {
    "id": "restaurant_drn",
    "type": "restaurant",
    "label": "Where to send the order"
  },
  {
    "id": "basket_id",
    "type": "basket_id",
    "label": "ID of a Developer Portal basket"
  }
]

This describes which parameters are required in order to trigger a scenario. When including the parameters in your request to trigger a scenario, the above parameters would translate to the following.

Sample Request Body

{
    "restaurant_drn": "<drnid>",
    "basket_id": "<id>"
}

Note that if a scenario does not describe any parameters, you should send an empty object {}.

The response will include scenarioRunID, which you can use to query the state of the scenario.

Language
Credentials
OAuth2