Skip to main content

Billing Categories

A category groups billing products in the store. Each category is tied to a nest, and optionally to one egg. When no egg is set, customers pick an egg from the nest at checkout.

The category object​

AttributeTypeDescription
idintegerCategory ID. Used in the URL.
uuidstringCategory UUID. Products refer to their category by this value (category_uuid).
namestringDisplay name.
iconstring or nullIcon URL or value.
descriptionstring or nullDescription.
visiblebooleanWhether the category is visible in the store.
nest_idintegerThe nest servers are created from.
egg_idinteger or nullThe egg servers are created from, or null if the customer chooses.
created_at, updated_atstringISO 8601 timestamps.

Includes​

IncludeDescription
productsAll of the category's products (those whose category_uuid is the category's uuid), as a list of product objects. Not paginated.

See includes.

List categories​

GET /api/application/billing/categories

Admin permission: billing.read

Returns a paginated list of categories.

curl "https://panel.example.com/api/application/billing/categories?per_page=50" \
-H "Authorization: Bearer $API_KEY" \
-H "Accept: application/json"

Query parameters​

ParameterTypeRequiredDescription
per_pageintegerNoResults per page, 1 to 100. Default 20. See pagination.
pageintegerNoPage number.
filter[id], filter[name]stringNoPartial match on the field. See filtering and sorting.
sortstringNoOne of id, name, created_at, visible, optionally prefixed with -.
includestringNoproducts.

Response​

200 OK

{
"object": "list",
"data": [
{
"object": "category",
"attributes": {
"id": 1,
"uuid": "6f1c1b7e-3f51-4a0e-9a62-0f0b4d7f2c11",
"name": "Minecraft",
"icon": "https://example.com/minecraft.png",
"description": "Minecraft servers",
"visible": true,
"nest_id": 1,
"egg_id": 3,
"created_at": "2026-11-01T09:00:00+00:00",
"updated_at": "2026-11-01T09:00:00+00:00"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 50,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}

Create a category​

POST /api/application/billing/categories

Admin permission: billing.categories-create

Creates a category. A new UUID is generated for it.

Request body​

JSON body. Note that eggId and nestId are camelCase.

FieldTypeRequiredDescription
namestringYes3 to 191 characters.
iconstringNoAt most 300 characters.
descriptionstringNoAt most 300 characters.
visiblebooleanNoWhether the category is shown in the store.
eggIdintegerOne of eggId or nestIdAn existing egg. When set, the category's nest is taken from this egg and nestId is ignored.
nestIdintegerIf eggId is not setAn existing nest. Used only when eggId is not set; the category then has no egg.

Response​

200 OK

{
"object": "category",
"attributes": {
"id": 2,
"uuid": "1e7b9d2a-4c3f-4f6e-8a0b-5d2c7e9f1a3b",
"name": "Rust",
"icon": null,
"description": "Rust servers",
"visible": true,
"nest_id": 4,
"egg_id": null,
"created_at": "2026-11-26T14:10:00+00:00",
"updated_at": "2026-11-26T14:10:00+00:00"
}
}

Logs the activity event admin:billing:categories:create.

Errors​

StatusWhen
422A field fails the rules above, including when neither eggId nor nestId is sent, or either one does not exist.

Get a category​

GET /api/application/billing/categories/{category}

Admin permission: billing.read

{category} is the category's numeric id.

Query parameters​

ParameterTypeRequiredDescription
includestringNoproducts.

Response​

200 OK. A single category object, as in Create a category.

Update a category​

PATCH /api/application/billing/categories/{category}

Admin permission: billing.categories-update

Updates a category. Although the method is PATCH, every field is overwritten: a field you leave out is set to null. Send the full set of fields each time.

Request body​

The same fields as Create a category, with the same rules. eggId/nestId are resolved the same way, so one of them must be sent.

Response​

204 No Content

Logs the activity event admin:billing:categories:update, with the request body as the new_data property.

Errors​

Same as Create a category.

Delete a category​

DELETE /api/application/billing/categories/{category}

Admin permission: billing.categories-delete

Deletes the category and all of its products, in one database transaction.

Response​

204 No Content

Logs the activity event admin:billing:categories:delete.