Pular para o conteúdo principal

kobana finance fiscal-documents

Comandos de kobana finance fiscal-documents. Toda opção global (Opções globais) vale aqui.

ComandoHTTPDescrição
fiscal-documents listGET /v1/fiscal-documentsListar notas fiscais
fiscal-documents getGET /v1/fiscal-documents/{id}Obter nota fiscal por ID

fiscal-documents list​

Listar notas fiscais

kobana finance fiscal-documents list [OPÇÕES]

GET /v1/fiscal-documents

Returns a cursor-paginated page of the fiscal documents (NF-e / NFS-e) received against the workspace's companies, for the workspace tied to the token's sub claim. These notes are parked read-only — the app never emits them, so there is no create/cancel here. Default sort is -issued_at. Requires scope finance/fiscal_documents with access level read.

⚠️ xml_download_url points at the attachments resource, so fetching the XML bytes needs a token that also reaches finance/attachments (or a read access level alone). A note can legitimately keep no XML (a summary-completeness note), in which case xml_attachment_id and xml_download_url are both null.

Parâmetros de consulta

NomeTipoObrigatórioDescrição
company_idstringnãoFilter by the linked workspace company UUID. Accepts [in].
kindstringnãoservice (NFS-e) or product (NF-e). Accepts [in]. Valores: service, product.
situationstringnãoFiscal status. Accepts [in]. Valores: authorized, cancelled, unknown.
sourcestringnãoHow the note entered the workspace. Accepts [in]. Valores: nfe_io, xml_upload, sefaz.
access_keystringnãoFilter by the 44-digit access key (exact). Accepts [in].
numberstringnãoFilter by document number (exact). Accepts [in].
issuer_documentstringnãoFilter by issuer CNPJ/CPF (digits only) — every note from a given supplier. Accepts [in].
issued_atstringnãoISO date filter on the issue date. Range operators: [gte], [lte], [gt], [lt].
created_atstringnãoISO timestamp filter on when the note appeared in the workspace. Range operators supported.
updated_atstringnãoISO timestamp filter on the last write. Range operators supported. This is the incremental-sync window: poll ?updated_at[gte]=<end of your last poll>&sort_by=updated_at. Deletions do NOT appear here.
sort_bystringnãoField to order by. Default: sort_by=issued_at&sort_order=desc. Valores: created_at, issued_at, total_amount, updated_at.
sort_orderstringnãoOrder direction. Defaults to asc; ignored without sort_by. Valores: asc, desc.
limitintegernãoPage size. Default 25, max 100.
cursorstringnãoOpaque cursor for the next page. Round-trip meta.next_cursor from the previous response.
fieldsstringnãoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Cabeçalhos

NomeTipoObrigatórioDescrição
X-Workspace-IdstringsimWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respostas

HTTPDescrição
200Page of fiscal documents plus pagination metadata.
400Malformed query (unknown filter / operator, invalid limit, bad cursor).

fiscal-documents get​

Obter nota fiscal por ID

kobana finance fiscal-documents get [ID] [OPÇÕES]

GET /v1/fiscal-documents/{id}

A single received fiscal document. Returns the same shape as the rows from the list endpoint. Requires scope finance/fiscal_documents with access level read. 404 covers both "doesn't exist" and "not in the tenant" — the API does not distinguish. The XML bytes are not served here — follow xml_download_url, which lives on the attachments resource and needs finance/attachments.

Argumentos do caminho: id

Parâmetros de consulta

NomeTipoObrigatórioDescrição
fieldsstringnãoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Cabeçalhos

NomeTipoObrigatórioDescrição
X-Workspace-IdstringsimWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respostas

HTTPDescrição
200Get a fiscal document by id
404Fiscal document not found within the tenant.