Skip to main content

kobana dunning classifications

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

CommandHTTPDescription
classifications listGET /v1/classificationsList classifications
classifications createPOST /v1/classificationsCreate classification
classifications getGET /v1/classifications/{id}Get classification
classifications updatePUT /v1/classifications/{id}Update classification
classifications deleteDELETE /v1/classifications/{id}Delete classification

classifications list​

List classifications

kobana dunning classifications list [OPTIONS]

GET /v1/classifications

Lists the organization’s classifications, ordered by priority and name by default. Use include=_count for counters.

Query parameters

NameTypeRequiredDescription
pageintegernoPage number (starts at 1).
per_pageintegernoItems per page (max 100).
is_defaultstringnoFilter by default classification (true | false). Values: true, false.
auto_assignstringnoFilter by automatic assignment (true | false). Values: true, false.
activated_atstringnoFilter by activation: true = active, false or null = inactive. Values: true, false, null.
includestringnoRelations to embed. Supported: _count (customers and rules).
sortstringnoSort field (name | code | priority | created_at | updated_at). Values: name, code, priority, createdAt, updatedAt.
orderstringnoSort direction (asc | desc). Values: asc, desc.

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
200Paginated classification list.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

classifications create​

Create classification

kobana dunning classifications create [OPTIONS]

POST /v1/classifications

Creates a classification. Setting is_default unsets the previous default; a duplicate code fails with 409.

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
namestringyesClassification name.
codestringyesStable code (lowercase, digits and underscore; unique within the organization).
descriptionstringnoClassification description.
colorstringnoHex color shown in the UI (e.g. #22c55e).
priorityintegernoEvaluation priority (lower evaluates first).
is_defaultbooleannotrue when this is the organization’s default classification (only one).
auto_assignbooleannotrue when customers are auto-assigned by the criteria.
criteriaobjectnoAutomatic assignment criteria (payment behavior).
activated_atstring (date-time)noActivation timestamp (null = inactive).
external_idstringnoIdentifier in YOUR system (integration key).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.

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

Responses

HTTPDescription
201Classification created (with counters).
400Invalid request (validation error).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

classifications get​

Get classification

kobana dunning classifications get [ID] [OPTIONS]

GET /v1/classifications/{id}

Returns a classification by ID. Use include=_count for counters.

Path arguments: id

Query parameters

NameTypeRequiredDescription
includestringnoRelations to embed. Supported: _count (customers and rules).

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

classifications update​

Update classification

kobana dunning classifications update [ID] [OPTIONS]

PUT /v1/classifications/{id}

Updates a classification (partial). A duplicate code fails with 409.

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.

Request body

NameTypeRequiredDescription
namestringnoClassification name.
codestringnoStable code (lowercase, digits and underscore; unique within the organization).
descriptionstringnoClassification description.
colorstringnoHex color shown in the UI (e.g. #22c55e).
priorityintegernoEvaluation priority (lower evaluates first).
is_defaultbooleannotrue when this is the organization’s default classification (only one).
auto_assignbooleannotrue when customers are auto-assigned by the criteria.
criteriaobjectnoAutomatic assignment criteria (payment behavior).
activated_atstring (date-time)noActivation timestamp (null = inactive).
external_idstringnoIdentifier in YOUR system (integration key).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.
custom_metadata_modestringnoHow the custom_metadata sent is reconciled with the stored value: replace (default) replaces the whole object; merge deep-merges — nested objects merge, scalars and arrays replace the key, and a key sent as null is stored as null (not removed). Update only. Values: replace, merge.

More fields and nested objects: kobana schema dunning.classifications.update.

Responses

HTTPDescription
200Classification updated (with counters).
400Invalid request (validation error).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

classifications delete​

Delete classification

kobana dunning classifications delete [ID] [OPTIONS]

DELETE /v1/classifications/{id}

Soft-deletes a classification. Fails with 409 if there are associated customers or rules. The code stays reserved.

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
204Classification deleted.
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.