# \CategoriesApi
All URIs are relative to *https://api.ynab.com/v1*
[**get_categories**](CategoriesApi.md#get_categories) | **GET** /budgets/{budget_id}/categories | List categories
[**get_category_by_id**](CategoriesApi.md#get_category_by_id) | **GET** /budgets/{budget_id}/categories/{category_id} | Single category
[**get_month_category_by_id**](CategoriesApi.md#get_month_category_by_id) | **GET** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month
[**update_category**](CategoriesApi.md#update_category) | **PATCH** /budgets/{budget_id}/categories/{category_id} | Update a category
[**update_month_category**](CategoriesApi.md#update_month_category) | **PATCH** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month
## get_categories
> models::CategoriesResponse get_categories(budget_id, last_knowledge_of_server)
List categories
Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
### Parameters
**budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | [required] |
**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | |
### Return type
[**models::CategoriesResponse**](CategoriesResponse.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_category_by_id
> models::CategoryResponse get_category_by_id(budget_id, category_id)
Single category
Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
### Parameters
**budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | [required] |
**category_id** | **String** | The id of the category | [required] |
### Return type
[**models::CategoryResponse**](CategoryResponse.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_month_category_by_id
> models::CategoryResponse get_month_category_by_id(budget_id, month, category_id)
Single category for a specific budget month
Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
### Parameters
**budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | [required] |
**month** | **String** | The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | [required] |
**category_id** | **String** | The id of the category | [required] |
### Return type
[**models::CategoryResponse**](CategoryResponse.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_category
> models::SaveCategoryResponse update_category(budget_id, category_id, data)
Update a category
Update a category
### Parameters
**budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | [required] |
**category_id** | **String** | The id of the category | [required] |
**data** | [**PatchCategoryWrapper**](PatchCategoryWrapper.md) | The category to update | [required] |
### Return type
[**models::SaveCategoryResponse**](SaveCategoryResponse.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_month_category
> models::SaveCategoryResponse update_month_category(budget_id, month, category_id, data)
Update a category for a specific month
Update a category for a specific month. Only `budgeted` amount can be updated.
### Parameters
**budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | [required] |
**month** | **String** | The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | [required] |
**category_id** | **String** | The id of the category | [required] |
**data** | [**PatchMonthCategoryWrapper**](PatchMonthCategoryWrapper.md) | The category to update. Only `budgeted` amount can be updated and any other fields specified will be ignored. | [required] |
### Return type
[**models::SaveCategoryResponse**](SaveCategoryResponse.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)