Skip to main content
Docs

Mandates

A mandate is the agreement: who pays whom, how much, on which schedule, under which conditions, with which dispute rule. There is no endpoint that sets a status. You act on a mandate (send it, amend it, cancel it) and the engine moves it through its states: draft, then sent for acceptance, then accepted and active, then completed, cancelled or expired.

Every mandate you read carries next_actions: what can happen next, who has to do it, whether the caller may do it now, and why not if the answer is no. Build your screens from next_actions instead of re-implementing the state machine.

Terms are versioned. Version 1 is frozen at send. An amendment, a cancellation, a dispute settlement or a reschedule creates the next version, and both parties accept it before it takes effect. Tenant safety controls are versioned separately, so tightening your own checks never rewrites what the parties accepted.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Mandate

Mandate (example values)
{
  "id": "man_6543a1b2c3d4e5f6a7b8cc00",
  "object": "mandate",
  "livemode": false,
  "number": 7,
  "reference": "PRJ-2026-0007",
  "status": "active",
  "status_changed_at": "2026-11-04T09:00:00.000Z",
  "title": "Project work, 12 Oak St",
  "description": "",
  "external_reference": "acme-proj-4411",
  "currency": "usd",
  "amount": 2000000,
  "payer_kind": "party",
  "payer": "pty_6543a1b2c3d4e5f6a7b8cb01",
  "payee": "pty_6543a1b2c3d4e5f6a7b8cb00",
  "fund_flow": "hold_and_transfer",
  "fund_flow_locked_at": "2026-11-04T09:00:05.000Z",
  "on_behalf_of": true,
  "stripe_account_id": "acct_1QabcDEF",
  "connection": "sconn_6543a1b2c3d4e5f6a7b8ca30",
  "rail": {
    "fund_flow": "hold_and_transfer",
    "payout_protected": true,
    "label_key": "rail.hold.prevents",
    "label": "Held on Acme's Stripe account. Acme's releases run through Holdyn's checks: a release that fails an agreed condition is blocked.",
    "party_label_key": "rail.hold.party",
    "party_label": "Your payments are held on Acme's Stripe account and paid to Ridge Services LLC only when the agreed conditions are met.",
    "detects_only_label": "Payments or refunds made directly in Acme's Stripe account bypass these checks; they are detected and recorded."
  },
  "business_of_record": { "kind": "payee", "display_name": "Ridge Services LLC" },
  "template": { "id": "tpl_6543a1b2c3d4e5f6a7b8ca20", "key": "milestone_project", "version": 1 },
  "settings_version": 3,
  "overrides": null,
  "current_version": { "id": "mver_6543a1b2c3d4e5f6a7b8cc10", "version_no": 1, "kind": "initial", "terms_hash": "a3f9…64 hex", "effective_at": "2026-11-04T08:59:00.000Z" },
  "pending_version": null,
  "controls_version": { "id": "ctlv_6543a1b2c3d4e5f6a7b8cc15", "version_no": 1, "controls_hash": "7be2…64 hex", "effective_at": "2026-11-03T10:00:00.000Z" },
  "pending_controls_version": null,
  "acceptances": {
    "payer": { "acceptance": "macc_6543a1b2c3d4e5f6a7b8cc20", "version_no": 1, "accepted_at": "2026-11-03T18:05:00.000Z" },
    "payee": { "acceptance": "macc_6543a1b2c3d4e5f6a7b8cc21", "version_no": 1, "accepted_at": "2026-11-04T08:59:00.000Z" }
  },
  "invitation": { "sent_at": "2026-11-03T10:00:00.000Z", "sent_by": "mem_6543a1b2c3d4e5f6a7b8c9d2", "expires_at": "2026-11-17T10:00:00.000Z" },
  "setup": { "started_at": "2026-11-04T08:59:00.000Z", "expires_at": "2026-12-04T08:59:00.000Z", "extensions": [], "completed_at": "2026-11-04T09:00:00.000Z" },
  "expires_at": null,
  "hold_limit": { "days": 365, "oldest_held_since": "2026-11-04T09:00:30.000Z", "percent_used": 1, "alerts": { "at_80": null, "at_100": null } },
  "holds": [],
  "delinquency": { "state": "none", "late_since": null, "defaulted_at": null, "cured_at": null, "cure_reason": null },
  "money": {
    "collected_amount": 900000, "settled_amount": 900000, "available_amount": 400000, "in_flight_amount": 0, "frozen_amount": 0,
    "released_amount": 500000, "retained_amount": 0, "refunded_amount": 0, "refund_returned_amount": 0, "lost_amount": 0,
    "lost_after_transfer_amount": 0, "unbacked_transferred_amount": 0, "outside_amount": 0, "reversed_amount": 0,
    "stripe_fees_amount": 26100, "held_amount": 400000, "recomputed_at": "2026-11-10T14:00:00.000Z"
  },
  "compliance": {
    "packs": [ {
      "pack": "ca_bp_7159_5", "pack_version": "2026-11-01", "mode": "warn",
      "options": { "count_held_collections_as_payment": false },
      "results": [
        { "rule": "deposit_cap", "status": "pass", "detail": null, "exemption": null },
        { "rule": "payment_ahead_of_work", "status": "pass", "detail": null, "exemption": null }
      ],
      "evaluated_at": "2026-11-03T09:58:00.000Z", "acknowledged_by": "mem_6543a1b2c3d4e5f6a7b8c9d2", "acknowledged_at": "2026-11-03T10:00:00.000Z",
      "disclaimer": "This check reflects California Business and Professions Code section 7159.5 as configured. It is not legal advice; your attorney decides how it applies."
    } ],
    "exemptions": []
  },
  "contract_documents": [
    { "id": "evd_6543a1b2c3d4e5f6a7b8cd90", "label": "Signed contract", "original_name": "contract-12-oak.pdf", "sha256": "c0ff…64 hex", "size_bytes": 482113, "content_type": "application/pdf" }
  ],
  "cancellation": null,
  "stalled": null,
  "post_close": null,
  "warnings": [ { "code": "collections_do_not_mirror_releases", "param": "collections", "message": "If cancelled after Materials delivered and tear-off, $3,000 of the $8,000 Materials payment cannot be refunded on this connection." } ],
  "counts": { "collections": 4, "stages": 3, "releases": 1, "open_disputes": 0, "open_risk_flags": 0 },
  "collections": [ { "...": "Collection" } ],
  "stages": [ { "...": "Stage" } ],
  "releases": null,
  "disputes": null,
  "versions": null,
  "controls_versions": null,
  "test_clock": null,
  "validation": null,
  "next_actions": [
    { "action": "propose_amendment", "actor": "tenant", "allowed": true, "blocked_reason": null, "due_at": null },
    { "action": "upload_evidence", "actor": "payee", "allowed": false, "blocked_reason": "party_action", "due_at": null }
  ],
  "metadata": {},
  "created_by": { "type": "member", "id": "mem_6543a1b2c3d4e5f6a7b8c9d2" },
  "completed_at": null,
  "cancelled_at": null,
  "expired_at": null,
  "created_at": "2026-11-03T09:50:00.000Z",
  "updated_at": "2026-11-10T14:00:00.000Z"
}

