For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trebellar Platform
DocsGuidesAPI Reference
DocsGuidesAPI Reference
  • API Reference
    • Introduction
  • API Resources
      • POSTAdd cost lines in batch
      • GETList normalized costs
      • DELDelete cost line
      • PATCHUpdate a cost line
      • POSTBind a cost line to an asset(s)
      • POSTUnbind a cost line to an asset(s)
      • GETList Cost Categories
      • GETGet Cost Category
      • DELDelete Cost Category
      • PATCHUpdate Cost Category
      • POSTAdd Cost Category
Trebellar Platform
LogoLogo
API ResourcesCosts

Add Cost Category

||View as Markdown|
POST
https://api.trebellar.app/api/v2/costs/categories/add
POST
/api/v2/costs/categories/add
1import { TrebellarApiClient } from "@trebellar/api-sdk";
2
3async function main() {
4 const client = new TrebellarApiClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.costs.addCostCategory({
8 costCategory: {
9 externalId: "string",
10 name: "string",
11 parentId: "string",
12 },
13 });
14}
15main();
1{
2 "data": {
3 "externalId": "string",
4 "name": "string",
5 "parentId": "string",
6 "id": "string",
7 "color": "string"
8 }
9}
Create a new cost category in the system.
Was this page helpful?
Previous

Update Cost Category

Next

List Coworking Reservations

Built with

Authentication

X-Trebellar-Api-Keystring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
costCategoryobjectRequired

Response

Cost category added successfully
dataobject

Errors

500
Internal Server Error