---
title: "Preview a cascading due-date change"
method: POST
path: "/tasks/{id}/calculate-date-shifts"
tags: ["Tasks"]
---

# Preview a cascading due-date change

`POST /tasks/{id}/calculate-date-shifts`

## Request

- Base URL: `https://tasg.app/api/v1`
- URL: `https://tasg.app/api/v1/tasks/{id}/calculate-date-shifts`
- Auth: HTTP bearer

Dry run: which downstream dependents would move if this task's due date changed. Nothing is written. (It is a POST, so a `tf_` token needs the `write` scope.)

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `new_due_date` string, date, required: Calendar date, YYYY-MM-DD
  - `shift_mode` 'maintain_buffer' | 'consume_buffer' | 'none', required: `maintain_buffer` shifts every dependent by the same delta; `consume_buffer` only pushes dependents that would otherwise start too early; `none` returns an empty proposal.

## Response `200`

Proposal.

- object
  - `proposed_changes` DateShiftProposal[], required
    - `task_id` string, uuid, required
    - `task_title` string, required
    - `current_due_date` string, date, nullable: Calendar date, YYYY-MM-DD
    - `new_due_date` string, date, required: Calendar date, YYYY-MM-DD
    - `shift_days` integer, required
  - `total_affected` integer, required

## Other responses

- `400`: Validation failed: the body or query did not match the schema, or a business rule was violated. `error` says which.
- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Authenticated, but not allowed: not a member, insufficient project role or the API token lacks the required scope.
- `404`: Not found, or not visible to the caller (tenancy is enforced: foreign resources look identical to missing ones).
- `429`: Rate limited. Back off and retry after the window in the `RateLimit-*` headers.

---

[API](https://skmtc.dev/tasg/apis/tasg-api.md) · [All operations](https://skmtc.dev/tasg/apis/tasg-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tasg/apis/tasg-api/revisions/cd2a1dbaf5cf?raw)
