---
title: "Ai Review"
method: POST
path: "/companies/{company_id}/ar/invoices/{invoice_id}/ai-review"
tags: ["ar-invoices"]
---

# Ai Review

`POST /companies/{company_id}/ar/invoices/{invoice_id}/ai-review`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/companies/{company_id}/ar/invoices/{invoice_id}/ai-review`
- Auth: none declared

Advisory AI readiness review of a **draft** invoice (drafts only → 422).

Explains the deterministic readiness issues in the invoice's language and
proposes fixes grounded in the company's own accounts / VAT codes / issuer
profiles (``invoiage_core.ar.ai_review``). Advisory only — the deterministic
gate stays the sole issue authority; a gateway outage degrades to
``available=false`` with the deterministic issues echoed (still 200).
Read-only, so no ``_tx``.

## Path parameters

- `company_id` string, required
- `invoice_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- AiReviewOut: Advisory review; ``issues`` echoes the deterministic ground truth. ``available=False`` == LLM gateway unreachable — deterministic issues only.
  - `available` boolean, required
  - `summary` string, nullable
  - `explanations` AiReviewExplanationOut[]
    - `code` string, required
    - `explanation` string, required
  - `fixes` AiReviewFixOut[]
    - `issue_code` string, required
    - `action` string, required
    - `kind` string, required
    - `account_code` string, nullable
    - `vat_code_id` string, nullable
    - `issuer_profile_id` string, nullable
  - `concerns` AiReviewConcernOut[]
    - `code` string, required
    - `message` string, required
  - `issues` ReadinessIssueOut[]
    - `code` string, required
    - `message` string, required
    - `severity` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
