Topolo Docs Topolo Platform
Open workspace

Export reviewed DOCX

Generate a reviewed DOCX with tracked changes from resolved findings while preserving the original source.

Generate a reviewed DOCX with tracked changes from resolved findings while preserving the original source.

Access

Requires app_topolo_contracts.workspace:read and the intended authenticated organization and workspace. Select the permitted workspace through the supported resource-binding flow; do not add a workspace id to strict action input. Honor the action’s explicit confirmation requirement, including for a GET export. Any required JSON confirmation value is separate from transport/client confirmation.

Steps

  1. Read the current review and resolve every pending finding through authorized version-checked decisions.
  2. Check the retained source and chosen wording; an approved workflow decision is not itself required by this export handler.
  3. Export and inspect the decoded DOCX tracked changes before using it outside the review workflow.

Identifiers

  • Discover reviewId from reviews.list or a completed intake; changes use source paragraph and evidence anchors from that exact review.

Request

GET /api/reviews/{reviewId}/export

Action: app_topolo_contracts.reviews.export.

  • reviewId: required, string, at least 1 characters, at most 160 characters.

Response and effects

  • Reads the protected original, collects accepted finding replacements and generates a new DOCX with tracked revisions. Captured playbook selection takes precedence over reviewer amendment, then suggested text.
  • Does not overwrite the original, sign an agreement or record approval. The returned filename is reviewId-reviewed.docx; no output digest is returned by this route.
  • The complete base64 example illustrates a synthetic DOCX response carrier, not predicted byte-identical output of the unrun exporter. ZIP/XML serialization and tracked-change author/timestamps can differ.
  • Pending decisions, changed/ambiguous anchors, complex unsupported paragraphs or missing settings refuse export rather than silently omitting changes. GET still has catalogue confirmation requirements.

Examples

Example request and response

Request input:

{
  "reviewId": "11111111-1111-4111-8111-111111111111"
}

Illustrated response:

{
  "filename": "11111111-1111-4111-8111-111111111111-reviewed.docx",
  "docxBase64": "UEsDBBQAAAAIAAAAVV09TZnn7QAAAB8CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbK2Ru07DMBSGX8XyWiVOGRBCSTpQGIGhPIBlnyQWvsnntJS356S3ARVYGO3/8v2y29U+eLGDgi7FTi7rRgqIJlkXx06+bZ6qO7nq281nBhRsjdjJiSjfK4VmgqCxThkiK0MqQRMfy6iyNu96BHXTNLfKpEgQqaK5Q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b6epLMC+w9W9/gVQSwMEFAAAAAgAAABVXcALnlF/AAAAmQAAABEAAAB3b3JkL3NldHRpbmdzLnhtbEWNSw7CIBCGr9Kwt4MujCFAdx7A6AEIHVtiGQhDiseXrlz+z09P37gNOxYOiYw4j1IMSD7NgRYjXs/76SYmq5tirLV7PPQ+sWpGrLVmBcB+xeh4TBmpZ+9UoqtdlgVaKnMuySNzn8YNLlJeIbpA4risxfnPA/dwsBmshj/G/gBQSwECFAMUAAAACAAAAFVdPU2Z5+0AAAAfAgAAEwAAAAAAAAAAAAAAgAEAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQIUAxQAAAAIAAAAVV1fM5VSlQAAAAcBAAALAAAAAAAAAAAAAACAAR4BAABfcmVscy8ucmVsc1BLAQIUAxQAAAAIAAAAVV2OtlKfGQEAALMBAAARAAAAAAAAAAAAAACAAdwBAAB3b3JkL2RvY3VtZW50LnhtbFBLAQIUAxQAAAAIAAAAVV1wO0JYlAAAAAMBAAAcAAAAAAAAAAAAAACAASQDAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzUEsBAhQDFAAAAAgAAABVXcALnlF/AAAAmQAAABEAAAAAAAAAAAAAAIAB8gMAAHdvcmQvc2V0dGluZ3MueG1sUEsFBgAAAAAFAAUAQgEAAKAEAAAAAA=="
}

HTTP 200 illustration. Hypothetical authorized operation only; inspect the action-specific fields and boundaries below.

Refusal or dependency failure

If: The review and retained document are present, but at least one returned finding still has resolution pending. The export handler refuses before generating a document.

Request input:

{
  "reviewId": "11111111-1111-4111-8111-111111111111"
}

Source error-code excerpt (HTTP 409):

{
  "error": "finding_decision_required"
}

