Skip to main content

kobana billing plans

Commands of kobana billing plans. Every global option (Global options) applies here.

CommandHTTPDescription
plans bulk deleteDELETE /v1/plans/bulkBulk delete plans
plans itemsGET /v1/plans/{id}/itemsList plan items
plans items updatePUT /v1/plans/{id}/itemsReplace plan items
plans listGET /v1/plansList plans
plans createPOST /v1/plansCreate plan
plans updatePUT /v1/plansUpsert plan
plans bulk-archivePOST /v1/plans/bulk-archiveBulk archive plans
plans bulk-move-groupPOST /v1/plans/bulk-move-groupBulk move plans to another group
plans getGET /v1/plans/{id}Get plan
plans deleteDELETE /v1/plans/{id}Delete plan
plans archivePOST /v1/plans/{id}/archiveArchive plan
plans duplicatePOST /v1/plans/{id}/duplicateDuplicate plan

plans bulk delete​

Bulk delete plans

kobana billing plans bulk delete [OPTIONS]

DELETE /v1/plans/bulk

Deletes the given plans (soft delete: deleted_at, the same effect as DELETE /v1/plans/{id} on each). Plans with a subscription that is not canceled are skipped and returned in skipped_ids. Requires the delete access level. Replaces POST /v1/plans/bulk-delete, which was removed.

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yesList of plan UUIDs. Minimum 1.

More fields and nested objects: kobana schema billing.plans.bulk.delete.

Responses

HTTPDescription
200Bulk delete summary.
404Resource not found in the current organization.
422Request body failed validation.

plans items​

List plan items

kobana billing plans items [ID] [OPTIONS] [COMMAND]

GET /v1/plans/{id}/items

Path arguments: id

Responses

HTTPDescription
200List of plan items.
404Resource not found in the current organization.

plans items update​

Replace plan items

kobana billing plans items update [ID] [OPTIONS]

PUT /v1/plans/{id}/items

Atomically replaces all plan items. Only root products are accepted and each product_id must be unique in the list.

Path arguments: id

Request body

NameTypeRequiredDescription
itemsarray<object>yes

More fields and nested objects: kobana schema billing.plans.items.update.

Responses

HTTPDescription
200Plan items replaced.
404Resource not found in the current organization.
422Request body failed validation.

plans list​

List plans

kobana billing plans list [OPTIONS]

GET /v1/plans

Returns a paginated list of the current organization's plans.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
person_idstringnoFilter by associated person UUID.
person_document_numberstringnoFilter by person CPF/CNPJ (exact match).
person_name_containsstringnoFilter by person name (partial search, case-insensitive).
statusstringnoFilter by plan status. Values: draft, active, archived.
plan_typestringnoFilter by plan type. Values: standard, custom, promotional.
visibilitystringnoFilter by visibility. Values: public, private.
plan_group_idstringnoFilter by plan group.
company_idstringnoFilter by issuing company.
billing_account_idstringnoFilter custom plans associated with a billing account.
scoped_billing_account_idstringnoReturns plans available for the given billing account (standard + account-specific custom plans).
exclude_custom_plansstringnoWhen true, excludes custom plan type from the results. Values: true, false.
default_billing_cyclestringnoFilter by the plan default billing cycle. Values: monthly, quarterly, semiannual, annual.
external_idstringnoFilter by the plan external identifier.
slugstringnoFilter by the plan slug.
searchstringnoFree-text search.
created_afterstringnoStart of creation date range (YYYY-MM-DD).
created_beforestringnoEnd of creation date range (YYYY-MM-DD).
updated_afterstringnoStart of update date range (YYYY-MM-DD).
updated_beforestringnoEnd of update date range (YYYY-MM-DD).

Responses

HTTPDescription
200Paginated list of plans.
404Resource not found in the current organization.

plans create​

Create plan

kobana billing plans create [OPTIONS]

POST /v1/plans

Creates a plan for the authenticated organization.

Request body

