FruxonDocs
ApiKnowledge bases

Corrects the merge the consolidator drafted for one cluster, before it is merged.

Says what is wrong with the draft; the base's editor agent rewrites it and the rewrite becomes the cluster's newest proposal, which is what `:approve` writes. Synchronous, like correcting an article: the response says whether the editor APPLIED the correction (with the run carrying the corrected draft), DECLINED it (it would have had to invent a fact — the reason says what it needs), or FAILED. Nothing is written to a document either way. Refused with 400 when the cluster has no drafted merge, or the base has no editor agent.

POST
/v1/tenants/{tenant}/knowledgeBases/{knowledgeBase}/consolidations/{consolidation}:correct
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

knowledgeBase*string

The knowledge base id.

Formatuuid
consolidation*string

The report-only run the cluster belongs to.

Formatuuid
tenant*string

The tenant identifier

The cluster, the report version it was read from, and what is wrong with the draft.

clusterId?string

The cluster of the report whose drafted merge is being corrected.

Formatuuid
expectedReportVersion?integer

The report version the caller read, as for :propose and :approve.

Formatint32
instruction?string

What is wrong with the draft, in the person's own words — "keep the section on unsigned contracts", "orders go by e-mail only". The editor applies it rather than inferring it, and declines when it would have to invent a fact to do so.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/consolidations/497f6eca-6276-4993-bfeb-53cbbbba6f08:correct" \  -H "Content-Type: application/json" \  -d '{}'
{
  "outcome": "APPLIED",
  "reason": "string",
  "executionRecordId": "00000000-0000-0000-0000-000000000000",
  "run": {
    "id": "00000000-0000-0000-0000-000000000000",
    "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
    "status": "QUEUED",
    "trigger": "MANUAL",
    "consolidationPolicyVersion": 0,
    "consolidationCadence": "MANUAL",
    "consolidationMode": "REPORT_ONLY",
    "requestedBy": "string",
    "reportOnly": false,
    "reportOnlyReason": "string",
    "similarityThreshold": 0,
    "maxClusterSize": 0,
    "recentWriteWindowMinutes": 0,
    "basedOnRunId": "00000000-0000-0000-0000-000000000000",
    "clusterIds": [
      "00000000-0000-0000-0000-000000000000"
    ],
    "reviewerNote": "string",
    "startedAt": 0,
    "completedAt": 0,
    "error": "string",
    "report": {
      "version": 0,
      "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
      "reportOnly": false,
      "consolidatorAgentId": "string",
      "similarityThreshold": 0,
      "maxClusterSize": 0,
      "recentWriteWindowMinutes": 0,
      "documentsConsidered": 0,
      "documentsSkippedAsRecentlyModified": 0,
      "embeddingsComputed": 0,
      "embeddingsReused": 0,
      "embeddingTokens": 0,
      "embeddingModel": "string",
      "clusters": [],
      "repeatedFacts": [],
      "sectionsCompared": 0,
      "repeatedFactsSkippedReason": "string",
      "openingBoilerplate": [
        "string"
      ],
      "clustersFound": 0,
      "clustersMerged": 0,
      "clustersKeptSeparate": 0,
      "clustersFailed": 0,
      "clustersProposed": 0,
      "clustersRelated": 0,
      "documentsArchived": 0
    },
    "createdAt": 0,
    "modifiedAt": 0
  }
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}