API reference
9 operations in ticket-costs. Raw spec: openapi.json.
GET
/api/v1/invoice-candidatesGET /api/invoice-candidates — every billable, not-yet-billed cost line and expense in the org, oldest first. The invoicing run consumes rows by writing `invoice_line_id` through the costs module's marker.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
GET
/api/v1/tickets/{id}/cost-linesGET /api/tickets/{id}/cost-lines
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/tickets/{id}/cost-linesPOST /api/tickets/{id}/cost-lines — add a money line (parts/flat/other).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
CreateCostLineRequest
Responses
| Status | Description |
|---|---|
200 | |
404 | ticket not found in scope |
409 | idempotency key reused |
422 | invalid quantity/currency |
Security: bearer
PATCH
/api/v1/tickets/{id}/cost-lines/{line_id}PATCH /api/tickets/{id}/cost-lines/{line_id} — edit an unbilled line.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
line_id | path | string | Yes |
Request body
UpdateCostLineRequest
Responses
| Status | Description |
|---|---|
200 | |
404 | line not found in scope |
409 | already billed, version conflict, or idempotency key reused |
Security: bearer
DELETE
/api/v1/tickets/{id}/cost-lines/{line_id}DELETE /api/tickets/{id}/cost-lines/{line_id} — remove an unbilled line.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
line_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
404 | line not found in scope |
409 | already billed |
Security: bearer
GET
/api/v1/tickets/{id}/expensesGET /api/tickets/{id}/expenses — the ticket's expense entries.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/tickets/{id}/expensesPOST /api/tickets/{id}/expenses — record an expense entry.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
CreateExpenseRequest
Responses
| Status | Description |
|---|---|
200 | |
404 | ticket not found in scope |
409 | idempotency key reused |
422 | invalid amount/currency |
Security: bearer
PATCH
/api/v1/tickets/{id}/expenses/{expense_id}PATCH /api/tickets/{id}/expenses/{expense_id} — edit an unbilled expense.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
expense_id | path | string | Yes |
Request body
UpdateExpenseRequest
Responses
| Status | Description |
|---|---|
200 | |
404 | expense not found in scope |
409 | already billed, version conflict, or idempotency key reused |
Security: bearer
DELETE
/api/v1/tickets/{id}/expenses/{expense_id}DELETE /api/tickets/{id}/expenses/{expense_id} — remove an unbilled expense.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
expense_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
404 | expense not found in scope |
409 | already billed |
Security: bearer