Available in: All Plans
User Permissions Needed: Account Administrator
Overview
Kantata OX has six default expense categories: Entertainment, Food, Lodging, Mileage, Travel, and Other. You can create and delete expense categories via the Kantata OX API. You must be an Account Administrator to modify expense categories.
Before you begin, download and install an API client. We recommend Postman.
To use the API to create or delete expense categories, you’ll first need an OAuth token.
How to Obtain an OAuth Token
- In Kantata OX, select Settings > API from the left navigation.
- On the API Settings page, click View your Account's Registered Applications.
- At the bottom of the Oauth Applications page, click Register a new Mavenlink Application.
- Enter an Application Name. We recommend a name that makes it clear who the application belongs to and what it’s used for.
- In Application Callback URI, enter
https://localhost
. - Click Save. The application details page opens.
- In the Your OAuth Token section, click Show your OAuth Token.
- Copy the value that appears and save it for later.
WARNING
OAuth tokens allow you to access and change data in Kantata OX via the API. You should treat OAuth tokens like passwords and never share them with anyone.
How to Create an Expense Category
- In Postman, select New from the sidebar.
- In the modal that opens, select HTTP Request. A new tab opens within the center pane.
- In the request tab, change the method type from GET to POST using the drop-down menu.
- Enter
https://api.mavenlink.com/api/v1/expense_categories
as the request URL. - Select the Authorization tab which appears below the method and request URL.
- In the Type drop-down menu, select Bearer Token.
- In the Token field, paste the OAuth token you copied earlier.
- Select the Body tab, then select raw.
- In the type drop-down menu, select JSON.
- In the text area, paste the following JSON code, making sure to replace category_name_here with your actual desired name.
{
"expense_category":
{
"name": "category_name_here"
}
} - Click Send.
- If the creation is successful, you’ll see a 200 OK status in the bottom pane. You’ll also see JSON containing details about the new category in the Body tab.
- To see the new expense category in Kantata OX, go to Time & Expense > Expenses and open the Category drop-down menu.
How to Delete an Expense Category
Deleting an expense category prevents people from logging expenses against the category in the future. When you delete an expense category, expenses previously logged against the category are not affected.
- In Postman, select New from the sidebar.
- In the modal that opens, select HTTP Request. A new tab opens within the center pane.
- Enter
https://api.mavenlink.com/api/v1/expense_categories
as the request URL. - Select the Authorization tab which appears below the method and request URL.
- In the Type drop-down menu, select Bearer Token.
- In the Token field, paste the OAuth token you copied earlier.
- Click Send. In the Body tab in the bottom pane, details about the expense categories on your account will appear.
- Locate the expense category you want to delete, then copy its
id
. - In the request tab, change the method type from GET to DELETE using the drop-down menu.
- At the end of the request URL, add
/
then paste the ID you copied. - Click Send.
- If the expense category is deleted successfully, you’ll see a 204 No Content status in the bottom pane and no response body.
- To confirm the expense category was deleted, go to Time & Expense > Expenses in Kantata OX and open the Category drop-down menu.
Related Articles