billing-rates
5 endpoints
get /orgs/{id}/billing-settings
Get the org's billing settings
Requires authentication
Admin only. The org's currency plus the org-scope default rungs both rate ladders fall back to.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Organization id |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
put /orgs/{id}/billing-settings
Update the org's billing settings
Requires authentication
Admin only. Sets the org currency and/or the org-scope default rates. Existing time entries keep their snapshotted rate and currency.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Organization id |
Request body: dto.UpdateOrgBillingSettingsRequest
| Name | Type | Required | Description |
|---|---|---|---|
| currency | string | no | |
| defaultBillableCents | integer | no | |
| defaultCostCents | integer | no |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 422 Unprocessable Entity · apimodel.ErrorEnvelope
get /projects/{id}/billing-rates
List the billing rates that apply to a project
Requires authentication
Admin only. Returns every rung that can resolve for this project: the org-wide and per-person defaults, the project's own rungs, and the task rungs of its tasks.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
put /projects/{id}/billing-rates
Set one billing rate slot
Requires authentication
Admin only. Writes the (kind, scope, target) slot — a repeat call updates the amount instead of adding a second rung. Existing time entries keep their snapshotted rate.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
Request body: dto.UpsertBillingRateRequest
| Name | Type | Required | Description |
|---|---|---|---|
| kind | domain.RateKind | no | |
| projectId | integer | no | |
| rateCents | integer | no | |
| scope | domain.RateScope | no | |
| taskId | integer | no | |
| userId | integer | no |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 422 Unprocessable Entity · apimodel.ErrorEnvelope
delete /projects/{id}/billing-rates/{rateId}
Delete a billing rate
Requires authentication
Admin only. Removing a rung changes what FUTURE entries resolve to; entries already snapshotted keep their rate.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
| rateId | path | integer | yes | Billing rate id |
Responses
- 204 No Content
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 404 Not Found · apimodel.ErrorEnvelope