> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bolta.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Email-Approved Reverse Issuance

> A workflow where, after a reverse issuance request, the supplier approves via an email link.

When the platform requests reverse issuance, Bolta automatically sends an approval-request email to the supplier's manager email address, and the supplier approves through the email link.

## Workflow

<Steps>
  <Step title="Register the issuer" icon="code">
    Call the [Register Issuer API](/en/api-reference/issuer/register-issuer) to register the supplier as an issuer.
  </Step>

  <Step title="Request reverse issuance" icon="code">
    Call the [Request Reverse Issuance API](/en/api-reference/reverse-issuance/request-reverse-issuance). Set the approval email recipient in `supplier.manager.email` in the request body.
  </Step>

  <Step title="Send the approval-request email" icon="mail">
    Bolta sends the approval-request email.
  </Step>

  <Step title="Supplier approval" icon="user-check">
    The supplier accesses Bolta through the email link and approves the tax invoice.
  </Step>

  <Step title="Receive the issuance-complete webhook" icon="zap">
    Once approval is complete, Bolta sends a [webhook](/en/docs/api-introduction/webhook-tax-invoice) notification containing `taxInvoiceUrl`.
  </Step>

  <Step title="Retrieve the tax invoice (optional)" icon="search">
    Check the issuance result with the [Retrieve Tax Invoice API](/en/api-reference/tax-invoice-retrieval/retrieve-tax-invoice).
  </Step>
</Steps>

## Handling duplicate requests

You can include the optional `Bolta-Client-Reference-Id` header in a reverse issuance request. Enter a non-blank value between 1 and 255 characters, and use a new value for each issuance request.

If the same API key reuses a value, the API returns HTTP `400` with `INVALID_REQUEST`, even when the request body is identical. If you do not receive a response, do not submit the reverse issuance request again. Check whether it was accepted with the [client reference status API](/en/api-reference/tax-invoice-retrieval/retrieve-tax-invoice-by-client-reference). See the [Authentication guide](/en/docs/api-introduction/authentication#client-reference-id) for the reuse rules.

## Checking request status

Call the [Retrieve Reverse Issuance Request Status API](/en/api-reference/reverse-issuance/retrieve-reverse-issuance-request-status) to see which stage a reverse issuance request is in.

| `status`    | Meaning                                                                               |
| ----------- | ------------------------------------------------------------------------------------- |
| `REQUESTED` | Accepted and waiting for supplier approval, including before delivery to the supplier |
| `APPROVED`  | Approved by the supplier, being sent to the NTS                                       |
| `ISSUED`    | Issued                                                                                |
| `REJECTED`  | Rejected by the supplier                                                              |
| `CANCELED`  | Request canceled                                                                      |
| `EXPIRED`   | Approval deadline (`approvalDueDate`) passed                                          |
| `FAILED`    | Submission or issuance failed                                                         |

For `FAILED`, check `failure.stage`. `SUBMISSION` means the request never reached the supplier. Send a new request, and if you use `Bolta-Client-Reference-Id`, set a value you have not used before. `ISSUANCE` means the supplier approved but issuance failed, so check `failure.code` and `failure.message` for the cause.

## Canceling a reverse issuance request

Before approval, you can cancel the reverse issuance request by calling the [Cancel Reverse Issuance Request API](/en/api-reference/reverse-issuance/cancel-reverse-issuance-request).

* On a successful cancellation, the API returns HTTP 200.
* If the request has already been approved, canceled, or issued, the API returns an error. To check the status before canceling, call the [Retrieve Reverse Issuance Request Status API](/en/api-reference/reverse-issuance/retrieve-reverse-issuance-request-status).

<Warning>
  The supplier cannot approve after the issuance deadline. Update the date and submit the request again. Check the deadline with the [Tax Invoice Issuance Deadline API](/en/docs/api-introduction/tax-invoice-issue-due-date) before sending the request.
</Warning>

## When this fits

* When it is difficult to obtain the supplier's certificate in advance
* When the supplier prefers to approve by email
* When the platform wants to delegate approval to Bolta rather than building its own approval UI

## Difference from simple-approval reverse issuance

|                      | Email approval                    | [Simple approval](/en/docs/api-introduction/usecase-reverse-simple) |
| -------------------- | --------------------------------- | ------------------------------------------------------------------- |
| Approval method      | Email link sent by Bolta          | Approval URL issued by the platform                                 |
| Certificate required | Not required                      | Required                                                            |
| Who approves         | Supplier, directly from the email | Supplier, within the platform                                       |
