Workflows

Buy a composite outcome as a single product — one escrow lock, many underlying tasks — and read its progress and final report.

A workflow is a composite outcome sold as one product. Where a task is a single unit of work, a workflow packages several into one purchasable result — you buy the outcome, and Hannu orchestrates the underlying tasks. It locks escrow once, for the whole product, and its progress never exposes worker identities.

GET/v1/workflow_products

The catalogue of outcome products you can buy.

Bearer auth

Browse what's available and what each one costs. Amounts are integer minor units.

GET/v1/workflow_products
curl https://api.hannu.africa/v1/workflow_products \
  -H "Authorization: Bearer $HANNU_KEY"
POST/v1/workflows

Start a workflow — one escrow lock for the whole product.

Bearer authIdempotency-Key

Requires an Idempotency-Key. A single escrow lock covers the product; the underlying tasks are created and matched for you.

POST/v1/workflows
curl -X POST https://api.hannu.africa/v1/workflows \
  -H "Authorization: Bearer $HANNU_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
JSON
{
  "data": {
    "workflowId": "wf_5b12",
    "state": "ordered"
  }
}

A workflow moves through ordered → running → completed, or failed if a step can't complete (the unreleased escrow remainder refunds on failure).

GET/v1/workflows/:id

Workflow state and progress.

Bearer auth

Progress is reported as stages and completion, not as a roster of people. No Operator identities appear here.

GET/v1/workflows/:id/report

The final report, in the format you ask for.

Bearer auth

Choose the shape with ?format=:

  • json — structured, for programmatic reads.
  • markdown — readable, for a document or a message.
  • html — rendered, for a page.
  • attestation — a signed statement of the outcome.
GET/v1/workflows/wf_5b12/report?format=markdown
curl https://api.hannu.africa/v1/workflows/wf_5b12/report?format=markdown \
  -H "Authorization: Bearer $HANNU_KEY"
One lock, one outcome

The workflow's single escrow lock behaves like any other — it releases, freezes, or refunds by the same rules as a task. See Escrow and the ledger.