HydraCore
API by router

Workflows

Query Workflows Internal

GET
/internal/v1/instances/{instance_id}/workflows

Path Parameters

instance_id*Instance Id
Formatuuid

Query Parameters

customer_id?|null
workflow_type?string|null
status?string|null
reference?string|null
page?Page
Range1 <= value
Default1
per_page?Per Page
Range1 <= value <= 100
Default20

Response Body

Successful Response

application/json
  1. response
page*Page
per_page*Per Page
total*Total
workflows*array<>
Example Request
curl -X GET 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows'
Example Response
{  "page": 0,  "per_page": 0,  "total": 0,  "workflows": [    {      "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",      "assigned_to": "string",      "completed_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",      "escalation_level": 0,      "expires_at": "2019-08-24T14:15:22Z",      "history": [],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",      "last_action_at": "2019-08-24T14:15:22Z",      "next_action_at": "2019-08-24T14:15:22Z",      "reference": "string",      "stage": "string",      "status": "string",      "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "workflow_state": {},      "workflow_type": "string"    }  ]}

Create Workflow

POST
/internal/v1/instances/{instance_id}/workflows

Path Parameters

instance_id*Instance Id
Formatuuid

Request Body

application/json
  1. body
assigned_to?string|null
customer_id*Customer Id
Formatuuid
expires_at?|null
instance_id?|null
next_action_at?|null
reference?|

External reference (property ref, job ref, etc.)

stage?|

Initial stage

title?|null
workflow_state?|null
workflow_type*Workflow Type

One of: ('lead', 'rent_arrears', 'maintenance', 'compliance_renewal', 'viewing', 'roster', 'approval', 'invoice_chase', 'onboarding', 'custom')

Response Body

Successful Response

application/json
  1. response
approver_id?|null
assigned_to?string|null
completed_at?|null
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
escalation_level*Escalation Level
expires_at?|null
history?array<unknown>
Default[]
id*Id
Formatuuid
instance_id?|null
last_action_at?|null
next_action_at?|null
reference?string|null
stage?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
title?string|null
updated_at*Updated At
Formatdate-time
workflow_state?|null
workflow_type*Workflow Type
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows' \  -H 'Content-Type: application/json' \  -d '{  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "workflow_type": "string"}'
Example Response
{  "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",  "assigned_to": "string",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "escalation_level": 0,  "expires_at": "2019-08-24T14:15:22Z",  "history": [],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "last_action_at": "2019-08-24T14:15:22Z",  "next_action_at": "2019-08-24T14:15:22Z",  "reference": "string",  "stage": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "workflow_state": {},  "workflow_type": "string"}

Get Workflow Internal

GET
/internal/v1/instances/{instance_id}/workflows/{workflow_id}

Path Parameters

instance_id*Instance Id
Formatuuid
workflow_id*Workflow Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
approver_id?|null
assigned_to?string|null
completed_at?|null
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
escalation_level*Escalation Level
expires_at?|null
history?array<unknown>
Default[]
id*Id
Formatuuid
instance_id?|null
last_action_at?|null
next_action_at?|null
reference?string|null
stage?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
title?string|null
updated_at*Updated At
Formatdate-time
workflow_state?|null
workflow_type*Workflow Type
Example Request
curl -X GET 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",  "assigned_to": "string",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "escalation_level": 0,  "expires_at": "2019-08-24T14:15:22Z",  "history": [],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "last_action_at": "2019-08-24T14:15:22Z",  "next_action_at": "2019-08-24T14:15:22Z",  "reference": "string",  "stage": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "workflow_state": {},  "workflow_type": "string"}

Advance Workflow

PATCH
/internal/v1/instances/{instance_id}/workflows/{workflow_id}

Path Parameters

instance_id*Instance Id
Formatuuid
workflow_id*Workflow Id
Formatuuid

Request Body

application/json
  1. body
action*Action

Audit action name (e.g. 'escalated', 'approved', 'contacted_tier2')

action_detail?|null
actor?string|null
approver_id?|null
assigned_to?string|null
escalation_level?integer|null
expires_at?|null
next_action_at?|null
stage?|

New stage

status?|

New status: ('active', 'awaiting_approval', 'paused', 'suspended', 'completed', 'expired', 'cancelled', 'failed')

workflow_state?|

Merge into existing state

Response Body

Successful Response

application/json
  1. response