NameTypeRequiredDescription
namestringyes
slugstringyesLowercase letters, digits and hyphens only.
external_idstringnoIdentifier in your external system, for idempotency/sync.
company_idstring (uuid)no
plan_group_idstring (uuid)no
descriptionstringno
statusstringnoValues: draft, active, archived.
plan_typestringnoDefault: standard. Values: standard, custom, promotional.
billing_account_idstring (uuid)no
visibilitystringnoDefault: public. Values: public, private.
featuresarray<string>no
limitsobjectno
trial_period_daysintegerno
default_billing_cyclestringnoValues: monthly, quarterly, semiannual, annual.
available_billing_cyclesarray<string>no
itemsarray<object>no
custom_metadataobjectnoFree-form custom metadata (object).

More fields and nested objects: kobana schema billing.plans.create.

Responses

HTTPDescription
201Plan created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

plans update​

Upsert plan

kobana billing plans update [OPTIONS]

PUT /v1/plans

Takes the same body as POST, plus id and public_id, and dedups on id, public_id, external_id and the resource's natural keys, in that order, stopping at the first key that finds a record. A match is updated and returns 200; otherwise the record is created and returns 201. The POST's required fields are required only when no record is found, and updates are partial: absent fields keep their stored value.

Request body

NameTypeRequiredDescription
external_idstringnoIdentifier in your external system, for idempotency/sync.
company_idstring (uuid)no
plan_group_idstring (uuid)no
namestringno
slugstringnoLowercase letters, digits and hyphens only.
descriptionstringno
statusstringnoValues: draft, active, archived.
plan_typestringnoDefault: standard. Values: standard, custom, promotional.
billing_account_idstring (uuid)no
visibilitystringnoDefault: public. Values: public, private.
featuresarray<string>no
limitsobjectno
trial_period_daysintegerno
default_billing_cyclestringnoValues: monthly, quarterly, semiannual, annual.
available_billing_cyclesarray<string>no
itemsarray<object>no
custom_metadataobjectnoFree-form custom metadata (object).
idstring (uuid)noRecord UUID. Used only to locate it — never written.
public_idstring (uuid)noPublic UUID of the record, used to locate it.

More fields and nested objects: kobana schema billing.plans.update.

Responses

HTTPDescription
200Record updated.
201Record created.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

plans bulk-archive​

Bulk archive plans

kobana billing plans bulk-archive [OPTIONS]

POST /v1/plans/bulk-archive

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yesList of plan UUIDs. Minimum 1.

More fields and nested objects: kobana schema billing.plans.bulk-archive.

Responses

HTTPDescription
200Bulk archive summary.
404Resource not found in the current organization.
422Request body failed validation.

plans bulk-move-group​

Bulk move plans to another group

kobana billing plans bulk-move-group [OPTIONS]

POST /v1/plans/bulk-move-group

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yes
plan_group_idstring (uuid)yesTarget group UUID. Use null to remove the grouping.

More fields and nested objects: kobana schema billing.plans.bulk-move-group.

Responses

HTTPDescription
200Bulk move summary.
404Resource not found in the current organization.
422Request body failed validation.

plans get​

Get plan

kobana billing plans get [ID] [OPTIONS]

GET /v1/plans/{id}

Path arguments: id

Responses

HTTPDescription
200Plan detail.
404Resource not found in the current organization.

plans delete​

Delete plan

kobana billing plans delete [ID] [OPTIONS]

DELETE /v1/plans/{id}

Deletes the plan (soft delete: deleted_at — it disappears from every read; plan-change rules that cite it are removed). Requires the delete access level. Answers 422 while a subscription on the plan is not canceled. Until October 2026 this route archived the plan, or deleted a draft with ?hard=true (the parameter is gone) — archiving is POST /v1/plans/{id}/archive, reversible.

Path arguments: id

Responses

HTTPDescription
200Plan deleted.
404Resource not found in the current organization.
422Request body failed validation.

plans archive​

Archive plan

kobana billing plans archive [ID] [OPTIONS]

POST /v1/plans/{id}/archive

Archives the plan: it stays listed and can be restored, but takes no new subscriptions; existing ones keep billing. Answers 422 while active subscriptions are on the plan. Requires the write access level.

Path arguments: id

Responses

HTTPDescription
200Plan archived.
404Resource not found in the current organization.
422Request body failed validation.

plans duplicate​

Duplicate plan

kobana billing plans duplicate [ID] [OPTIONS]

POST /v1/plans/{id}/duplicate

Creates a copy of the plan (including its items) in draft state.

Path arguments: id

Responses

HTTPDescription
201Plan duplicated.
404Resource not found in the current organization.