SonaCORE

Referência / Quadra Core API

Fiscal Documents

2 operações em Quadra Core API 0.5.0.

GET/v1/fiscal-documents

List the caller's fiscal documents

The caller's fiscal documents, newest first.

**Page until `next_cursor` is null**: `kind` and `state` are filters, so a short page is not the end of the list.

Raises: 400: INVALID_QUERY

Parâmetros

NomeTipoDetalhe
kindstring, opcionalquery NFSE | GUIA | COMPROVANTE_RETENCAO | COMPROVANTE_PAGAMENTO | DECLARACAO_OPTANTE | RECIBO_PROLABORE
statestring, opcionalquery A state of the document's kind
fromstring, opcionalquery created_at lower bound (YYYY-MM-DD or UTC instant), inclusive
tostring, opcionalquery created_at upper bound (YYYY-MM-DD or UTC instant), inclusive
cursorstring, opcionalquery Opaque pagination cursor
limitintegerquery

Respostas

StatusCorpoDetalhe
200FiscalDocumentListResponseResposta bem-sucedida
422HTTPValidationErrorErro de validação
GET/v1/fiscal-documents/{doc_id}

Read one fiscal document and its history

One fiscal document with its immutable per-transition `history`.

Raises: 404: FISCAL_DOCUMENT_NOT_FOUND (unknown and foreign ids are the same miss)

Parâmetros

NomeTipoDetalhe
doc_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200FiscalDocumentViewResposta bem-sucedida
422HTTPValidationErrorErro de validação

Esquemas

Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.

FiscalDocumentListResponse

CampoTipoDetalhe
itemsarray de FiscalDocumentView
next_cursorstring, opcionalPage until null — a short page is not the end of the list

FiscalDocumentView

A fiscal document — references only; the XML/PDF live in the BFF's store.

CampoTipoDetalhe
account_idstring, opcional
amountsobject, opcional
chavestring, opcionalNFS-e chave de acesso, once authorised
competenciastring, opcional
counterpartyobject, opcional
created_atstringobrigatório
doc_idstringobrigatório
event_seqintegerobrigatório
historyarray de object, opcionalThe immutable per-transition records (single-document read only)
issuerobject, opcional
kindstringobrigatórioNFSE | GUIA | COMPROVANTE_RETENCAO | COMPROVANTE_PAGAMENTO | DECLARACAO_OPTANTE | RECIBO_PROLABORE
obligation_idsarray de string, opcional
provider_refsobject, opcional
rejectionobject, opcional{reason, provider_code, at} — the human text AND the technical code
replaced_bystring, opcional
replacesstring, opcional
statestringobrigatório
state_historyarray de object
storage_refsarray de object, opcional{store, key, sha256, media_type, size_bytes} — never the bytes
tenantstringobrigatório
updated_atstringobrigatório

HTTPValidationError

CampoTipoDetalhe
detailarray de ValidationError

ValidationError

CampoTipoDetalhe
ctxobject
inputnão declarado
locarray de string ou integerobrigatório
msgstringobrigatório
typestringobrigatório