approver_id?|null
assigned_to?string|null
completed_at?|null
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
escalation_level*Escalation Level
expires_at?|null
history?array<unknown>
Default[]
id*Id
Formatuuid
instance_id?|null
last_action_at?|null
next_action_at?|null
reference?string|null
stage?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
title?string|null
updated_at*Updated At
Formatdate-time
workflow_state?|null
workflow_type*Workflow Type
Example Request
curl -X PATCH 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "action": "string"}'
Example Response
{  "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",  "assigned_to": "string",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "escalation_level": 0,  "expires_at": "2019-08-24T14:15:22Z",  "history": [],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "last_action_at": "2019-08-24T14:15:22Z",  "next_action_at": "2019-08-24T14:15:22Z",  "reference": "string",  "stage": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "workflow_state": {},  "workflow_type": "string"}

Resume Workflow Internal

POST
/internal/v1/instances/{instance_id}/workflows/{workflow_id}/resume

Path Parameters

instance_id*Instance Id
Formatuuid
workflow_id*Workflow Id
Formatuuid

Request Body

application/json
  1. body
resume_data?|

Data merged into workflow_state on resume

Response Body

Successful Response

application/json
  1. response
id*Id
message*Message
status*Status
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/resume' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "message": "string",  "status": "string"}
POST
/internal/v1/instances/{instance_id}/workflows/{workflow_id}/suspend

Path Parameters

instance_id*Instance Id
Formatuuid
workflow_id*Workflow Id
Formatuuid

Request Body

application/json
  1. body
payload?|

Arbitrary state payload to preserve for resume

step*Step

Step name to suspend at

Lengthlength <= 100

Response Body

Successful Response

application/json
  1. response
id*Id
message*Message
status*Status
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/suspend' \  -H 'Content-Type: application/json' \  -d '{  "step": "string"}'
Example Response
{  "id": "string",  "message": "string",  "status": "string"}

List Workflows Dashboard

GET
/v1/workflows

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

customer_id?|null
workflow_type?string|null
status?string|null
page?Page
Range1 <= value
Default1
per_page?Per Page
Range1 <= value <= 100
Default20

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
page*Page
per_page*Per Page
total*Total
workflows*array<>
Example Request
curl -X GET 'https://example.com/v1/workflows'
Example Response
{  "page": 0,  "per_page": 0,  "total": 0,  "workflows": [    {      "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",      "assigned_to": "string",      "completed_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",      "escalation_level": 0,      "expires_at": "2019-08-24T14:15:22Z",      "history": [],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",      "last_action_at": "2019-08-24T14:15:22Z",      "next_action_at": "2019-08-24T14:15:22Z",      "reference": "string",      "stage": "string",      "status": "string",      "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "workflow_state": {},      "workflow_type": "string"    }  ]}

List Suspended Workflows

GET
/v1/workflows/suspended

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/workflows/suspended'
Example Response
[  {}]

Get Workflow Dashboard

GET
/v1/workflows/{workflow_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
approver_id?|null
assigned_to?string|null
completed_at?|null
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
escalation_level*Escalation Level
expires_at?|null
history?array<unknown>
Default[]
id*Id
Formatuuid
instance_id?|null
last_action_at?|null
next_action_at?|null
reference?string|null
stage?string|null
status*Status
tenant_id*Tenant Id
Formatuuid
title?string|null
updated_at*Updated At
Formatdate-time
workflow_state?|null
workflow_type*Workflow Type
Example Request
curl -X GET 'https://example.com/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "approver_id": "1b287364-14ff-4b72-8953-b40399093a6f",  "assigned_to": "string",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "escalation_level": 0,  "expires_at": "2019-08-24T14:15:22Z",  "history": [],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "last_action_at": "2019-08-24T14:15:22Z",  "next_action_at": "2019-08-24T14:15:22Z",  "reference": "string",  "stage": "string",  "status": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "workflow_state": {},  "workflow_type": "string"}

Abort Workflow

POST
/v1/workflows/{workflow_id}/abort

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
id*Id
message*Message
status*Status
Example Request
curl -X POST 'https://example.com/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/abort'
Example Response
{  "id": "string",  "message": "string",  "status": "string"}

Resume Workflow

POST
/v1/workflows/{workflow_id}/resume

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
resume_data?|

Data merged into workflow_state on resume

Response Body

Successful Response

application/json
  1. response
id*Id
message*Message
status*Status
Example Request
curl -X POST 'https://example.com/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/resume' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "message": "string",  "status": "string"}

Suspend Workflow

POST
/v1/workflows/{workflow_id}/suspend

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

workflow_id*Workflow Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
payload?|

Arbitrary state payload to preserve for resume

step*Step

Step name to suspend at

Lengthlength <= 100

Response Body

Successful Response

application/json
  1. response
id*Id
message*Message
status*Status
Example Request
curl -X POST 'https://example.com/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/suspend' \  -H 'Content-Type: application/json' \  -d '{  "step": "string"}'
Example Response
{  "id": "string",  "message": "string",  "status": "string"}