Replace task planned work asynchronously
const url = 'https://api.de.teamgrid.app/v1/tasks/example/planned-work';const options = { method: 'PUT', headers: { 'If-Match': 'example', 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"dayLoads":[1],"plannedEnd":"2026-04-15T12:00:00Z","plannedStart":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.de.teamgrid.app/v1/tasks/example/planned-work \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'If-Match: example' \ --data '{ "dayLoads": [ 1 ], "plannedEnd": "2026-04-15T12:00:00Z", "plannedStart": "2026-04-15T12:00:00Z" }'Atomically compares the strong task schedule revision and accepts a credential-owned asynchronous replacement. The same Idempotency-Key and payload replay the original operation; a different payload conflicts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Exactly one strong ETag returned by the latest task planned-work GET. Wildcards, weak validators, and lists are rejected.
Unique request key retained for seven days. Within that window, reuse with different data is rejected.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "dayLoads": [ 1 ], "plannedEnd": "2026-04-15T12:00:00Z", "plannedStart": "2026-04-15T12:00:00Z"}Responses
Section titled “Responses”The asynchronous schedule replacement was accepted or replayed.
object
object
object
object
object
Example
{ "data": { "attributes": { "state": "failed" }, "type": "plannedWorkOperation" }}Headers
Section titled “Headers”Whether this response replays the operation created for this key.
Relative credential-owned polling URL for this operation.
The request is invalid.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The bearer credential is missing, invalid, expired, or revoked.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The credential has insufficient scope.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The tenant-scoped resource does not exist.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The request conflicts with the current resource state.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The resource changed since the supplied revision.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}A strong If-Match revision is required.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The credential or source exceeded its rate limit.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}Headers
Section titled “Headers”Minimum delay in seconds before retrying.
Maximum requests in the current window.
Requests remaining in the current window.
Unix time in milliseconds when the current window resets.
Request correlation identifier.
The cell-local application returned an invalid response.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}A required cell-local dependency is unavailable.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}