# Get an issuer's self-invoicing portal

`GET https://api.fiscalisto.com/v1/issuers/{id}/self_invoicing`

The issuer's self-invoicing portal: its address, until when a receipt can be invoiced and how the global invoice is put together.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const selfInvoicing = await fiscalisto.issuers.getSelfInvoicing("id");
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

self_invoicing = fiscalisto.issuers.get_self_invoicing("id")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$selfInvoicing = $fiscalisto->issuers->getSelfInvoicing('id');
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var selfInvoicing = await fiscalisto.Issuers.GetSelfInvoicingAsync("id");
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	selfInvoicing, err := client.Issuers.GetSelfInvoicing(ctx, "id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *selfInvoicing)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var selfInvoicing = fiscalisto.issuers().getSelfInvoicing("id");
System.out.println(selfInvoicing);
```

## Response 200

OK.

A `SelfInvoicing` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"self_invoicing"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer. |
| `portal_url` | string | yes | The issuer's permanent portal: there any buyer invoices with their code and total. |
| `window` | `month`, `days` | yes | month: it can be invoiced until the end of the sale's month. days: until window_days days after. |
| `window_days` | integer | yes | Days to invoice with window: days. (from -9007199254740991 to 9007199254740991) |
| `global_periodicity` | `01`, `02`, `03`, `04` | yes | How often the global invoice is stamped on its own with what nobody invoiced: 01 daily, 02 weekly, 03 biweekly, 04 monthly. |
| `global_invoice` | `auto`, `off` | yes | auto: tickets nobody invoiced go on their own to their period's global invoice. off: Fiscalisto doesn't make a global invoice for these tickets (you make it elsewhere). |
| `ask_total` | boolean | yes | Whether the portal asks for the total to find the ticket (true) or only its code (false). |
| `portal_title` | string or null | yes | The portal's title, or null for «Facture su ticket». |
| `portal_message` | string or null | yes | The message under the title, or null. |
| `code_hint` | string or null | yes | Where the buyer finds their code, under the field; null for Fiscalisto's text. |
| `portal_theme` | `auto`, `light`, `dark` | yes | auto: the theme of the buyer's device, which they can change. light or dark: always that one, on the portal page, its QRs and inside your site. |
| `portal_accent` | string or null | yes | The portal's button color («#rrggbb»), or null for Fiscalisto's. |
| `portal_radius` | integer or null | yes | The portal's corners in pixels (0 to 24), or null for Fiscalisto's. |
| `portal_style` | object | yes | How the portal looks besides its theme, color and corners (Autofactura › Cómo se ve el portal). |
| `portal_style.layout` | `checkout`, `compact`, `card` | yes | checkout: the invoice fills in next to the form. compact: only the form, the invoice collapsed. card: the form in a centered card. |
| `portal_style.density` | `comfortable`, `compact` | yes | comfortable or compact. |
| `portal_style.header` | `logo`, `name`, `name_rfc`, `logo_name` | yes | What the top says: name_rfc, name, logo_name or logo. |
| `portal_style.logo_size` | `s`, `m`, `l` | yes | The logo size: s, m or l. |
| `portal_style.logo_shape` | `square`, `rounded`, `circle` | yes | The logo shape: square, rounded or circle. |
| `portal_style.font` | string | yes | The font: system or one from Google Fonts. |
| `portal_style.heading_font` | string or null | yes | The headings font, or null for the same as the body text. |
| `portal_style.heading_size` | `s`, `m`, `l` | yes | The title size: s, m or l. |
| `portal_style.borders` | `none`, `subtle`, `strong` | yes | The borders: none, subtle or strong. |
| `portal_style.shadow` | `none`, `soft`, `strong` | yes | The shadow: none, soft or strong. |
| `portal_style.ways` | object | yes | The ways to give their details besides typing them. |
| `portal_style.ways.constancia` | boolean | yes | Upload the constancia (PDF). |
| `portal_style.ways.qr` | boolean | yes | Scan the constancia's QR. |
| `portal_style.ways.cif` | boolean | yes | Look up the details with RFC and idCIF. |
| `portal_style.ways.recall` | boolean | yes | «Ya le hemos facturado antes»: RFC and email. |
| `portal_style.ways.abroad` | boolean | yes | Invoice customers abroad. |
| `portal_style.ways.norfc` | boolean | yes | «No tengo RFC»: in the person's name, with XAXX010101000. |
| `portal_style.email_required` | boolean | yes | Whether invoicing without an email is not allowed. |
| `portal_style.show_deadline` | boolean | yes | Whether it says until when it can be invoiced. |
| `portal_style.back` | object or null | yes | The button at the end to go back to your site, or null. |
| `portal_style.back.label` | string | yes | The button's text. |
| `portal_style.back.url` | string | yes | Where it goes (https). |
| `portal_style.css` | string | yes | Your own CSS, already sanitized. |
| `portal_style.colors` | object | yes | The page colors; null uses the theme's. |
| `portal_style.colors.background` | string or null | yes | The page background, or null. |
| `portal_style.colors.card` | string or null | yes | The background of fields and cards, or null. |
| `portal_style.colors.text` | string or null | yes | The text, or null. |
| `portal_style.colors.button_text` | string or null | yes | The button text, or null. |
| `portal_style.noun` | `ticket`, `nota`, `cuenta`, `compra`, `pedido`, `orden`, `reservacion`, `estancia`, `boleto` | yes | What the portal calls what is invoiced («reservacion» in a hotel). |
| `portal_style.texts` | object | yes | Your own texts by key (step_ticket, submit, success_title, concepts_title…), each with es and en. A missing one uses Fiscalisto's. |
| `invoice_concepts` | object | yes | The line items of the invoice the buyer makes in the portal. |
| `invoice_concepts.mode` | `itemized`, `single`, `grouped` | yes | itemized: one line item per ticket line; single: just one; grouped: one per group in groups. Anything with another set of taxes (like a night with ISH) always goes in its own line item. |
| `invoice_concepts.customer_choice` | boolean | yes | Whether the buyer can choose in the portal among the customer_options. |
| `invoice_concepts.customer_options` | array of `itemized`, `single`, `grouped` | yes | The options the buyer sees when they can choose (always includes mode, which arrives selected). |
| `invoice_concepts.description` | string | yes | The single line item's description, like «Consumo». |
| `invoice_concepts.product_key` | string or null | yes | The single line item's ClaveProdServ, or null for the largest line's. |
| `invoice_concepts.unit_key` | string or null | yes | Its ClaveUnidad, or null for the largest line's. |
| `invoice_concepts.groups` | array of object | yes | The «Por categoría» groups, in order: each line goes in the first one that takes it. |
| `invoice_concepts.groups[].name` | string | yes | The line item's name, like «Alimentos y bebidas». |
| `invoice_concepts.groups[].product_key` | string or null | yes | Its ClaveProdServ, or null for the largest line in the group. |
| `invoice_concepts.groups[].unit_key` | string or null | yes | Its ClaveUnidad, or null for the largest line's. |
| `invoice_concepts.groups[].sat_keys` | array of string | yes | The SAT codes it takes, complete or their start (2 to 8 digits, like 9010). |
| `invoice_concepts.groups[].categories` | array of string | yes | The product categories it takes, by their path («Hotel › Habitaciones»); a category also takes the ones inside it. |
| `invoice_concepts.ungrouped` | `itemized`, `group` | yes | What no group takes: itemized, broken down; group, in one more line item called ungrouped_name. |
| `invoice_concepts.ungrouped_name` | string | yes | The line item name for what no group takes. |
| `invoice_concepts.line_detail` | `customer`, `always`, `never` | yes | What happens to each ticket line's detail: customer, the buyer sees the checkbox unticked and ticks it if they want it; always, it always goes after the description; never, it never goes. |
| `retention_mode` | `keep_total`, `subtract` | yes | When invoicing a persona moral that withholds (1.25% ISR in RESICO, or the product's). keep_total: the base grows and the invoice adds up to what was paid. subtract: the base is the ticket's and the total is what was paid minus the withholding. |
| `invoice_series` | string or null | yes | The series for invoices issued from the portal and from a ticket, like AF, or null for the issuer's invoice series. The global invoice doesn't use it. |
| `customer_notes` | boolean | yes | true: the portal asks the buyer for a note for their invoice's PDF (up to 500 characters). It only appears on the PDF, never in the XML. |
| `failure_email` | boolean | yes | true: when a buyer can't invoice because of something on the issuer's side, an email goes out; false: it only stays in Alertas. |
| `split_max` | integer | yes | The most invoices a receipt can have (splitting a receipt into several invoices), counting the one that takes all that's left; 0: it can't be split. (from -9007199254740991 to 9007199254740991) |
| `split_min` | number | yes | The least each invoice of a split receipt can be, taxes included; less can't be left to invoice either, except by the invoice that takes all that's left. |
| `split_same` | boolean | yes | true: a buyer can make several invoices with the same details at once (4 of 250 from a 1,000 receipt). |
| `global_concepts` | `ticket`, `summary` | yes | ticket: the global invoice carries one «Venta» line item per ticket, with its folio. summary: only the period's total amount, one per tax combination (NoIdentificacion «Resumen»), for a persona física in RESICO (rule 2.7.1.21 of the RMF 2026). |

```json
{
  "object": "self_invoicing",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "portal_url": "https://fiscalisto.com/autofactura/Tx8mQ2vLp9WnR4c",
  "window": "month",
  "window_days": 7,
  "global_periodicity": "04",
  "global_invoice": "auto",
  "ask_total": true,
  "portal_title": null,
  "portal_message": null,
  "code_hint": null,
  "portal_theme": "auto",
  "portal_accent": "#0b7c77",
  "portal_radius": null,
  "portal_style": {
    "layout": "checkout",
    "density": "comfortable",
    "header": "name_rfc",
    "logo_size": "m",
    "logo_shape": "rounded",
    "font": "system",
    "heading_font": null,
    "heading_size": "m",
    "borders": "subtle",
    "shadow": "soft",
    "ways": {
      "constancia": true,
      "qr": true,
      "cif": true,
      "recall": true,
      "abroad": true,
      "norfc": false
    },
    "email_required": false,
    "show_deadline": true,
    "back": null,
    "css": "",
    "colors": {
      "background": null,
      "card": null,
      "text": null,
      "button_text": null
    },
    "noun": "ticket",
    "texts": {}
  },
  "retention_mode": "keep_total",
  "invoice_series": null,
  "customer_notes": false,
  "failure_email": true,
  "split_max": 4,
  "split_min": 100,
  "split_same": true,
  "global_concepts": "ticket",
  "invoice_concepts": {
    "mode": "itemized",
    "customer_choice": true,
    "customer_options": [
      "itemized",
      "single",
      "grouped"
    ],
    "description": "Consumo",
    "product_key": null,
    "unit_key": null,
    "groups": [
      {
        "name": "Alimentos y bebidas",
        "product_key": "90101501",
        "unit_key": "E48",
        "sat_keys": [
          "901015"
        ],
        "categories": []
      },
      {
        "name": "Hospedaje",
        "product_key": null,
        "unit_key": null,
        "sat_keys": [],
        "categories": [
          "Hotel › Habitaciones"
        ]
      }
    ],
    "ungrouped": "group",
    "ungrouped_name": "Otros servicios",
    "line_detail": "customer"
  }
}
```

## Errors

- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
