Skip to main content

kobana dunning exports

Commands of kobana dunning exports. Every global option (Global options) applies here.

CommandHTTPDescription
exports chargesGET /v1/exports/chargesExport charges (synchronous CSV)
exports jobs listGET /v1/exports/jobsList asynchronous exports
exports jobs createPOST /v1/exports/jobsCreate asynchronous export
exports jobs downloadGET /v1/exports/jobs/{id}/downloadDownload export CSV
exports peopleGET /v1/exports/peopleExport customers (synchronous CSV)

exports charges​

Export charges (synchronous CSV)

kobana dunning exports charges [OPTIONS]

GET /v1/exports/charges

Generates and returns the charges CSV inline (text/csv; charset=utf-8 with BOM, Content-Disposition: attachment), with optional status and due-date filters. Columns: cliente, documento_cliente, numero_documento, descricao, valor_original, valor_atual, vencimento, dias_atraso, status, origem, external_id. Capped at 10k rows; beyond that use the asynchronous export (POST /exports/jobs). Requires the export access level (or all) — read and write are not enough.

Query parameters

NameTypeRequiredDescription
statusstringnoFilter charges by status (e.g. pending, overdue, paid).
fromstringnoDue date from (ISO date YYYY-MM-DD).
tostringnoDue date until (ISO date YYYY-MM-DD).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200CSV file (text/csv; charset=utf-8 with BOM so Excel renders accents correctly; Content-Disposition: attachment).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

exports jobs list​

List asynchronous exports

kobana dunning exports jobs list [OPTIONS]

GET /v1/exports/jobs

History of the organization’s 50 most recent asynchronous exports (no pagination). Use this route to track job status; the CSV itself is not included in the listing. A read (read): the file itself requires export.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200List of the most recent exports.
404Resource not found or outside your organization.
413Request body larger than 2 MB.

exports jobs create​

Create asynchronous export

kobana dunning exports jobs create [OPTIONS]

POST /v1/exports/jobs

Schedules CSV generation on a worker, without the 10k-row cap of the synchronous mode and without blocking the request. Track status via GET /exports/jobs and download the file via GET /exports/jobs/{id}/download before expires_at. Responds 202. Requires the export access level (or all) — read and write are not enough.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
resource_typestringyesExported resource type (people = customers | charges = charges). Values: people, charges.
file_namestringnoGenerated file name (default: {resourceType}.csv).
filtersobjectnoFilters applied to the export (only for charges); stored on the job for auditing.

More fields and nested objects: kobana schema dunning.exports.jobs.create.

Responses

HTTPDescription
202Export accepted and queued for processing.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

exports jobs download​

Download export CSV

kobana dunning exports jobs download [ID] [OPTIONS]

GET /v1/exports/jobs/{id}/download

Serves the generated CSV of an asynchronous export (text/csv; charset=utf-8 with BOM). Only available once the job is completed and before expires_at. Requires the export access level (or all) — read and write are not enough.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200CSV file (text/csv; charset=utf-8 with BOM so Excel renders accents correctly; Content-Disposition: attachment).
404Resource not found or outside your organization.
409Export not finished yet (NOT_READY code; the status field reports the current state).
410Export expired — create a new one (EXPIRED code).
413Request body larger than 2 MB.

exports people​

Export customers (synchronous CSV)

kobana dunning exports people [OPTIONS]

GET /v1/exports/people

Generates and returns the customers CSV inline (text/csv; charset=utf-8 with BOM, Content-Disposition: attachment). Columns: nome, documento, tipo_documento, email, telefone, classificacao, external_id, tags, criado_em. Capped at 10k rows; beyond that use the asynchronous export (POST /exports/jobs). Requires the export access level (or all) — read and write are not enough.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200CSV file (text/csv; charset=utf-8 with BOM so Excel renders accents correctly; Content-Disposition: attachment).
404Resource not found or outside your organization.
413Request body larger than 2 MB.