billing-items
4 endpoints
get /projects/{id}/billing-items
List a project's billing items
Requires authentication
Admin only. Milestones, one-off charges, and per-task fixed prices, in display order.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
post /projects/{id}/billing-items
Add a billing item to a project
Requires authentication
Admin only. Kind "task_fixed" requires a taskId; the other kinds forbid one.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
Request body: dto.CreateBillingItemRequest
| Name | Type | Required | Description |
|---|---|---|---|
| amountCents | integer | no | |
| kind | domain.BillingItemKind | no | |
| name | string | no | |
| sortOrder | integer | no | |
| status | domain.BillingItemStatus | no | |
| taskId | integer | no | TaskID is required for kind "task_fixed" and forbidden otherwise. |
Responses
- 201 Created · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 422 Unprocessable Entity · apimodel.ErrorEnvelope
patch /projects/{id}/billing-items/{itemId}
Edit a billing item
Requires authentication
Admin only. An invoiced item returns 409 — changing one after invoicing is a credit note, not an edit.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
| itemId | path | integer | yes | Billing item id |
Request body: dto.UpdateBillingItemRequest
| Name | Type | Required | Description |
|---|---|---|---|
| amountCents | integer | no | |
| name | string | no | |
| sortOrder | integer | no | |
| status | domain.BillingItemStatus | no |
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 404 Not Found · apimodel.ErrorEnvelope
- 409 Conflict · apimodel.ErrorEnvelope
delete /projects/{id}/billing-items/{itemId}
Delete a billing item
Requires authentication
Admin only. An invoiced item returns 409.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer | yes | Project id |
| itemId | path | integer | yes | Billing item id |
Responses
- 204 No Content
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 404 Not Found · apimodel.ErrorEnvelope
- 409 Conflict · apimodel.ErrorEnvelope