ConnectCloud Developers

Resend an instance's state to trade (workflow:admin)

POST /api/workflow/v1/tasks/{instanceId}/resync

Module: Workflow · operationId: resyncInstance · Tag: Instances · Auth: access token (Authorization: Bearer <accessToken>)

The escape hatch for a transaction that stays locked although its workflow is over: sends the instance's effective state to trade again and returns the state afterwards (RETRYING_SYNC if trade is still unreachable; it is retried automatically). 409 when there is nothing to resend: no trade transaction, a start that never ran, or an ended instance while another workflow runs for the same transaction.

Parameters

Name In Type Required Description
instanceId path string (uuid) yes Instance id (guid)

Responses

  • 200 State after the resend (application/json)
  • 401 Missing or invalid token (unauthorized) (application/json)
  • 403 Error (application/json)
  • 404 Error (application/json)
  • 409 Error (application/json)
  • 500 Error (application/json)

Fields of the 200 answer:

  • state (WorkflowState): (one of OPEN, RETRYING_SYNC, APPROVED, REJECTED, COMPLETED, CANCELLED, TRIGGER_NOT_MATCHED, TECHNICALLY_FAILED)

Example 200 answer:

{
  "state": "APPROVED"
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/workflow/v1/tasks/3f9c2a1e-8b7d-4c6e-a5f4-1d2b3c4e5f60/resync' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

View as Markdown · Interactive reference · OpenAPI