Skip to main content

kobana dunning imports

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

CommandHTTPDescription
imports listGET /v1/importsList imports
imports createPOST /v1/importsCreate import
imports getGET /v1/imports/{id}Get import

imports list​

List imports

kobana dunning imports list [OPTIONS]

GET /v1/imports

History of the organization’s 50 most recent imports (no pagination). File content and per-row errors are omitted; use GET /imports/{id} for details.

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 imports.
404Resource not found or outside your organization.
413Request body larger than 2 MB.

imports create​

Create import

kobana dunning imports create [OPTIONS]

POST /v1/imports

Uploads a CSV file of customers or charges and queues asynchronous processing. The body is JSON with the raw CSV text in the content field (max 2 MB). Invalid rows do not abort the batch: they are recorded in errors ([{ line, error }]) while the rest is processed. Track progress via GET /imports/{id}. Responds 202. Requires the import access level (or all) — write is 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_typestringyesImported resource type (people = customers | charges = charges). Values: people, charges.
contentstringyesRaw CSV content as plain text (UTF-8), including the header row. Max 2 MB.
file_namestringnoUploaded file name.

More fields and nested objects: kobana schema dunning.imports.create.

Responses

HTTPDescription
202Import accepted and queued for processing.
400Invalid request (validation error).
404Resource not found or outside your organization.
413File larger than 2 MB — split the file into smaller parts.

imports get​

Get import

kobana dunning imports get [ID] [OPTIONS]

GET /v1/imports/{id}

Returns an import’s status with progress counters and per-row rejection errors (errors: [{ line, error }]; line 1 is the header, data starts at line 2).

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
200Import found.
404Resource not found or outside your organization.
413Request body larger than 2 MB.