# Prepare an M&A Due-Diligence / Quality-Of-Earnings Report

> Builds a quality-of-earnings and due diligence report on a target business from data-room files. Send clientid for the acquirer and targetentity for the…

POST /api/v1/skills/reports.due-diligence.prepare/invoke

Builds a quality-of-earnings and due diligence report on a target business from data-room files. Send client_id for the acquirer and target_entity for the business being bought; the deal type, sections and period have defaults. The answer holds normalised EBITDA, a working-capital peg, debt-like items, red flags and a download link, and any figure not yet calculated is named in stub_fields.

Body parameters

client_id string · uuid Required

UUID of the acquiring entity.

target_entity string Required

Legal name of the business being bought or invested in.

deal_type enum · default acquisition

Kind of deal: acquisition, merger or investment; acquisition when omitted.

acquisition merger investment

file_ids array of strings

UUIDs of data-room files to review; only the first 5 are read.

sections array of enum

Sections to build, any of qoe, working_capital, debt_like, tax_exposures, customer_concentration, revenue_quality, key_dependencies and red_flags; the first five of those by default.

qoe working_capital debt_like tax_exposures customer_concentration revenue_quality key_dependencies red_flags

period string

Review period as an ISO 8601 range such as 2025-10-01/2026-09-30; the last twelve months when omitted.

Returns

Skill executed successfully

skill string Required

Example prepare_due_diligence_report

output object Required

output.artifact_id string · uuid

output.download_url string · default

output.summary string · default

output.citations array of values

output.warnings array of strings

output.stub_fields array of strings

output.target_entity string · default

output.normalised_ebitda number or string · default 0

output.working_capital_peg number or string · default 0

output.debt_like_items array of objects

output.red_flags array of values

output.sections_built array of strings

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Prepare a CFO/board Pack](https://heyarchie.com/en-gb/developers/api-reference/reports/prepare-a-cfo-board-pack/)[Next Generate a Financial Report →](https://heyarchie.com/en-gb/developers/api-reference/reports/generate-a-financial-report/)

```
curl https://uk.heyarchie.com/api/v1/skills/reports.due-diligence.prepare/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "client_id": "00000000-0000-0000-0000-000000000000",
       "target_entity": "string",
       "deal_type": "acquisition",
       "file_ids": [
         "00000000-0000-0000-0000-000000000000"
       ],
       "sections": [
         "qoe"
       ],
       "period": null
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "reports.due-diligence.prepare",
    client_id="00000000-0000-0000-0000-000000000000",
    target_entity="string",
    deal_type="acquisition",
    file_ids=["00000000-0000-0000-0000-000000000000"],
    sections=["qoe"],
    period=None,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("reports.due-diligence.prepare", {
  "client_id": "00000000-0000-0000-0000-000000000000",
  "target_entity": "string",
  "deal_type": "acquisition",
  "file_ids": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "sections": [
    "qoe"
  ],
  "period": null
});
console.log(result);
```

Response

```
{
  "skill": "prepare_due_diligence_report",
  "output": {
    "artifact_id": "0495af80-c3b7-4b38-b640-d9a1344a202f",
    "debt_like_items": [
      {
        "amount": 275000,
        "item": "Deferred consideration on a 2024 acquisition"
      },
      {
        "amount": 48000,
        "item": "Accrued holiday pay"
      }
    ],
    "download_url": "https://files.example.com/due-diligence/0495af80-c3b7-4b38-b640-d9a1344a202f.docx",
    "normalised_ebitda": 1840000,
    "red_flags": [
      {
        "amount_at_risk": 755000,
        "classification": "revenue_concentration",
        "description": "The largest customer is 41% of revenue and its contract ends in March 2027.",
        "evidence": [
          "Customer revenue schedule, year to 30 September 2026"
        ],
        "flag_id": "rf-001",
        "recommended_action": "Seek a contract extension or a price adjustment before completion.",
        "severity": "SIGNIFICANT"
      }
    ],
    "sections_built": [
      "qoe",
      "working_capital",
      "debt_like",
      "red_flags"
    ],
    "stub_fields": [],
    "summary": "Bluebell Packaging Ltd has normalised EBITDA of £1.84m and one significant red flag.",
    "target_entity": "Bluebell Packaging Ltd",
    "warnings": [],
    "working_capital_peg": 620000
  },
  "correlation_id": "<string>"
}
```

```
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