MandateVersion and the terms document

MandateVersion and the terms document (example values)
{
  "id": "mver_6543a1b2c3d4e5f6a7b8cc10",
  "object": "mandate_version",
  "livemode": false,
  "mandate": "man_6543a1b2c3d4e5f6a7b8cc00",
  "version_no": 1,
  "kind": "initial",
  "status": "effective",
  "origin": null,
  "proposed_by": { "type": "member", "id": "mem_6543a1b2c3d4e5f6a7b8c9d2" },
  "reason": null,
  "terms": { "...": "Terms document below" },
  "terms_hash": "a3f9…64 hex",
  "diff": [],
  "requires_acceptance_from": ["payer", "payee"],
  "acceptance_mode": "typed_name",
  "acceptances": { "payer": "macc_6543a1b2c3d4e5f6a7b8cc20", "payee": "macc_6543a1b2c3d4e5f6a7b8cc21" },
  "compliance": { "...": "same shape as Mandate.compliance, frozen at proposal" },
  "warnings": [],
  "effective_at": "2026-11-04T08:59:00.000Z",
  "superseded_at": null,
  "rejected_by": null,
  "rejected_at": null,
  "withdrawn_at": null,
  "withdrawn_reason": null,
  "created_at": "2026-11-03T10:00:00.000Z"
}

