Skip to main content

kobana billing product-groups

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

CommandHTTPDescription
product-groups reorder createPOST /v1/product_groups/reorderReorder product groups
product-groups reorder updatePUT /v1/product_groups/reorderReorder product groups (PUT alias)
product-groups listGET /v1/product_groupsList product groups
product-groups createPOST /v1/product_groupsCreate product group
product-groups updatePUT /v1/product_groupsUpsert product group
product-groups getGET /v1/product_groups/{id}Get product group
product-groups deleteDELETE /v1/product_groups/{id}Remove product group
product-groups archivePOST /v1/product_groups/{id}/archiveArchive product group
product-groups unarchivePOST /v1/product_groups/{id}/unarchiveUnarchive product group

product-groups reorder create​

Reorder product groups

kobana billing product-groups reorder create [OPTIONS]

POST /v1/product_groups/reorder

Updates the display order of product groups. The group_ids array defines the new order — index 0 becomes the first group.

Request body

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

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

Responses

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

product-groups reorder update​

Reorder product groups (PUT alias)

kobana billing product-groups reorder update [OPTIONS]

PUT /v1/product_groups/reorder

Alias PUT for POST /product_groups/reorder. Same contract.

Request body

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

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

Responses

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

product-groups list​

List product groups

kobana billing product-groups list [OPTIONS]

GET /v1/product_groups

Returns a paginated list of the current organization's product groups.

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 group name.
company_idstringnoFilter by associated issuing company.
include_archivedboolean,nullnoWhen true, includes archived groups in the listing. Default: false.
created_afterstringnoStart of creation date range (YYYY-MM-DD).
created_beforestringnoEnd of creation date range (YYYY-MM-DD).
archived_afterstringnoReturns groups archived from this date onwards (ISO 8601).
archived_beforestringnoReturns groups archived up to this date (ISO 8601).

Responses

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

product-groups create​

Create product group

kobana billing product-groups create [OPTIONS]

POST /v1/product_groups

Request body

NameTypeRequiredDescription
namestringyesGroup name.
slugstringnoGroup slug. Generated from the name when omitted.
visibilitystringnoVisibility in the customer portal. Default: public. Values: public, private.
company_idstring (uuid)no
proposal_template_idstring (uuid)no
service_item_idstring (uuid)no
external_idstringnoIdentifier in your external system, for idempotency/sync.
custom_metadataobjectnoArbitrary client-defined metadata (key/value).

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

Responses

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

product-groups update​

Upsert product group

kobana billing product-groups update [OPTIONS]

PUT /v1/product_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
namestringnoGroup name.
slugstringnoGroup slug. Generated from the name when omitted.
visibilitystringnoVisibility in the customer portal. Default: public. Values: public, private.
company_idstring (uuid)no
proposal_template_idstring (uuid)no
service_item_idstring (uuid)no
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.product-groups.update.

Responses

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

product-groups get​

Get product group

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

GET /v1/product_groups/{id}

Path arguments: id

Responses

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

product-groups delete​

Remove product group

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

DELETE /v1/product_groups/{id}

Path arguments: id

Responses

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

product-groups archive​

Archive product group

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

POST /v1/product_groups/{id}/archive

Path arguments: id

Responses

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

product-groups unarchive​

Unarchive product group

kobana billing product-groups unarchive [ID] [OPTIONS]

POST /v1/product_groups/{id}/unarchive

Brings an archived product group back into the catalog. Requires the write access level. Replaces DELETE /v1/product_groups/{id}/archive, which was removed: a DELETE is always a deletion.

Path arguments: id

Responses

HTTPDescription
200Product group unarchived.
404Resource not found in the current organization.