Variations
A variation changes a delivery project’s budget after it is sold. It can add deliverables, tasks and expense lines, and change the quantity, rate or lines of existing tasks. These endpoints read a variation, make a draft, and write its rows one at a time, through the same code as the variation page in Drum.
Submitting, approving and rejecting a variation stay in Drum. Through the API you make a draft and fill it in. Once it is approved or rejected, its rows cannot change.
To change the budget as it was sold, use Project budgets. The same pricing rules apply to both.
Money is integer cents, tax exclusive. You send cents in fields ending _cents. Results show money as an object: {"cents": 120000, "currency": "AUD", "formatted": "$1,200.00"}.
Endpoints
| Method and path | Does |
|---|---|
POST /api/v1/projects/:project_id/variations |
Makes a draft variation |
GET /api/v1/projects/:project_id/variations/:id |
Reads a variation with its rows |
POST, PATCH, DELETE .../variations/:variation_id/deliverables(/:id) |
A deliverable the variation adds |
POST, PATCH, DELETE .../variations/:variation_id/tasks(/:id) |
A task the variation adds |
POST, PATCH, DELETE .../variations/:variation_id/costs(/:id) |
An expense line the variation adds |
POST, PATCH, DELETE .../variations/:variation_id/task_changes(/:id) |
A change to an existing task |
POST, PATCH, DELETE .../variations/:variation_id/resource_changes(/:id) |
A change to an existing task’s resource lines |
POST, PATCH, DELETE .../variations/:variation_id/cost_changes(/:id) |
A change to an existing expense line |
... is /api/v1/projects/:project_id. Send the row’s fields at the top level of a JSON body. A PATCH changes only the keys you send. To find a variation’s id, read the project’s variations in Drum, or search for them with the MCP tool search_records (kind variation).
Which variations you can reach
The project must be a kept delivery project that the token’s user can read, and the variation one of its own that the user can read. Otherwise the answer is 404 with project_not_found or variation_not_found, the same as for an id that does not exist. A row of another variation answers 404 with the row’s code.
Permissions
| Endpoint | API permission | Drum role permission |
|---|---|---|
GET .../variations/:id |
api_read |
read_budgets, or a project role with view_budgets |
POST .../variations |
api_create |
create_budgets, or a project role with update_budgets |
Row POST, PATCH, DELETE |
api_create, api_update, api_delete |
update_budgets, or a project role with it. A rate card change on a deliverable also needs the budget permission |
A missing role permission answers 403 not_authorized.
Make a draft
POST /api/v1/projects/20488/variations
Content-Type: application/json
{"name": "Extra levels", "description": "Two more levels of documentation", "effective_date": "2026-11-16", "variation_scope": "external"}
| Field | Notes |
|---|---|
name |
Required |
description |
Optional |
effective_date |
yyyy-mm-dd |
variation_scope |
external (default) or internal. It cannot change later |
A status is not an input: the variation starts as a draft. Any other field, status included, answers 422 invalid_input. The answer is 201 with the variation, as GET gives it.
External and internal variations
- An external variation changes the client price. A project that sells its variations through an opportunity refuses one made here (
422 variation_opportunity_required). Make that variation in Drum, which also makes its opportunity. - An internal variation moves budget between existing lines and does not change the client price. It needs an account that shows contract values (
422 internal_variation_unsupported). It adds no deliverables or tasks (422 internal_variation_row_not_allowed) and cannot touch a time and materials deliverable (422 internal_variation_time_and_materials).
Read a variation
GET /api/v1/projects/20488/variations/731
{
"variation": {
"id": 731,
"project_id": 20488,
"name": "Extra levels",
"description": "Two more levels of documentation",
"status": "draft",
"variation_scope": "external",
"effective_date": "2026-11-16",
"locked": false,
"budget_change": {"cents": 480000, "currency": "AUD", "formatted": "$4,800.00"},
"contract_change": {"cents": 552000, "currency": "AUD", "formatted": "$5,520.00"}
},
"rows": [
{
"record_kind": "task_change",
"id": 2210,
"task_id": 81231,
"name": "Documentation",
"budget_type": "fixed",
"quantity_unit": "hour",
"quantity_delta": 24.0,
"rate": {"cents": 20000, "currency": "AUD", "formatted": "$200.00"},
"budget_before": {"cents": 960000, "currency": "AUD", "formatted": "$9,600.00"},
"budget_change": {"cents": 480000, "currency": "AUD", "formatted": "$4,800.00"},
"budget_after": {"cents": 1440000, "currency": "AUD", "formatted": "$14,400.00"}
}
],
"rows_page": {"count": 1, "offset": 0, "has_more": false}
}
The header:
| Field | Meaning |
|---|---|
status |
draft, submitted, approved, partially_approved or rejected |
locked |
true once the variation is approved or rejected. Its rows can no longer change |
budget_change |
The change to the internal budget. Needs the project’s budget money |
contract_change |
The change to the client price. Also needs the contract value right |
Rows come in pages of 50, in the order of the variation page: deliverables, tasks, task changes, resource changes, expense lines, expense changes. When rows_page.has_more is true, call again with row_offset set to offset plus count.
Each row has record_kind, id and its own fields:
record_kind |
Fields |
|---|---|
deliverable |
name, budget_type, rate_card_id, task_ids |
task |
deliverable_id, name, budget_type, quantity, quantity_unit, contingency_percent |
task_change |
task_id, name (the task’s), budget_type, quantity_unit, quantity_delta, rate |
resource_change |
task_id, resource_type_id, member_id, quantity_unit, baseline_quantity (the line before the variation), delta_quantity, delta_rate |
budget_cost |
task_id, name, cost_type_id, quantity, quantity_unit, rate, markup_percent |
cost_change |
budget_cost_id, variation_type, quantity_unit, quantity_delta, cost_type_id, rate |
With the budget money, each row also has budget_before, budget_change and budget_after. With the contract value right it has contract_change, and contract_before and contract_after where Drum can work them out. contingency_percent and markup_percent also need the contract value right. Empty fields are left out.
Variation rows
Every row write needs a variation that is a draft or submitted. An approved or rejected variation answers 409 variation_locked. A write locks the variation, so it cannot be approved halfway through the write, and the variation’s totals are worked out again in the same transaction.
Deliverables
POST .../deliverables adds a deliverable with one dynamic task, “New Variation Task”.
| Field | Notes |
|---|---|
name |
Default: New Variation Deliverable |
rate_card_id |
The deliverable’s card, from selectable_rate_cards of GET /api/v1/projects/:id |
from_project_template_deliverable_ids |
POST only: adds one deliverable for each project template deliverable, with its tasks and lines. Not with name |
description, position, project_phase_id, budget_type, client_cap |
PATCH only. client_cap works as on a project budget deliverable, and the approval keeps it |
reprice_resources |
PATCH only, with a new rate_card_id. Works as on a project budget deliverable |
Tasks
POST .../tasks needs deliverable_id: a deliverable of the project, or one the variation adds. A new task starts dynamic and pending, and joins the budget when the variation is approved.
| Field | Notes |
|---|---|
name |
Default: New Variation Task |
note, position |
As on a task |
budget_type |
fixed or dynamic |
quantity, quantity_unit, rate_cents |
A fixed task’s price |
contingency_percent |
A dynamic task only, 0 to 999.99. Sent with a switch to dynamic, it wins over the prefill |
Expense lines
POST .../costs needs task_id: a task the variation adds, or an existing task the variation already changes. Add a task change first, or the add answers 422 task_not_varied.
| Field | Notes |
|---|---|
name |
Default: New Expense |
cost_type_id |
Default: the account’s default cost type |
quantity, quantity_unit, billable_rate_cents |
The line’s cost |
markup_percent |
0 to 999.99. Default: the project’s default cost markup, else the account’s |
Task changes
POST .../task_changes needs task_id, an existing task of the project, or a task that an approved variation added. A task that this variation adds is changed as a task (422 task_in_variation), and one that another pending variation adds is not found. A task has one change in a variation: a second POST for the same task returns the change it has.
| Field | Notes |
|---|---|
quantity_delta |
The change to the task’s quantity. Can be negative |
rate_cents |
The task’s rate in the variation |
budget_type, quantity_unit |
Default: the task’s |
adjustment_cents |
An internal variation only: the positive amount the change moves. Zero is refused: delete the change instead. On an external variation it answers 422 adjustment_internal_only |
Deleting a task change also deletes the variation’s resource changes, expense lines and booking rows of that task.
Resource changes
POST .../resource_changes needs task_id. It adds a resource line to an existing task, or, with task_budget_resource_id, changes one of the task’s lines, as the Change button on the web variation page does. A variation records only the lines it changes (with baseline_quantity, the line as it was), so the task’s other lines stay ordinary budget lines.
| Field | Notes |
|---|---|
task_budget_resource_id |
POST only: the resource line to change, from GET /api/v1/projects/:id with include=budget_lines. Send quantity with it to set the line’s quantity after the variation in the same call |
resource_type_id |
The role of a new line. Default on POST: the account’s first resource type |
member_id |
A person |
quantity |
The line’s quantity after the variation |
delta_quantity |
PATCH only: hours or days added. Can be negative |
delta_rate_cents |
PATCH only: the change to the rate |
quantity_unit |
PATCH only |
Cost changes
POST .../cost_changes needs budget_cost_id, an existing expense line. A line has one change in a variation: a second POST returns the change it has. The markup of the change follows the line’s markup.
| Field | Notes |
|---|---|
quantity_delta |
The change to the quantity. Can be negative |
billable_rate_cents, quantity_unit, cost_type_id |
The line’s values in the variation |
variation_type |
adjustment (default), or removal to take the line out |
Results
A POST answers 201 and a PATCH answers 200, with the variation’s header, the written rows (in the shape of GET) and warnings:
{"variation": {"id": 731, "status": "draft", "...": "..."}, "rows": [{"record_kind": "budget_cost", "id": 9120, "...": "..."}], "warnings": []}
A DELETE answers 200:
{"variation": {"id": 731, "...": "..."}, "rows": [], "deleted": {"record_kind": "budget_cost", "id": 9120}, "warnings": []}
Errors
Error bodies follow Requests, errors and limits. The field names the input.
| Status | code |
When |
|---|---|---|
403 |
not_authorized |
The token’s user may not create or change variations on this project |
404 |
project_not_found, variation_not_found |
Not a delivery project or variation the user can read |
404 |
variation_deliverable_not_found, variation_task_not_found, variation_cost_not_found, task_change_not_found, resource_change_not_found, cost_change_not_found |
The row is not in this variation |
404 |
deliverable_not_found, task_not_found, budget_cost_not_found, task_resource_not_found |
The parent you named is not one the variation can change |
404 |
cost_type_not_found, resource_type_not_found, member_not_found, project_phase_not_found, rate_card_not_found, project_template_deliverable_not_found |
A record you named is not one the row can take |
409 |
variation_locked |
The variation is approved or rejected |
409 |
row_busy |
Another change to this variation ran at the same time. Try again |
409 |
rate_card_reprice_locked, rate_card_locked_internal_variation, rate_card_locked_variation |
The deliverable’s variation does not allow the card or the new rates |
422 |
missing_input, invalid_input |
A required field is missing, a field is unknown or cannot be read, or adjustment_cents is 0 |
422 |
variation_opportunity_required |
The project sells its variations through an opportunity. Make it in Drum |
422 |
internal_variation_unsupported, internal_variation_row_not_allowed, internal_variation_time_and_materials, adjustment_internal_only |
The internal variation rules |
422 |
task_not_varied |
Add a task change before an expense line on an existing task |
422 |
task_in_variation |
The task is added by this variation. Change it as a task |
422 |
validation_failed |
The row would not save (errors) |