Tasks

Reorder Tasks

One write per drag. Send the ids of one sibling set — a parent's sub-tasks, or an owner's top-level tasks — in their new order, and the server rewrites position as 1…N inside a single transaction. Nothing else moves: status and completed_at are untouched. Every task must be editable by the caller (its grower or assigned contractor); all must sit under the given parent (or all be top-level tasks of one owner when no parent is given), every id must resolve and none may repeat — otherwise nothing is written. Responds with the reordered tasks in board order. Send the whole sibling set: a partial list only rewrites the rows named, and their positions can then collide with siblings left out.

post/tasks/reorder

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/tasks/reorder
  • Auth: HTTP bearer

Query parameters

includestring
Example:producer,provider,service

Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; unknown paths ignored; dot notation selects children; max 10 paths. Allowed paths: producer, provider, category, place, place.location, service, service.owner, service.category, service.city, service.place, service.location, farm, parent, children, asset.

Request body

Response

The reordered tasks, board ordered. When the include query parameter is used, the response may contain an included array (JSON:API) or inlined related resources (application/json).

Example response

{
  "data": [
    {
      "type": "task"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.