---
title: "Accept a received invoice (SII event)"
method: POST
path: "/v1/fiscal_invoices/{fiscal_invoice_id}/accept_sii_event"
tags: ["Fiscal Invoice"]
---

# Accept a received invoice (SII event)

`POST /v1/fiscal_invoices/{fiscal_invoice_id}/accept_sii_event`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/fiscal_invoices/{fiscal_invoice_id}/accept_sii_event`
- Auth: HTTP bearer

Registers an **acceptance** event for a received invoice with the SII
(Registro de Aceptación/Reclamo). Cardda submits the event synchronously using
the company's own approved SII credential, then persists the outcome on the
fiscal invoice.

## Action codes

`action_code` is optional; when omitted it defaults to `ACD`. If provided, it
must be one of the accept codes:

| Code | Meaning |
| ---- | ------- |
| `ACD` | Aceptación del contenido del documento. |
| `ERM` | Otorga recibo de mercaderías o servicios. |
| `ERG` | Recibo de mercaderías / servicios (variante). |

## Idempotency

The event is reserved under a row lock: the invoice moves to
`sii_event_state: submitting`, then `submitted` on success. A second call while
an event is already in flight or recorded returns `409`.

Requires the `erp_tradables_manage` permission on the invoice's own company
(checked against the invoice, not the `company-id` header).

## Path parameters

- `fiscal_invoice_id` string, required

## Parameters

- `#/paths/~1v1~1sii~1keys/get/parameters/0` (unresolved $ref)

## Request body

- object
  - `action_code` 'ACD' | 'ERM' | 'ERG': Accept action code. Defaults to `ACD` when omitted.

## Response `200`

The updated fiscal invoice (including `sii_event_state`, `sii_event_status`
and `sii_event_at`) plus the raw `sii_event_result` from the SII.

- SiiEventResponse
  - `id` string, required: Unique identifier of the fiscal invoice
  - `document_type` number, required: Type of document (e.g. 33 for invoice, 34 for exempt invoice, 39 for electronic receipt)
  - `company_id` string, uuid, required: ID of the company associated with this invoice
  - `number` string, required: Number of the invoice
  - `issuer_id` string: ID of the entity that issued the invoice, tax identification number for Chilean subjects
  - `receiver_id` string: ID of the entity receiving the invoice, tax identification number for Chilean subjects
  - `issue_type` 'received' | 'issued', required: Whether the invoice was received or issued by the company
  - `total_amount` number, required: Total amount of the invoice
  - `net_amount` number: Net amount of the invoice
  - `currency` string: Currency of the invoice (e.g., CLP)
  - `tax_period` string: Tax period (e.g., MM/YYYY)
  - `expiration_date` string, date-time, nullable: Expiration date of the invoice
  - `created_at` string, date-time: Date and time when the record was synced from IRS
  - `updated_at` string, date-time: Date and time when the record was last updated
  - `cancellation_date` string, date-time, nullable: Date and time when the invoice was cancelled (null if not cancelled)
  - `is_services_invoice` boolean, nullable: Whether the invoice corresponds to a services invoice
  - `service_invoice_status` 'VIG' | 'ANUL', nullable: SII service-invoice acceptance status synced from the upstream document. `VIG` (vigente) means the document is in force; `ANUL` (anulado) means it was annulled. Populated only for invoices in the `is_services_invoice=true` flow; `null` for other invoices or while the backfill has not yet run.
  - `payment_status` string, nullable: Status of payment (e.g., paid, non_paid)
  - `tradable` object, nullable: The ERP payout item (`Erp::Payouts::Tradable` — a payable, receivable, credit note, etc.) Cardda derives from this invoice, serialized inline via the `tradable` method. `null` until a tradable has been created for the invoice.
  - `due_date` string, date-time, nullable: Payment due date, taken from the linked `tradable` (`tradable&.due_date`). `null` when there is no tradable or it has no due date. Rendered via a serializer method, not a stored column.
  - `issuer` object, nullable: Compact projection of the issuer `Person` row (only `id`, `name`, `identifier`), included inline on list and detail responses.
    - `id` string, uuid
    - `name` string, nullable
    - `identifier` string: Tax id (RUT) of the issuer.
  - `receiver` object, nullable: Compact projection of the receiver `Person` row (only `id`, `name`, `identifier`), included inline on list and detail responses.
    - `id` string, uuid
    - `name` string, nullable
    - `identifier` string: Tax id (RUT) of the receiver.
  - `sii_event_status` string, nullable: The action the SII recorded for this document (e.g. `ACD`, `RCD`), taken from the SII response `accion` (falls back to the requested `action_code`).
  - `sii_event_state` 'idle' | 'submitting' | 'submitted': Idempotency state of the SII acceptance/rejection lifecycle. After a successful call this is `submitted`. A row is briefly `submitting` while the synchronous SII call is in flight (reserved under a row lock so concurrent calls cannot double-submit).
  - `items` object[]: Line items in the invoice
    - `id` number, required: ID of the item
    - `name` string, required: Name of the item
    - `unit` string, nullable: Unit of measurement
    - `price` number, required: Price per unit
    - `amount` number, required: Total amount for this item
    - `discount` number, nullable: Discount amount
    - `quantity` number, required: Quantity of items
    - `description` string, required: Description of the item
  - `issuer_name` string: Name of the entity that issued the invoice
  - `receiver_name` string: Name of the entity receiving the invoice
  - `referenced_documents` object[]: Referenced documents
    - `number` string, required: Reference document number
    - `document_type` integer, required: Type of referenced document (e.g., 33, 34, 61)
  - `raw_xml` string: Raw XML content of the invoice
  - `counterpart_id` string, uuid: UUID of the counterpart `Person` row Cardda associates with this invoice (the supplier for `received` invoices, the customer for `issued`).
  - `issue_date` string, date-time, required: Date when the invoice was issued
  - `reception_date` string, date-time: Date when the invoice was received in the system
  - `iva_amount` number: IVA (VAT) amount
  - `operation` string: Type of operation (e.g., purchase)
  - `sii_event_at` string, date-time, nullable: When the SII event was submitted.
  - `sii_event_result` object: Raw response payload returned by the SII for this event. Shape is passed through as-is; `accion` holds the accepted/rejected action code.

## Other responses

- `400`: The `action_code` is not valid for an accept event. Body: `{ "error": "Invalid action_code for accept. Allowed: ACD, ERM, ERG" }`. Upstream SII validation errors are also passed through with the SII's own status (400/401/403) and body.
- `401`: Unauthorized — missing/invalid token, `company-id` header not set, or the caller lacks `erp_tradables_manage` on the invoice's company.
- `404`: Fiscal invoice not found. Body: `{ "message": "Resource not found" }`.
- `409`: The invoice already has an SII event in flight or recorded. Body: `{ "error": "Invoice already has SII event" }`.
- `412`: The invoice''s company has no approved SII credential whose RUT matches the company identifier. Body: `{ "error": "No approved SII credentials for this company" }`.

---

[API](https://skmtc.dev/cardda/apis/banking-api.md) - [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/banking-api/revisions/ff1aeb3fda8b?raw)
