Skip to main content

kobana dunning negotiation-campaigns

Commands of kobana dunning negotiation-campaigns. Every global option (Global options) applies here.

CommandHTTPDescription
negotiation-campaigns listGET /v1/negotiation-campaignsList campaigns
negotiation-campaigns createPOST /v1/negotiation-campaignsCreate campaign
negotiation-campaigns endPOST /v1/negotiation-campaigns/{id}/endEnd campaign

negotiation-campaigns list​

List campaigns

kobana dunning negotiation-campaigns list [OPTIONS]

GET /v1/negotiation-campaigns

Lists the organization’s negotiation campaigns (active and ended), newest first. Not paginated.

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

negotiation-campaigns create​

Create campaign

kobana dunning negotiation-campaigns create [OPTIONS]

POST /v1/negotiation-campaigns

Creates and activates a discount campaign. The debtor portal starts offering it to charges within the configured overdue range.

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
namestringyesCampaign name.
discount_percentagenumberyesDiscount percentage (0-100). Returned as a decimal string.
max_installmentsintegernoMaximum number of installments allowed (1 = single payment).
min_days_overdueintegernoStart of the overdue-days range where the campaign applies (null = no minimum).
max_days_overdueintegernoEnd of the overdue-days range where the campaign applies (null = no maximum).
valid_untilstring (date)noCampaign expiration date (null = no deadline).
termsstringnoTerms shown to the debtor.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.

More fields and nested objects: kobana schema dunning.negotiation-campaigns.create.

Responses

HTTPDescription
201Campaign created and activated (campaign envelope).
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

negotiation-campaigns end​

End campaign

kobana dunning negotiation-campaigns end [ID] [OPTIONS]

POST /v1/negotiation-campaigns/{id}/end

Ends the campaign (deactivates; activated_at becomes null). The record is kept and the portal stops offering it. A write (write), not a deletion — it replaced DELETE /negotiation-campaigns/{id}.

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