MobiariDocs
Admin APIWorkflows

Update a workflow

PATCH
/stores/{store_id}/workflows/{workflow_id}

Changes the draft (name, description, graph, trigger) or sets it to draft / paused. What fires changes only on publish.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid
workflow_id*string

Workflow id

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  "description": "string",
  "graph": {
    "edges": [
      {
        "branch": "string",
        "from": "string",
        "to": "string"
      }
    ],
    "nodes": [
      {
        "config": {},
        "id": "string",
        "position": {
          "x": 0.1,
          "y": 0.1
        },
        "type": "string"
      }
    ]
  },
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "kind": "journey",
  "last_run_at": "2019-08-24T14:15:22Z",
  "name": "string",
  "next_fire_at": "2019-08-24T14:15:22Z",
  "published_at": "2019-08-24T14:15:22Z",
  "published_graph": null,
  "published_trigger": null,
  "status": "draft",
  "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  "trigger": {
    "type": "manual"
  },
  "updated_at": "2019-08-24T14:15:22Z",
  "version": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}