Fiscal Documents
2 operações em Quadra Core API 0.5.0.
GET
/v1/fiscal-documentsList 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
| Nome | Tipo | Detalhe |
|---|---|---|
| kind | string, opcional | query NFSE | GUIA | COMPROVANTE_RETENCAO | COMPROVANTE_PAGAMENTO | DECLARACAO_OPTANTE | RECIBO_PROLABORE |
| state | string, opcional | query A state of the document's kind |
| from | string, opcional | query created_at lower bound (YYYY-MM-DD or UTC instant), inclusive |
| to | string, opcional | query created_at upper bound (YYYY-MM-DD or UTC instant), inclusive |
| cursor | string, opcional | query Opaque pagination cursor |
| limit | integer | query |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | FiscalDocumentListResponse | Resposta bem-sucedida |
| 422 | HTTPValidationError | Erro 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
| Nome | Tipo | Detalhe |
|---|---|---|
| doc_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | FiscalDocumentView | Resposta bem-sucedida |
| 422 | HTTPValidationError | Erro 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
| Campo | Tipo | Detalhe |
|---|---|---|
| items | array de FiscalDocumentView | |
| next_cursor | string, opcional | Page 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.
| Campo | Tipo | Detalhe |
|---|---|---|
| account_id | string, opcional | |
| amounts | object, opcional | |
| chave | string, opcional | NFS-e chave de acesso, once authorised |
| competencia | string, opcional | |
| counterparty | object, opcional | |
| created_at | string | obrigatório |
| doc_id | string | obrigatório |
| event_seq | integer | obrigatório |
| history | array de object, opcional | The immutable per-transition records (single-document read only) |
| issuer | object, opcional | |
| kind | string | obrigatórioNFSE | GUIA | COMPROVANTE_RETENCAO | COMPROVANTE_PAGAMENTO | DECLARACAO_OPTANTE | RECIBO_PROLABORE |
| obligation_ids | array de string, opcional | |
| provider_refs | object, opcional | |
| rejection | object, opcional | {reason, provider_code, at} — the human text AND the technical code |
| replaced_by | string, opcional | |
| replaces | string, opcional | |
| state | string | obrigatório |
| state_history | array de object | |
| storage_refs | array de object, opcional | {store, key, sha256, media_type, size_bytes} — never the bytes |
| tenant | string | obrigatório |
| updated_at | string | obrigatório |
HTTPValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| detail | array de ValidationError |
ValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| ctx | object | |
| input | não declarado | |
| loc | array de string ou integer | obrigatório |
| msg | string | obrigatório |
| type | string | obrigatório |