## Check whether a draft invoice or credit note can be issued (tenant:trade:sales:read)

`GET /api/trade/v1/invoices/{id}/issue/preview`

Module: Trade · operationId: `previewInvoiceIssue` · Tag: Issued documents · Auth: access token (`Authorization: Bearer <accessToken>`)

Names in German what keeps the draft from being issued as XRechnung: the company profile (Einstellungen › Mandant
& Firmenprofil: address, VAT ID or tax number, IBAN, invoice contact, invoice e-mail), the customer's masterdata
address (postal address, e-mail for invoices) and the lines. The KoSIT rules run when it is issued.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Responses

- **200** Result (`application/json`)
- **401** No valid session or bearer token (no body).
- **404** Not found in the tenant. (`application/json`)
- **409** The document is no draft any more. (`application/json`)
- **502** A dependent service (DMS, masterdata, a distributor) failed or is unreachable. (`application/json`)

Fields of the 200 answer:

- `problems` (array of string, required)
- `ready` (boolean, required)

Example 200 answer:

```json
{
  "problems": [
    "Die Rechnungsadresse des Kunden hat keine Postleitzahl.",
    "Im Firmenprofil fehlt die Bankverbindung (IBAN)."
  ],
  "ready": false
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/trade/v1/invoices/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/issue/preview' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
