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

# Brokered Tax Invoice Issuance

> Issue an electronic tax invoice through a trustee acting on behalf of the supplier.

Brokered issuance includes trustee information alongside the supplier and supplied party.

## Workflow

<Steps>
  <Step title="Register the trustee as an issuer" icon="code">
    Send the trustee's information to the [Register Issuer API](/api-reference/issuer/register-issuer). Save the returned `issuerId`.

    ```bash theme={"dark"}
    curl -X POST https://xapi.bolta.io/v1/issuers \
      -H "Authorization: Basic {apiKey}" \
      -H "Content-Type: application/json" \
      -d '{
        "identificationNumber": "5648102684",
        "taxRegistrationId": null,
        "organizationName": "Trustee Company",
        "representativeName": "Trustee Representative"
      }'
    ```
  </Step>

  <Step title="Register the trustee certificate" icon="shield-check">
    Call `GET /v1/issuers/{issuerId}/certificates/url` to obtain a registration URL. After the trustee registers its certificate, check the result with the [Retrieve Issuer Certificate Registration Status API](/api-reference/certificate/retrieve-issuer-certificate-registration-status).
  </Step>

  <Step title="Issue the brokered tax invoice" icon="code">
    Send `supplier`, `supplied`, and `trustee` to the [Issue Tax Invoice API](/api-reference/tax-invoice/issue-tax-invoice).
  </Step>

  <Step title="Check the result" icon="circle-check">
    Receive the completion event by webhook or call the [Retrieve Tax Invoice API](/api-reference/tax-invoice/retrieve-tax-invoice). Trustee information is in `invoice.trustee`, and manager information is in `invoice.trustee.manager`.
  </Step>
</Steps>

## Issuance request

```bash theme={"dark"}
curl -X POST https://xapi.bolta.io/v1/taxInvoices/issue \
  -H "Authorization: Basic {apiKey}" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "YYYY-MM-DD",
    "purpose": "CLAIM",
    "taxType": "TAXABLE",
    "supplier": {
      "identificationNumber": "1234567891",
      "organizationName": "Principal Company",
      "representativeName": "Principal Representative",
      "manager": {
        "email": "supplier@example.com",
        "name": "Principal Manager"
      }
    },
    "supplied": {
      "identificationNumber": "0987654323",
      "organizationName": "Recipient Company",
      "representativeName": "Recipient Representative",
      "managers": [
        {
          "email": "recipient@example.com",
          "name": "Recipient Manager"
        }
      ]
    },
    "trustee": {
      "identificationNumber": "5648102684",
      "organizationName": "Trustee Company",
      "representativeName": "Trustee Representative",
      "manager": {
        "email": "trustee@example.com",
        "name": "Trustee Manager",
        "telephone": "010-1234-5678"
      }
    },
    "items": [
      {
        "date": "YYYY-MM-DD",
        "name": "Taxable brokered item",
        "supplyCost": 100000,
        "tax": 10000
      }
    ]
  }'
```

### Trustee fields

| Field                  | Required | Description                          |
| ---------------------- | -------- | ------------------------------------ |
| `identificationNumber` | Yes      | Trustee business registration number |
| `organizationName`     | Yes      | Trustee organization name            |
| `representativeName`   | Yes      | Trustee representative name          |
| `taxRegistrationId`    | No       | Trustee sub-business place code      |
| `address`              | No       | Trustee address                      |
| `businessItem`         | No       | Trustee business item                |
| `businessType`         | No       | Trustee business type                |
| `manager`              | No       | Trustee manager                      |

`manager` supports `email`, `name`, and `telephone`. If you include `manager`, set at least one of these fields.

### Tax by tax type

Brokered issuance follows the same tax rules as regular direct issuance.

| Tax type (`taxType`) | Item tax (`items[].tax`) | Example                           |
| -------------------- | ------------------------ | --------------------------------- |
| `TAXABLE`            | A non-null tax amount    | Supply cost `100000`, tax `10000` |
| `ZERO_RATE`          | `0`                      | Supply cost `100000`, tax `0`     |
| `TAX_FREE`           | `null` or omitted        | Supply cost `100000`, tax `null`  |

For complete requests, select `Brokered taxable`, `Brokered zero-rate`, or `Brokered tax-free` from the menu at the top of the code example panel in the [Issue Tax Invoice API](/api-reference/tax-invoice/issue-tax-invoice). On narrower screens, the code example panel appears below the main content.

## Related documents

* [Register Issuer API](/api-reference/issuer/register-issuer)
* [Certificate Registration Integration](/en/api-introduction/certificate-registration)
* [Issuance Amount Calculation](/en/api-introduction/issuance-guide)
* [Tax Invoice Webhooks](/en/api-introduction/webhook-tax-invoice)
