v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
SII Key

List SII keys

Returns a paginated list of SII keys — the digital-certificate credentials Cardda holds on behalf of a company to operate against Chile's Servicio de Impuestos Internos (SII).

An SII key is what lets Cardda authenticate to the SII to sync the company's issued/received electronic documents (DTEs), pull PDFs, and submit acceptance/rejection events. A key becomes usable once its status is approved; it can additionally issue documents once a certificate password is present (can_issue?).

Response structure

Sensitive fields (password, certificate_password) are never exposed by this endpoint — they are stripped from every serialization. Each item adds two computed fields:

FieldDescription
can_issue?true when status is approved and a certificate password is stored. Serialized literally with the trailing ?.
company_idsUUIDs of the companies the key manages.

Scoping

Results are scoped to the keys the caller can see: keys the caller owns (user_id == caller) plus keys whose managed companies grant the caller the sii_keys_view or sii_keys_manage permission.

get/v1/sii/keys

Query parameters

_startinteger

Page offset

_endinteger

Page limit

_order'ASC' | 'DESC'

Order to apply

_fieldstring

Field to order by

user_idstring

Firebase user id of the credential owner.

rutstring

Filter by RUT (digits plus verifier digit). Accepts a plain value (rut=761234567) or a JSON-encoded operator object ({"$in":["761234567","12345678K"]}). Schema is type: string so both forms validate; see Filters.

status'approved' | 'pending' | 'canceled' | 'declined'

Lifecycle status of the key.

created_atstring

Creation timestamp (UTC ISO-8601). Accepts a single date-time string or a JSON-encoded operator object ({"$gte":"...","$lt":"..."}). Schema is type: string (no format) so both forms validate.

Headers

company-idstring uuid required

UUID of the company on whose behalf the request is made. Fiscal-invoice endpoints authorize the caller against this company (and read/write its data). SII-key endpoints never filter their results by this header. On the SII-key list, however, belonging to the header company is one of the ways a caller is authorized to make the call (alongside being Cardda staff or passing their own user_id), so the header is not merely ignored there. On the other SII-key endpoints the header plays no part in authorization. See The company-id header for details on how to obtain a value for this header and the error responses to expect when it is missing or invalid.

Response

Paginated list of SII keys (sensitive fields filtered out). Headers include X-Total-Count and Content-Range for offset pagination — see Pagination.

idstring uuid required

UUID of the SII key.

rutstring required

Tax id (RUT) the certificate belongs to, stored as bare digits plus the verifier digit (e.g. 761234567 or 12345678K). Unique across all SII keys.

user_idstring nullable

Firebase user id of the person who provided the credential.

status'approved' | 'pending' | 'canceled' | 'declined' required

Lifecycle status of the credential.

ValueMeaning
pendingJust created; Cardda has not yet validated it against the SII.
approvedValidated; the key can sync companies and invoices.
declinedThe SII rejected the credentials (auth/wrong-credentials).
canceledThe credential was disabled.
issuer_phoneinteger nullable

Phone number registered for the issuer, when captured.

last_synced_atstring date-time nullable

Timestamp of the last successful invoice/company sync.

can_issueboolean

Whether the key can issue electronic documents — true when status is approved and a certificate password is present. Note: this field is serialized with a trailing question mark in the JSON response (can_issue?).

company_idsstring[]

UUIDs of the companies this key manages (resolved through the SII managers join). Present on the list and detail responses; omitted from the update response.

created_atstring date-time

When the key was created in Cardda.

updated_atstring date-time

When the key was last updated.