# Creating one or many Cost Rates

Creates a new cost rate for a specified account membership and currency. If a cost rate already exists
for the specified account membership and currency, it will be overridden, effectively making this an
update request as well. Up to 100 cost rates can be created or updated at once.

Note: Updating a cost rate will set the cost rate for future work. Existing time entries will not be affected.


This endpoint returns structured Cost Rate objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the cost_rates top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /cost_rates
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- account_membership (AccountMembership) - The account membership associated with the cost rate.

## Request fields (application/json):

  - `cost_rate` (object)

  - `cost_rate.account_membership_id` (integer, required)
    The ID of the account membership associated to the cost rate.

  - `cost_rate.currency` (string, required)
    The ISO currency code for the cost rate currency.

  - `cost_rate.amount_in_subunits` (integer, required)
    The cost amount, in subunits of the currency (for example, cents for US dollars).

  - `cost_rates` (array)
    Multiple cost rates and their attributes in an array.

  - `cost_rates.account_membership_id` (integer, required)
    The ID of the account membership associated to the cost rate.

  - `cost_rates.currency` (string, required)
    The ISO currency code for the cost rate currency.

  - `cost_rates.amount_in_subunits` (integer, required)
    The cost amount, in subunits of the currency (for example, cents for US dollars).

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `cost_rates` (object)

  - `account_memberships` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


