> ## 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.

# Simple-Approval Reverse Issuance

> A reverse issuance workflow where the supplier approves directly within the platform through an approval URL.

After the platform requests reverse issuance, it obtains an approval URL and the supplier approves directly within the platform.

## 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. Save the returned `issuerId`.
  </Step>

  <Step title="Issue a certificate registration URL" icon="code">
    Use `issuerId` with the [Retrieve Issuer Certificate Registration URL API](/en/api-reference/certificate/retrieve-issuer-certificate-registration-url) to obtain a URL where the supplier can register their certificate.
  </Step>

  <Step title="Supplier registers the certificate" icon="user-check">
    The supplier accesses the issued URL and registers their certificate directly. For the redirect return and result verification after registration, see [Certificate Registration Integration](/en/docs/api-introduction/certificate-registration).
  </Step>

  <Step title="Request reverse issuance" icon="code">
    Call the [Request Reverse Issuance API](/en/api-reference/reverse-issuance/request-reverse-issuance).
  </Step>

  <Step title="Obtain the approval URL" icon="code">
    Call the [Retrieve Reverse Issuance Approval URL API](/en/api-reference/reverse-issuance/retrieve-reverse-issuance-approval-url) to obtain the approval page URL. The generated URL is valid for 10 minutes.
  </Step>

  <Step title="Simple approval" icon="user-check">
    The supplier accesses the approval URL and approves the tax invoice. Show the URL from the platform in a new tab or by navigating to the page.
  </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>
  After the issuance deadline, the API returns a 400 error when you retrieve the approval URL. 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 you want to complete the approval process within the platform's UX
* When the supplier has already registered a certificate
* When you need to track the approval status within the platform

## Difference from email-approved reverse issuance

|                      | [Email approval](/en/docs/api-introduction/usecase-reverse-email) | Simple approval                     |
| -------------------- | ----------------------------------------------------------------- | ----------------------------------- |
| Approval method      | Email link sent by Bolta                                          | Approval URL issued by the platform |
| Certificate required | Not required                                                      | Required                            |
| UX control           | Delegated to Bolta                                                | Controlled directly by the platform |
| URL validity         | -                                                                 | 10 minutes                          |