Endpoints

POST/mandates

Credential
Member session or API key
Permission
mandates.create
API key scope
mandates:write
Mode
scoped
Idempotency
honoured, recommended

Request

template string optional (tpl_ id of a published version) or template_key string optional (current published version of that key); title string required (1–200); description string optional (≤ 2000); external_reference string optional (≤ 200, unique per tenant+mode); metadata optional; amount integer (required unless a fixed-mode template defines it; ≥ 100; ≤ settings.limits.max_mandate_amount and the tenant's admin limit); currency string optional (default settings.program.currency; launch: usd only); payer_kind string optional (party default; tenant is P1 ⇒ 422 feature_not_available); payer, payee: each a pty_ id, or an inline party {entity_type, display_name, contact: {name, email, phone?}, country?, external_reference?, metadata?} (upserted like POST /parties; kind is implied); fund_flow string optional (hold_and_transfer, charge_on_release); on_behalf_of boolean optional; manual_mode boolean optional; allow_pay_ahead boolean optional; collections CollectionSpecInput[] optional; stages StageSpecInput[] optional; overrides object optional; expires_at timestamp optional (active-mandate end, P1 end rule; > now + 1 day); hold_limit_days integer optional (30–730).

Response

201 Mandate (status: draft, default expansion collections,stages, validation filled).

Errors

400 parameter_invalid (party of the wrong kind, archived/erased party, shape errors); 404 resource_missing (template or party ids); 409 template_not_published, external_reference_in_use (+ mandate); 422 fund_flow_unavailable (direct_charge, not available on this mode's connection, or hold_and_transfer in live without payout protection), override_out_of_bounds, feature_not_available (funder, payer_kind: tenant), payee_country_unsupported.

Record and events

mandate.created (+ party.created for inline parties) · Events: mandate.created (+ party.created).

Notes

number and reference assigned (<prefix>-<YYYY>-<0007>); terms resolved; percent shares rounded (remainder to the last item); on_date/expected/not-before offsets resolved to dates. The schedule is materialised at creation: one scheduled collection and one pending stage per spec item, inert while draft, with ids stable per spec_id. A draft may be saved with schedule errors (they are reported in validation); send enforces them. Contract documents are uploaded to the draft with POST /mandates/:id/documents (purpose: contract).

GET/mandates

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped
Pagination
cursor

Request

status (multi), payer, payee (pty_), template (tpl_ id or key), external_reference, reference, fund_flow, delinquency (multi: none, late, defaulted), has_open_dispute boolean, held boolean (any active hold), stalled boolean, setup_expires[lte] (timestamp), created[gte|lte], search (2–100 characters, anchored prefix of reference, title or external reference), id (multi id=man_…,man_… or id[]=…, 1–100 man_ ids: the listed mandates of this tenant and mode, unknown ids simply absent; a malformed id or more than 100 → 400 parameter_invalid), expand[].

Response

200 ListResponse<Mandate> (child lists null unless expanded).

GET/mandates/:id

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

expand[] ∈ collections, stages, releases, disputes, versions, controls_versions, payer, payee, template, connection (default collections,stages).

Response

200 Mandate.

PATCH/mandates/:id

Credential
Member session or API key
Permission
mandates.update_draft
API key scope
mandates:write
Mode
scoped
Idempotency
honoured

Request

any POST /mandates field except template/template_key (all optional; collections/stages replace the whole desired list; metadata merges). metadata and external_reference remain editable after draft (they are not terms); every other field only in draft.

Response

200 Mandate.

Errors

409 invalid_state_transition (a term field outside draft); plus the create errors.

Record and events

mandate.draft_updated (diff) · Events: mandate.updated.

Notes

the schedule is reconciled by spec_id (update in place, insert new, hard-delete removed items; deletes only while draft).

POST/mandates/:id/validate

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped
Idempotency
not stored (read-only)

Request

none.

Response

200 MandateValidation ( with terms_preview) for the draft as it stands, against the current connection and tenant settings.

Errors

409 invalid_state_transition (not draft; use POST /mandates/:id/amendments?dry_run=true afterwards).

POST/mandates/:id/send

Credential
Member session or API key
Permission
mandates.send; with notify_parties: false also grants.issue_link (API scope grants:write)
API key scope
mandates:write
Mode
scoped
Step-up
live when notify_parties: false

Request

compliance_acknowledged boolean (required true when any pack in warn mode reports warn/violation); notify_parties boolean optional (default true: Holdyn emails the tenant-branded invitations); grant_expires_in_days integer optional (1–30).

Response

200 {"object": "mandate_send_result", "mandate": Mandate, "grants": [Grant]}; when notify_parties: false the grants are IssuedGrant (delivery: tenant, url shown once) so the tenant delivers them itself.

Errors

403 tenant_delivered_links_disabled (notify_parties: false in live while portal.tenant_delivers_links is off); 422 mandate_invalid (errors, warnings), compliance_blocked (violations), fund_flow_unavailable, payee_country_unsupported, connect_platform_not_ready (the payee's connected account could not be created); 409 compliance_acknowledgement_required (+ pack), invalid_state_transition, connection_missing, connection_unhealthy; money-route errors (a missing payee account is created on Stripe now).

Record and events

mandate.compliance_evaluated, mandate.compliance_acknowledged (when acknowledged), payee.account_created (when created), mandate.version_created (v1, termsHash), mandate.sent (with the controls version 1 hash), grant.issued ×2, mandate.invitation_sent ×2 (when notified) · Events: mandate.sent (+ payee.readiness_changed when an account was created).

Notes

the payee account is created BEFORE version 1 is frozen, so the terms carry the payee's Stripe account and verified name and every contract document's hash; stripe_account_id + connection are stamped; the controls version 1 is created from the resolved settings. Version 1 is proposed; invitation.expires_at = now + settings.program.invitation_expiry_days. Holdyn-emailed grants have delivery: holdyn_email; both parties are invited at once, and with on_behalf_of the payee's onboarding comes first (the payer's setup waits). Full validation

POST/mandates/:id/discard

Credential
Member session or API key
Permission
mandates.update_draft
API key scope
mandates:write
Mode
scoped
Idempotency
honoured

Request

reason string optional (≤ 500).

Response

200 Mandate (status: cancelled, cancellation.reason: "discarded").

Errors

409 invalid_state_transition (not draft).

Record and events

mandate.cancelled (data.reason: "discarded") · Events: mandate.cancelled.

POST/mandates/:id/resend-invitations

Credential
Member session or API key
Permission
mandates.send
API key scope
mandates:write
Mode
scoped
Idempotency
honoured, recommended

Request

roles string[] optional (default: every role that has not accepted the pending version, or whose setup/onboarding is outstanding); revoke_previous boolean optional (default true); extend_expiry boolean optional (default false; true sets invitation.expires_at = now + invitation_expiry_days).

Response

200 {"object": "invitation_resend_result", "mandate": Mandate, "grants": [Grant]} (never URLs: Holdyn emails the links to the parties' verified addresses).

Errors

409 invalid_state_transition (only awaiting_acceptance and pending_setup, or with a pending version).

Record and events

grant.revoked (previous), grant.issued (purpose: invitation, delivery: holdyn_email), mandate.invitation_sent.

POST/mandates/:id/extend-setup

Credential
Member session or API key
Permission
mandates.extend_setup (owner, admin, operator; API scope: mandates:write)
Mode
scoped
Idempotency
honoured

Request

days integer required (1–60); reason string required (10–500).

Response

200 Mandate (setup.expires_at moved, setup.extensions[] appended).

Errors

409 invalid_state_transition (not pending_setup); 422 setup_extension_limit (more than 180 days in total).

Record and events

mandate.setup_extended · Events: mandate.setup_extended. - Notes: both parties are notified of the new date; the payee onboarding and payer setup reminders continue on their cadence.

GET/mandates/:id/versions

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped
Pagination
cursor (newest version first)

Request

kind (multi), status (multi).

Response

200 ListResponse<MandateVersion>.

GET/mandates/:id/versions/:versionId

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

:versionId = mver_ id or the integer version_no.

Response

200 MandateVersion.

GET/mandates/:id/versions/:versionId/canonical

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

format optional (json default, text;). format=text, or an Accept header whose first type is text/plain, labels the SAME bytes Content-Type: text/plain; charset=utf-8 so a browser client gets the raw text and can hash it exactly; any other format → 400 parameter_invalid.

Response

200 Content-Type: application/json; charset=utf-8 (or text/plain as above); body = the exact canonical JSON of the stored terms (verbatim, camelCase,; individuals as digests); header Holdyn-Terms-Hash: <hex> (exposed to cross-origin browsers). Verification: sha256("tv1\n" + body) == terms_hash.

GET/mandates/:id/controls-versions

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped
Pagination
cursor (newest first)

Response

200 ListResponse<ControlsVersion>.

GET/mandates/:id/controls-versions/:versionId

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

:versionId = ctlv_ id or the integer version_no.

Response

200 ControlsVersion.

GET/mandates/:id/controls-versions/:versionId/canonical

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

format optional (json · text, as for the terms;).

Response

200 the exact canonical JSON of the stored controls; header Holdyn-Controls-Hash: <hex>. Verification: sha256("cv1\n" + body) == controls_hash.

POST/mandates/:id/amendments

Credential
Member session or API key
Permission
mandates.amend
API key scope
mandates:write
Mode
scoped
Idempotency
honoured, recommended

Request

dry_run boolean optional. changes AmendmentChanges required; reason string required (10–1000); notify_parties boolean optional (default true).

Response

201 MandateVersion (kind: amendment or reschedule, status: proposed, diff, warnings); with dry_run=true: 200 MandateValidation of the proposed terms (nothing stored).

Errors

409 amendment_pending (+ version), amendment_touches_locked_item (+ param; settled, processing or triggered collections and stages past open are immutable), fund_flow_locked, invalid_state_transition (mandate not awaiting_acceptance, pending_setup, active or defaulted), cancellation_pending; 400 parameter_invalid (payer/payee/currency/fund flow cannot change: create a new mandate); 422 mandate_invalid, compliance_blocked, override_out_of_bounds, reschedule_notice_too_short (+ collection, earliest_debit_on: a debit may move earlier only with ≥ 7 days' notice from acceptance).

Record and events

mandate.version_created, mandate.amendment_proposed · Events: mandate.amendment_proposed.

Notes

in awaiting_acceptance the new version supersedes the unaccepted one (acceptances reset, parties re-invited). Otherwise both parties accept in the portal — a reschedule version needs only the payer's one-click confirmation (consent reschedule_ack; the payee is notified). At acceptance the version is re-validated against the live state; a stale version is withdrawn automatically (withdrawn_reason: amendment_stale, recorded mandate.amendment_stale) and the tenant re-proposes. A pending amendment never affects the gate. Rescheduling or skipping a collection is an amendment (the payer agreed to the schedule); there is no "skip" endpoint. Tenant controls are never amended here (POST /mandates/:id/controls).

POST/mandates/:id/amendments/:versionId/withdraw

Credential
Member session or API key
Permission
mandates.amend
API key scope
mandates:write
Mode
scoped
Idempotency
honoured

Request

reason string optional (≤ 500).

Response

200 MandateVersion (status: withdrawn). Withdrawing a cancellation version withdraws the cancellation request.

Errors

409 invalid_state_transition (not proposed, or it is the initial version: discard or cancel instead, or a dispute_settlement version: withdraw the proposal instead).

Record and events

mandate.amendment_withdrawn · Events: mandate.updated.

POST/mandates/:id/controls

Credential
Member session
Permission
mandates.controls (owner, admin; API scope: none: tenant controls are a member decision)
Mode
scoped

Request

gate object required: keys ∈ payee_bank_cooling, new_payee_hold, dual_approval_above, counterparty_cumulative_cap, duplicate_check, operator_approval, out_of_pattern_amount (P1); values are the settings shapes ( wire); reason string (10–1000; required when weakening or switching a control off); expected_version integer required (the current controls version_no).

Response

200 {"object": "controls_change_result", "applied": true, "mandate": Mandate, "controls_version": ControlsVersion, "change_request": null}, or 202 with "applied": false, "mandate": null, "controls_version": ControlsVersion (status proposed), "change_request": ChangeRequest (kind: mandate_controls) when weakening on a live-enabled tenant.

Errors

400 reason_required, parameter_invalid; 409 invalid_state_transition (draft or terminal mandate), settings_version_conflict (+ current_version), change_request_pending.

Record and events

mandate.controls_changed (fromVersion, toVersion, controlsHash, changeClass; or settings.change_requested + change_request.opened) · Events: mandate.controls_changed. - Notes: creates a CONTROLS version, never a terms version; the parties' accepted terms_hash never changes. Strengthening applies at once and re-evaluates every non-terminal release; overrides whose inputs changed are invalidated. Parties are notified (and see controls) only when settings.portal.show_control_details_to_parties is true. Party terms (C7–C10, C14) change only by amendment.

POST/mandates/:id/controls/preview

Credential
Member session
Permission
mandates.controls
Mode
scoped
Idempotency
not stored (read-only)

Request

gate object required (as POST /mandates/:id/controls).

Response

200 {"object": "controls_preview", "valid": true, "errors": [], "change_class": "weakening", "diff": [ …SettingsDiffEntry ], "requires_second_member": true, "sole_approver": false, "reason_required": true, "affected_releases": 2} (nothing stored).

GET/mandates/:id/party-preview

Credential
Member session
Permission
mandates.read
Mode
scoped

Request

role required (payer, payee).

Response

200 PortalMandate exactly as that party would see it now (party-safe fields, party labels, tenant branding, rules.in_words, required_now), with every next_actions[].allowed: false (blocked_reason: "party_action"). No grant is used and nothing is recorded (support and "what will my customer see"; works on drafts too).

GET/mandates/:id/versions/:versionId/party-view

Credential
Member session
Permission
mandates.read
Mode
scoped

Request

role required (payer, payee).

Response

200 PortalTermsVersion (the terms, plain-words changes and rules, refund plan, contract documents and required consent texts that party sees).

POST/mandates/:id/compliance/acknowledge

Credential
Member session or API key
Permission
mandates.send
API key scope
mandates:write
Mode
scoped
Idempotency
honoured

Request

pack string required (e.g. ca_bp_7159_5).

Response

200 Mandate (compliance.packs[].acknowledged_by/_at set).

Errors

409 invalid_state_transition (no warn results to acknowledge, or not draft/pending version).

Record and events

mandate.compliance_acknowledged.

POST/mandates/:id/compliance/exemptions

Credential
Member session or API key
Permission
mandates.send
API key scope
mandates:write
Mode
scoped
Idempotency
honoured, recommended

Request

pack string required; rule string optional (deposit_cap, payment_ahead_of_work; null = whole pack); kind string required (bonded_contractor, joint_control); reason string required (20–1000); document string required (evd_ id uploaded with POST /mandates/:id/documents, purpose: compliance_exemption).

Response

200 Mandate (exempt results report exempt).

Errors

404 (document); 409 invalid_state_transition (only in draft; afterwards use an amendment with compliance_exemptions).

Record and events

mandate.compliance_exemption_recorded (documentSha256) · Events: mandate.updated.

POST/mandates/:id/documents

Credential
Member session or API key
Permission
evidence.upload
API key scope
evidence:write
Mode
scoped
Idempotency
honoured

Request

multipart/form-data with ONE file; purpose (contract, compliance_exemption, cancellation, other); label string (1–120; required for contract); type (evidence type; default contract for contract documents, else document); note optional (≤ 1000).

Response

201 Evidence (stage: null, status: submitted).

Errors

upload errors; 409 invalid_state_transition (terminal mandate; contract documents only while draft — afterwards they enter the terms through an amendment's contract_documents).

Record and events

evidence.uploaded · Events: evidence.uploaded.

Notes

every non-withdrawn contract document of a draft is listed in the terms at send (contract_documents) and offered to the parties for download before the consents.

GET/mandates/:id/documents

Credential
Member session or API key
Permission
evidence.read
API key scope
evidence:read
Mode
scoped
Pagination
cursor

Request

purpose (multi).

Response

200 ListResponse<Evidence> (non-stage documents of the mandate, including contract, cancellation and dispute documents).

POST/mandates/:id/cancel

Credential
Member session or API key
Permission
mandates.cancel; basis external_outcome needs disputes.record_external_outcome
API key scope
mandates:write, basis before_collection only
Mode
scoped
Step-up
live for external_outcome and default_rule

Request

basis string required (before_collection, mutual_agreement, external_outcome, default_rule); reason string required (10–1000); with mutual_agreement: settlement_releases optional [{stage: "stg_…", amount}] (pay the payee for work done) and remainder (release_to_payee · refund_whole_and_recollect · hold_until_agreement; required when the plan strands money); with external_outcome: dispute (dsp_, an OPEN dispute of this mandate) and external_outcome {forum, decided_on (date), summary (20–2000), document (evd_, uploaded with purpose: cancellation)}.

Response

before_collection: 200 {"object": "cancellation_result", "mandate": Mandate (cancelled), "version": null, "refund_plan": null} — one CAS that requires that no collection was ever attempted; mutual_agreement: 202 with version = a MandateVersion (kind: cancellation, proposed: every future item voided, the refund plan, the settlement releases and the remainder fate) and its refund_plan; both parties accept it in the portal like an amendment; external_outcome and default_rule (only in defaulted, and only when the terms say tenant_may_cancel_with_refund): 202 with mandate.cancellation.confirmation.status: awaiting_confirmation and the refund_plan that would execute; a DIFFERENT member confirms (POST /mandates/:id/cancellation/confirm); both parties are then emailed and execution starts after the terms' external_outcome_notice_hours unless both accept earlier in the portal.

Errors

403 insufficient_scope (API key with another basis), insufficient_permission; 409 invalid_state_transition (basis not valid in the current state), collection_in_flight (before_collection lost the race to a collection attempt: use mutual_agreement), open_dispute_required, amendment_pending, cancellation_pending, outcome_not_feasible (settlement releases above what the stage can pay); 422 remainder_required (+ stranded_amount), forum_not_in_terms (+ allowed_forums), default_rule_not_in_terms; 404 (document, dispute).

Record and events

mandate.cancellation_requested; then mandate.cancelling + collection.cancelled ×n + mandate.cancelled (before collection), or mandate.version_created + mandate.amendment_proposed (mutual), or nothing further until confirmation (external outcome / default rule) · Events: mandate.cancellation_requested, mandate.cancelled (when final).

Notes

released money is never clawed back by cancellation; recovering it needs a transfer reversal with a basis. Execution order per (attempts in creating resolved first, processing debits cancelled or refunded after success, settlement releases through the gate's system checks and the tenant controls, refunds, the remainder's fate). The recorder of an external_outcome or default_rule basis is excluded from the approvals of the releases it creates.

POST/mandates/:id/cancellation/confirm

Credential
Member session
Permission
mandates.confirm_cancellation (owner, admin, finance; API scope: none)
Mode
scoped
Step-up
live

Request

note string optional (≤ 1000).

Response

200 Mandate (cancellation.confirmation.status: confirmed, notice_sent_at, execute_after set).

Errors

409 same_member_not_allowed (the recorder), approver_cooling (+ available_at), invalid_state_transition (nothing awaits confirmation, or it expired after 7 days).

Record and events

mandate.cancellation_confirmed · Events: mandate.updated. - Notes: both parties are emailed (forum or default rule, decision date, the outcome in plain words, the document's, the date it takes effect) and see it in the portal; at execute_after the mandate moves to cancelling (a notice, not a veto). The confirmer is excluded from the approvals of the releases it creates.

POST/mandates/:id/cancellation/reject

Credential
Member session
Permission
mandates.confirm_cancellation
Mode
scoped
Step-up
live
Idempotency
honoured

Request

reason string required (10–1000).

Response

200 Mandate (cancellation.confirmation.status: rejected; the mandate continues as before).

Errors

409 same_member_not_allowed, invalid_state_transition.

Record and events

mandate.cancellation_rejected · Events: mandate.updated.

GET/mandates/:id/refund-plan

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Request

scenario required (cancel, outcome); for outcome: stage (stg_), release_amount, refund_amount (integers); optional settlement_releases (JSON-encoded [{stage, amount}], cancel only).

Response

200 RefundPlan (preview; nothing stored): feasibility, stranded amount, fee cost and executable alternatives.

GET/mandates/:id/timeline

Credential
Member session or API key
Permission
record.read
API key scope
record:read
Mode
scoped
Pagination
cursor (`rec_` ids; `order=asc|desc`, default `asc`)

Request

type_prefix (e.g. release.), actor_type, occurred[gte|lte].

Response

200 ListResponse<TimelineItem> (this mandate's record entries).

Mandates · Holdyn Business docs