Skip to main content
POST
/
expense-categories
Create an expense category
curl --request POST \
  --url https://www.ruddr.io/api/workspace/expense-categories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "invoiceItemId": "<string>",
  "isActive": true,
  "requireAttendees": true,
  "requireReceipt": true,
  "requireNotes": true,
  "unitName": "<string>",
  "unitAmount": 123,
  "code": "<string>"
}
'
{
  "id": "7e3f9a12-c4b8-4d6e-b021-8f5a3c9e7d14",
  "name": "Mileage",
  "isActive": true,
  "requireAttendees": false,
  "requireReceipt": false,
  "requireNotes": false,
  "unitName": "mile",
  "unitAmount": 0.655,
  "code": "MILE-001",
  "createdAt": "2024-06-10T14:22:35.418Z",
  "invoiceItem": {
    "id": "b412b1e4-e618-4e61-b9d3-b6365d31ce1d",
    "name": "Expense"
  }
}
A category assigned to expense items. Can also be used to build expense budgets for projects.

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

The name of the expense category.

invoiceItemId
string
required

The ID of the invoice item to assign to this expense category. The invoice item must be of type expense.

isActive
boolean

Whether the expense category is active. Defaults to true if not provided.

requireAttendees
boolean

Whether expenses using this category require attendees.

requireReceipt
boolean

Whether expenses using this category require a receipt.

requireNotes
boolean

Whether expenses using this category require notes.

unitName
string

For unit-based expense categories, the label of the unit (e.g., "mile"). Must be provided together with unitAmount.

unitAmount
number

For unit-based expense categories, the amount per unit (e.g., 0.655). Must be provided together with unitName.

code
string

The code of the expense category.

Response

200

id
string

The unique identifier for the object.

name
string

The name of the expense category.

isActive
boolean

Whether the expense category is active.

requireAttendees
boolean

Whether expenses using this category require attendees.

requireReceipt
boolean

Whether expenses using this category require a receipt.

requireNotes
boolean

Whether expenses using this category require notes.

unitName
string | null

For unit-based expense categories, the label of the unit (e.g., "mile"). null if the category is not unit-based.

unitAmount
number | null

For unit-based expense categories, the amount per unit (e.g., 0.655). null if the category is not unit-based.

code
string | null

The code of the expense category.

createdAt
string<date-time>

The timestamp when the object was created.

invoiceItem
object

The invoice item associated with this expense category.