Skip to main content

kobana billing plan-groups

Commands of kobana billing plan-groups. Every global option (Global options) applies here.

CommandHTTPDescription
plan-groups listGET /v1/plan_groupsList plan groups
plan-groups createPOST /v1/plan_groupsCreate plan group
plan-groups updatePUT /v1/plan_groupsUpsert plan group
plan-groups reorderPOST /v1/plan_groups/reorderReorder plan groups
plan-groups getGET /v1/plan_groups/{id}Get plan group
plan-groups deleteDELETE /v1/plan_groups/{id}Remove plan group
plan-groups archivePOST /v1/plan_groups/{id}/archiveArchive plan group

plan-groups list​

List plan groups

kobana billing plan-groups list [OPTIONS]

GET /v1/plan_groups

Returns all of the current organization's plan groups ordered by display_order.

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.
searchstringnoFree-text search by name or slug.
include_archivedstringnoWhen true, includes archived groups in the list. Values: true, false.
company_idstringnoFilter plan groups by the given company (UUID).
created_afterstringnoStart of creation date range (YYYY-MM-DD).
created_beforestringnoEnd of creation date range (YYYY-MM-DD).
archived_afterstringnoReturn only groups archived on or after this date (YYYY-MM-DD).
archived_beforestringnoReturn only groups archived on or before this date (YYYY-MM-DD).

Responses

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

plan-groups create​

Create plan group

kobana billing plan-groups create [OPTIONS]

POST /v1/plan_groups

Request body

NameTypeRequiredDescription
namestringyesPlan group name.
slugstringnoReadable identifier (optional). Auto-generated when omitted.
external_idstringnoIdentifier in your external system, for idempotency/sync.
custom_metadataobjectnoArbitrary client-defined metadata (key/value).

More fields and nested objects: kobana schema billing.plan-groups.create.

Responses

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

plan-groups update​

Upsert plan group

kobana billing plan-groups update [OPTIONS]

PUT /v1/plan_groups

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
namestringnoPlan group name.
slugstringnoReadable identifier (optional). Auto-generated when omitted.
external_idstringnoIdentifier in your external system, for idempotency/sync.
custom_metadataobjectnoArbitrary client-defined metadata (key/value).
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.plan-groups.update.

Responses

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

plan-groups reorder​

Reorder plan groups

kobana billing plan-groups reorder [OPTIONS]

POST /v1/plan_groups/reorder

Updates each group display_order according to the order of the group_ids array. All groups must belong to the current organization.

Request body

NameTypeRequiredDescription
group_idsarray<string (uuid)>yesList of group UUIDs in the new display order. All must belong to the current organization.

More fields and nested objects: kobana schema billing.plan-groups.reorder.

Responses

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

plan-groups get​

Get plan group

kobana billing plan-groups get [ID] [OPTIONS]

GET /v1/plan_groups/{id}

Path arguments: id

Responses

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

plan-groups delete​

Remove plan group

kobana billing plan-groups delete [ID] [OPTIONS]

DELETE /v1/plan_groups/{id}

Path arguments: id

Responses

HTTPDescription
200Removal confirmation.
404Resource not found in the current organization.

plan-groups archive​

Archive plan group

kobana billing plan-groups archive [ID] [OPTIONS]

POST /v1/plan_groups/{id}/archive

Marks the group as archived by setting archived_at. Archived groups are hidden from default listings.

Path arguments: id

Responses

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