Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Cost Rates

Cost Rate represents the hourly cost for an account member, specified in a specific currency. A cost rate with the same currency as the account default currency is called the default cost rate.

Get Cost Rates

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.

Request
query Parameters
created_after
string <date-time>

Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

created_before
string <date-time>

Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

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.
only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "created_at:asc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: created_at:asc and created_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
updated_after
string <date-time>

Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

updated_before
string <date-time>

Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

Responses
200

A list of Cost Rates have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/cost_rates
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "cost_rates": {
    },
  • "account_memberships": {
    }
}

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.

Request
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 Body schema: application/json
required
object
Array of objects

Multiple cost rates and their attributes in an array.

Responses
200

Cost Rate has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/cost_rates
Request samples
application/json
{
  • "cost_rate": {
    },
  • "cost_rates": [
    ]
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "cost_rates": {
    },
  • "account_memberships": {
    }
}

Updating an existing Cost Rate

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.

Request
path Parameters
id
required
integer

The ID of the Model.

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 Body schema: application/json
required
object
amount_in_subunits
required
integer <int32>

The cost amount, in subunits of the currency (for example, cents for US dollars).

Responses
200

Cost Rate has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/cost_rates/{id}
Request samples
application/json
{
  • "cost_rate": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "cost_rates": {
    },
  • "account_memberships": {
    }
}

Deleting an existing Cost Rate

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Cost Rate has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/cost_rates/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}