Resolve all pending findings before export; do not skip them.

Refusal or dependency failure

If: The review and document metadata exist, the document-storage binding is configured and all finding decisions are resolved, but reading the referenced source object raises contract_document_missing. The export route maps that missing-object error to HTTP 503.

Request input:

{
  "reviewId": "11111111-1111-4111-8111-111111111111"
}

Source error-code excerpt (HTTP 503):

{
  "error": "contract_document_missing"
}

Reconcile the protected original with its existing source owner.

Verification readback illustration

Request input:

{
  "reviewId": "11111111-1111-4111-8111-111111111111"
}

Illustrated response:

{
  "filename": "11111111-1111-4111-8111-111111111111-reviewed.docx",
  "docxBase64": "UEsDBBQAAAAIAAAAVV09TZnn7QAAAB8CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbK2Ru07DMBSGX8XyWiVOGRBCSTpQGIGhPIBlnyQWvsnntJS356S3ARVYGO3/8v2y29U+eLGDgi7FTi7rRgqIJlkXx06+bZ6qO7nq281nBhRsjdjJiSjfK4VmgqCxThkiK0MqQRMfy6iyNu96BHXTNLfKpEgQqaK5Q/btGga99SQe93x9xBbwKMXD0TizOqlz9s5oYl3tov1GqU6EmpMHD04u44INUl0lzMrPgFPuhd+hOAviVRd61oFd6iMVq2wy28DJ+veaKzvTMDgDl/zclksygMgPHHx9UYJ2cfHXDgQizuH/7zg3nyeow4/3X1BLAwQUAAAACAAAAFVdXzOVUpUAAAAHAQAACwAAAF9yZWxzLy5yZWxzjc87DsIwDAbgq0Q+QJ0yMKCmXVi6Ii4QJW5T0TzkhNftycBAEQOjf//6LHfDw6/iRpyXGBS0jYSh70606lKD7JaURW2ErMCVkg6I2TjyOjcxUaibKbLXpY48Y9LmomfCnZR75E8DtqYYrQIebQvi/Ez0jx2naTF0jObqKZQfJ74aVdY8U1Fwj2zRvuOmsoB9h5sX+xdQSwMEFAAAAAgAAABVXY62Up8ZAQAAswEAABEAAAB3b3JkL2RvY3VtZW50LnhtbEVRy04DMQz8FWvPdFM4IFT1IZBA4oZE+QCTuJuoeSn2dtu/J9kVcJnI49GM7WwP1+DhQoVdirvuvl93QFEn4+Kw676Ob6un7rDfThuT9BgoClR95M2066xI3ijF2lJA7lOmWHunVAJKLcugplRMLkkTc7ULXj2s148qoItds/xO5tbe3KA0kP3nLYolcRp+A1HqZMCZtKslVH94vWLInuDZZ4uA0fwxLyTYw9E6hhazahGQseBQMFswFFJkKSjEwGksmqCQ1JSW0YwQ7BgwV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illustrative readback only; no request was executed.

Verify the result

  • Decode and inspect the downloaded file, compare original wording and chosen tracked changes, and retain the original source hash separately. Do not label export as signed or approved by itself.

Recovery

  • 409 finding_decision_required: Resolve all pending findings before export; do not skip them.
  • 409 source_anchor_changed: Re-read the exact source/review and escalate the mismatch; do not patch unrelated text.
  • 409 source_anchor_conflict: Resolve overlapping source anchors instead of forcing replacement.
  • 503 contract_document_missing: Reconcile the protected original with its existing source owner.
  • 401 authentication_required: Outer authentication/authorization contract: Authenticate again or provide a valid Topolo API key. Reconcile uncertain earlier write effects before any retry.
  • 403 permission_denied: Outer authentication/authorization contract: Grant the credential permission workspace:read and the required resource binding. Reconcile uncertain earlier write effects before any retry.
  • 429 rate_limited: Outer authentication/authorization contract: Wait for Retry-After when present, then retry without parallel duplicate calls. Reconcile uncertain earlier write effects before any retry.

Read-only document generation. Correct the underlying review/anchor issue through the normal versioned workflow, then request another export; do not mutate the retained original or represent a failed export as successful.

Source and example limits — 21 October 2026: based on reviewed Contracts source 4bfd49a; current serving association is unverified. All requests, responses, approvals and document specimens shown are fictional and unrun. Offline schema/ZIP/XML checks do not prove application acceptance, legal completeness, provider outcomes or human approval.