PUT /invoices/:invoiceId/dte on the Invoices page; the dte.id returned there is the dteId used below.
GET /sii/document-types
List the SII document type catalog available to this Entity (invoice, credit note, debit note, and their variants).
Response: an array of document types.
GET /sii/dte/:dteId
Fetch a single DTE with its detail, including its amounts and any references to or from other DTEs.
Response: a DTE detail object.
referenceCode is the SII code that says what the referencing document does to the referenced one: 1 voids it, 2 corrects its text, 3 corrects its amounts. Null means the DTE states a reference and no code.
A Source Feed sync links the references each landed DTE states, with their code, when the target DTE is already in the books. See DTE references. Use the endpoints below to add or remove a reference by hand.
Example response for a credit note that voids an invoice:
POST /sii/dte/:dteId/references
Add a reference from this DTE to a target DTE. Used, for example, to record that a credit note credits a specific original invoice.
Body
Response (
201): the updated DTE detail, as returned by GET /sii/dte/:dteId.
DELETE /sii/dte/:dteId/references/:targetDteId
Remove a previously added reference.
Response: the updated DTE detail, as returned by GET /sii/dte/:dteId.
Sales Summaries
For some sales types, the SII’s Registro de Compras y Ventas (RCV) states no documents, only one total per month. The most common is type48, the vouchers of card payments. A Sales Summary holds the SII’s figures for one of these types in one Tax Period of an Entity: how many documents the total counts, and the net, exempt, tax, and total amounts.
The total-only types are 35, 38, 47, 48, 105, 919, 920, 922, and 924. Boletas (39 and 41) are not among them, because the SII lists each boleta; see SII Mirror boletas.
A Source Feed of family dte on an sii_mirror Integration writes the Sales Summaries and lands each one as receivable Invoices, which you book like any other sale. Only a Sync writes them. When the SII changes a figure, the Sync writes the new one over the stored one, and the Audit Trail keeps every earlier figure.
The Sales Summary object
GET /sales-summaries
List the Entity’s Sales Summaries, newest Tax Period first, then by dteTypeCode.
Response: an array of Sales Summary objects.
GET /sales-summaries/:salesSummaryId
Fetch one Sales Summary with the Invoices that land it.
Response: the Sales Summary object plus invoices, the Invoices that land it, oldest first. The first one lands the SII’s figures, and each later one lands a change the SII made after the earlier ones were booked. Each item carries id, documentNumber, documentKind, total, issueDate, bookingEntryId (the Ledger Entry that books it, null until the Invoice is booked), excludedAt, and createdAt.

