# Approve a draft invoice

`POST /lokta-lms/api/v1/draft-invoices/{id}/approval`

Approves a draft invoice, which creates the invoice and gives it an invoice number.

Mints the gap-free GST invoice number, creates the invoice already `approved` (GST from the partner's treatment at approval), links it to the draft and marks the accruals invoiced. Refused with `409 sourcing/draft_already_decided` once decided, and with `422 sourcing/checker_is_maker` when the caller produced the draft (never for a batch draft). Requires an `Idempotency-Key`.

## When to use it

Approve a draft once you have checked its evidence. Approval creates the invoice.

## Worth knowing
- The person who produced a draft cannot approve it: 422 sourcing/checker_is_maker. A draft produced by the monthly batch is never refused for this.
- A draft that was already decided returns 409 sourcing/draft_already_decided.
- Send an Idempotency-Key header.

## Parameters
- `id` (path, string, required)
- `Idempotency-Key` (header, string): Per-intent key

## Responses
- `default`: default response

## Example request (cURL)
```bash
curl -X POST \
  'https://default.lokta.tech/lokta-lms/api/v1/draft-invoices/{id}/approval' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

Interactive: https://developer.lokta.ai/reference#operation/approve
