# \CustomerApi
All URIs are relative to *http://localhost*
[**delete_delete_customer**](CustomerApi.md#delete_delete_customer) | **DELETE** /api/customers/{id} | Delete an existing customer
[**delete_delete_customer_rate**](CustomerApi.md#delete_delete_customer_rate) | **DELETE** /api/customers/{id}/rates/{rateId} | Deletes one rate for a customer
[**get_get_customer**](CustomerApi.md#get_get_customer) | **GET** /api/customers/{id} | Returns one customer
[**get_get_customer_rates**](CustomerApi.md#get_get_customer_rates) | **GET** /api/customers/{id}/rates | Returns a collection of all rates for one customer
[**get_get_customers**](CustomerApi.md#get_get_customers) | **GET** /api/customers | Returns a collection of customers (which are visible to the user)
[**patch_app_api_customer_meta**](CustomerApi.md#patch_app_api_customer_meta) | **PATCH** /api/customers/{id}/meta | Sets the value of a meta-field for an existing customer
[**patch_patch_customer**](CustomerApi.md#patch_patch_customer) | **PATCH** /api/customers/{id} | Update an existing customer
[**post_post_customer**](CustomerApi.md#post_post_customer) | **POST** /api/customers | Creates a new customer
[**post_post_customer_rate**](CustomerApi.md#post_post_customer_rate) | **POST** /api/customers/{id}/rates | Adds a new rate to a customer
## delete_delete_customer
> delete_delete_customer(id)
Delete an existing customer
[DANGER] This will also delete ALL linked projects, project activities and timesheets. Maybe use `PATCH` instead and mark it as inactive with `visible=false`?
### Parameters
**id** | **String** | Customer ID to delete | [required] |
### Return type
(empty response body)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
## delete_delete_customer_rate
> delete_delete_customer_rate(id, rate_id)
Deletes one rate for a customer
### Parameters
**id** | **String** | The customer whose rate will be removed | [required] |
**rate_id** | **String** | The rate to remove | [required] |
### Return type
(empty response body)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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_get_customer
> models::CustomerEntity get_get_customer(id)
Returns one customer
### Parameters
**id** | **String** | | [required] |
### Return type
[**models::CustomerEntity**](CustomerEntity.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_get_customer_rates
> Vec<models::CustomerRate> get_get_customer_rates(id)
Returns a collection of all rates for one customer
### Parameters
**id** | **String** | The customer whose rates will be returned | [required] |
### Return type
[**Vec<models::CustomerRate>**](CustomerRate.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_get_customers
> Vec<models::CustomerCollection> get_get_customers(visible, order, order_by, term)
Returns a collection of customers (which are visible to the user)
### Parameters
**visible** | Option<**String**> | Visibility status to filter customers: 1=visible, 2=hidden, 3=both | |[default to 1]
**order** | Option<**String**> | The result order. Allowed values: ASC, DESC (default: ASC) | |
**order_by** | Option<**String**> | The field by which results will be ordered. Allowed values: id, name (default: name) | |
**term** | Option<**String**> | Free search term | |
### Return type
[**Vec<models::CustomerCollection>**](CustomerCollection.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)
## patch_app_api_customer_meta
> models::CustomerEntity patch_app_api_customer_meta(id, patch_kimaiplugin_expenses_api_expense_meta_request)
Sets the value of a meta-field for an existing customer
### Parameters
**id** | **String** | Customer record ID to set the meta-field value for | [required] |
**patch_kimaiplugin_expenses_api_expense_meta_request** | Option<[**PatchKimaipluginExpensesApiExpenseMetaRequest**](PatchKimaipluginExpensesApiExpenseMetaRequest.md)> | | |
### Return type
[**models::CustomerEntity**](CustomerEntity.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)
## patch_patch_customer
> models::CustomerEntity patch_patch_customer(id, customer_edit_form)
Update an existing customer
Update an existing customer, you can pass all or just a subset of all attributes
### Parameters
**id** | **String** | Customer ID to update | [required] |
**customer_edit_form** | [**CustomerEditForm**](CustomerEditForm.md) | | [required] |
### Return type
[**models::CustomerEntity**](CustomerEntity.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)
## post_post_customer
> models::CustomerEntity post_post_customer(customer_edit_form)
Creates a new customer
Creates a new customer and returns it afterwards
### Parameters
**customer_edit_form** | [**CustomerEditForm**](CustomerEditForm.md) | | [required] |
### Return type
[**models::CustomerEntity**](CustomerEntity.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)
## post_post_customer_rate
> models::CustomerRate post_post_customer_rate(id, customer_rate_form)
Adds a new rate to a customer
### Parameters
**id** | **String** | The customer to add the rate for | [required] |
**customer_rate_form** | [**CustomerRateForm**](CustomerRateForm.md) | | [required] |
### Return type
[**models::CustomerRate**](CustomerRate.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)