Workflows
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| POST | /api/workflows/resume-workflow | Resume workflow |
| GET | /api/workflows/{entityType}/configured | Get configured workflows |
| PUT | /api/workflows/configured/{workflowId} | Update configured workflow |
| PATCH | /api/workflows/configured/{workflowId} | Patch configured workflow |
| DELETE | /api/workflows/configured/{workflowId} | Delete configured workflow |
| POST | /api/workflows/{entityType}/configure-positions | Configure workflow position |
| POST | /api/workflows/configure | Configure workflow |
| GET | /api/workflows/templates/{workflowId} | Get workflow template |
| GET | /api/workflows/{entityType}/actions | Get actionable workflows |
| POST | /api/workflows/{entityType}/actions/{actionId} | Execute action |
Resume workflow
POST/api/workflows/resume-workflow
Access. Send a bearer token or an API key. Any signed-in member can call this operation.
Request body
Send JSON with the shape ResumeWorkflowRequest. Payload for resuming a suspended workflow instance.
| Field | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X POST "https://api.miridia.io/api/workflows/resume-workflow" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": true,
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get configured workflows
GET/api/workflows/{entityType}/configured
Access. Send a bearer token or an API key. The caller needs the Workflows view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityType | path | enum DispatchEntityType | Yes | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
managed | query | boolean | No |
Response
200. Returns a PagedResult envelope. Each item in data is BusinessIntegrationProviderWorkflowResponse.
curl -X GET "https://api.miridia.io/api/workflows/{entityType}/configured" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {}
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Update configured workflow
PUT/api/workflows/configured/{workflowId}
Access. Send a bearer token or an API key. The caller needs the Workflows modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateConfiguredWorkflowRequest. Payload for the full edit of a configured workflow: the title, the description, and the two action flags. The trigger and the provider stay as they are.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
description | string | No | Limits: maximum 10000 characters. |
isSingleAction | boolean | No | |
isMultiAction | boolean | No |
Response
200. Returns a SingleResult envelope. The data field is BusinessIntegrationProviderWorkflowResponse.
curl -X PUT "https://api.miridia.io/api/workflows/configured/{workflowId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"description": "string",
"isSingleAction": true,
"isMultiAction": true
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {
"id": 0,
"entityType": "Customer",
"title": "string",
"eventTitle": "string"
}
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Patch configured workflow
PATCH/api/workflows/configured/{workflowId}
Access. Send a bearer token or an API key. The caller needs the Workflows modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowId | path | string (uuid) | Yes |
Request body
Send JSON with the shape PatchConfiguredWorkflowRequest. Payload for partially updating a configured workflow. Currently only the active state is patchable.
| Field | Type | Required | Description |
|---|---|---|---|
isEnabled | boolean | Yes |
Response
200. Returns a SingleResult envelope. The data field is BusinessIntegrationProviderWorkflowResponse.
curl -X PATCH "https://api.miridia.io/api/workflows/configured/{workflowId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"isEnabled": true
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {
"id": 0,
"entityType": "Customer",
"title": "string",
"eventTitle": "string"
}
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Delete configured workflow
DELETE/api/workflows/configured/{workflowId}
Access. Send a bearer token or an API key. The caller needs the Workflows delete permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is BusinessIntegrationProviderWorkflowResponse.
curl -X DELETE "https://api.miridia.io/api/workflows/configured/{workflowId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {
"id": 0,
"entityType": "Customer",
"title": "string",
"eventTitle": "string"
}
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Configure workflow position
POST/api/workflows/{entityType}/configure-positions
Access. Send a bearer token or an API key. The caller needs the Workflows modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityType | path | enum DispatchEntityType | Yes | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
Request body
Send JSON with the shape ConfigureIntegrationProviderWorkflowPositionCommand.
| Field | Type | Required | Description |
|---|---|---|---|
entityType | enum DispatchEntityType | No | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
workflowIds | string (uuid)[] | Yes |
Response
200. Returns a PagedResult envelope. Each item in data is BusinessIntegrationProviderWorkflowResponse.
curl -X POST "https://api.miridia.io/api/workflows/{entityType}/configure-positions" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"entityType": "Customer",
"workflowIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {}
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Configure workflow
POST/api/workflows/configure
Access. Send a bearer token or an API key. The caller needs the Workflows modify permission.
Request body
Send JSON with the shape ConfigureWorkflowCommand.
| Field | Type | Required | Description |
|---|---|---|---|
triggerId | integer (int32) | No | The workflow trigger id. Leave this at zero for a workflow with no trigger, that is a menu action only. Give either this value or EntityType. |
title | string | Yes | |
description | string | Yes | |
templateId | integer (int32) | No | The workflow template if the user selected one. Otherwise this will be empty. |
entityType | enum DispatchEntityType | No | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
isSingleAction | boolean | No | Shows this workflow as a menu action on the entity details page. |
isMultiAction | boolean | No | Shows this workflow as a bulk menu action on the entity list page. |
Response
200. Returns a SingleResult envelope. The data field is BusinessIntegrationProviderWorkflowResponse.
curl -X POST "https://api.miridia.io/api/workflows/configure" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"triggerId": 0,
"title": "string",
"description": "string",
"templateId": 0,
"entityType": "Customer",
"isSingleAction": true,
"isMultiAction": true
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityType": "Customer",
"title": "string",
"description": "string",
"enabled": true,
"isManaged": true,
"isSingleAction": true,
"isMultiAction": true,
"accessToken": "string",
"url": "string",
"position": 0,
"integrationProviderWorkflow": {
"id": 0,
"entityType": "Customer",
"title": "string",
"eventTitle": "string"
}
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get workflow template
GET/api/workflows/templates/{workflowId}
Get's the list of templates configured for the provided workflow id
Access. Send a bearer token or an API key. The caller needs the Workflows view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowId | path | integer (int32) | Yes | The workflow (trigger) id |
Response
200. Returns a JSON array. Each item is IntegrationProviderWorkflowTemplateResponse.
curl -X GET "https://api.miridia.io/api/workflows/templates/{workflowId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"[
{
"id": 0,
"title": "string",
"description": "string"
}
]Get actionable workflows
GET/api/workflows/{entityType}/actions
Access. Send a bearer token or an API key. The caller needs the Workflows view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityType | path | enum DispatchEntityType | Yes | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
Response
200. Returns a JSON array. Each item is ExecutableIntegrationProviderWorkflowResponse.
curl -X GET "https://api.miridia.io/api/workflows/{entityType}/actions" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"isSingleAction": true,
"isMultiAction": true
}
]Execute action
POST/api/workflows/{entityType}/actions/{actionId}
Access. Send a bearer token or an API key. The caller needs the Workflows view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityType | path | enum DispatchEntityType | Yes | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
actionId | path | string (uuid) | Yes |
Request body
Send JSON with the shape ExecuteWorkflowActionRequest. Payload for a workflow menu action. A single-action workflow takes one entity id.
| Field | Type | Required | Description |
|---|---|---|---|
entityIds | string (uuid)[] | No |
Response
200. Returns a SingleResult envelope. The data field is ExecuteWorkflowActionResponse.
curl -X POST "https://api.miridia.io/api/workflows/{entityType}/actions/{actionId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"entityIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"succeeded": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"failed": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Models
The operations on this page use these object types. Select a type to see its fields.
BusinessIntegrationProviderWorkflowResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
entityId | string (uuid) | |
entityType | enum DispatchEntityType | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
title | string | |
description | string | |
enabled | boolean | |
isManaged | boolean | True when Miridia provisioned this workflow. |
isSingleAction | boolean | True when the workflow shows in the details page menu of its entity type. |
isMultiAction | boolean | True when the workflow shows in the list page bulk menu of its entity type. |
accessToken | string | |
url | string | |
position | integer (int32) | |
integrationProviderWorkflow | WorkflowTriggerResponse |
ExecutableIntegrationProviderWorkflowResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
isSingleAction | boolean | Shows on the entity details page menu. |
isMultiAction | boolean | Shows on the entity list bulk menu. |
ExecuteWorkflowActionResponse
The per-id result of a workflow menu action. An id in failed means the webhook call for that entity did not return a success status.
| Field | Type | Description |
|---|---|---|
succeeded | string (uuid)[] | |
failed | string (uuid)[] |
IntegrationProviderWorkflowTemplateResponse
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
title | string | |
description | string |
WorkflowTriggerResponse
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
entityType | enum DispatchEntityType | One of: None, Customer, Contact, Product, Order, Shipment, IntegrationProvider, Address, Business, Notification, Package, Supplier, User, WorkOrder, TransferOrder, PurchaseOrder, Bom, Vehicle. |
title | string | |
eventTitle | string |