Endpoint for Projects & Tasks

NEW v2.35.0 · xoCRM

Projects Endpoint

Manage xoCRM projects and project tasks via the JSON API: export, create, update, and delete—including multilingual descriptions, project managers, assignees, and status history.


Endpoints

MethodEndpointScopeDescription
GET/Export/JSON/projectsprojects:readAll projects (optional ?include_tasks=1)
GET/Export/JSON/project/{id}projects:readSingle project
POST/Import/JSON/projectsprojects:writeCreate new projects
PUT/Import/JSON/projectsprojects:writeUpdate projects (project_id required)
DELETE/Delete/JSON/project/{id}projects:deleteDelete project (cascading, including tasks)
GET/Export/JSON/project_tasksproject_tasks:readAll tasks (see below for filters)
GET/Export/JSON/project_task/{id}project_tasks:readSingle task
POST/Import/JSON/project_tasksproject_tasks:writeCreate new tasks (project_id required)
PUT/Import/JSON/project_tasksproject_tasks:writeUpdate tasks (task_id required)
DELETE/Delete/JSON/project_task/{id}project_tasks:deleteDelete task (project remains intact)

Filter (Export)

Projects

  • ?status={id} — Project status
  • ?customer_id={id} — Assigned customer
  • ?category_id={id} — Project category
  • ?leader_admin_id={id} — Project Leader
  • ?is_private=0|1 — private projects
  • ?date_from / ?date_to — Creation date
  • ?last_modified={ts} — modified since
  • ?include_tasks=1 — Tasks embedded

Tasks

  • ?project_id={id} — Tasks in a project
  • ?status={id} — Task status
  • ?priority=1-5 — Priority
  • ?admin_id={id} — Assigned user
  • ?customer_id={id} / ?category_id={id}
  • ?due_from / ?due_to — Due date range
  • ?progress_min / ?progress_max — Progress (0–100)
  • ?last_modified={ts} — Last modified

?language=de|en controls the language of the status/category names. The meta blocks project_statuses[] and task_statuses[] provide all available status values.


Payload Structure (Project)

{
  "type": "projects",
  "data": [
    {
      "name": "Website-Relaunch",
      "description": "<p>Beschreibung (Default-Sprache)</p>",
      "descriptions": [
        { "language_id": 1, "project_name": "Website Relaunch", "project_description": "<p>EN</p>" }
      ],
      "customer_scope": "specific",
      "customer_ids": [4711],
      "date_start": "2026-07-01",
      "date_end": "2026-09-30",
      "is_private": false,
      "leader_admin_ids": [1],
      "category_ids": [2],
      "relationships": [ { "target_type": "orders_id", "target_id": 12345 }, { "target_type": "contracts_id", "target_id": 318 } ],
      "admin_id": 1,
      "status_comment": "Projekt via API angelegt"
    }
  ]
}

Payload Structure (Task)

{
  "type": "project_tasks",
  "data": [
    {
      "project_id": 126,
      "name": "Konzept erstellen",
      "priority": 4,
      "progress_percent": 0,
      "date_start": "2026-07-01",
      "due_date": "2026-07-15",
      "hours_planned": 8.5,
      "hours_actual": null,
      "status_id": 60,
      "assigned_admin_ids": [1],
      "admin_id": 1,
      "status_comment": "Aufgabe via API angelegt"
    }
  ]
}

Links to Orders, Tickets, and Contracts v2.122.11

relationships[] links a project to orders (orders_id), tickets (ticket_id) and, since v2.122.11, also to contracts (contracts_id), as in the backend. If the key is present in the record, PUT replaces all links of the project.

{
  "type": "projects",
  "data": [{
    "project_id": 126,
    "relationships": [
      {"target_type": "orders_id",    "target_id": 12345},
      {"target_type": "ticket_id",    "target_id": 8812},
      {"target_type": "contracts_id", "target_id": 318}
    ],
    "admin_id": 1
  }]
}
CaseUp to v2.122.10Starting with v2.122.11
Key missing or nulllinks remain unchangedas before
[]PUT removes all links of the projectas before
Entry with contracts_idrecord fails (“Invalid relationships”)link is written
unknown target_type, target_id ≤ 0, or entry is not an objectrecord failsrecord fails, the message names orders_id|ticket_id|contracts_id; nothing of this record is written
relationships is not a list, for example a textPOST creates the project without links, PUT silently deletes all of themrecord fails (“Invalid relationships (must be a list …)”), nothing is changed
Order, ticket or contract does not existlink is written anywaythis link is not written, but the rest of the record is; warnings[] reports PROJECT_RELATIONSHIP
Exportalso entries without a type, on which a returned export failedonly entries of the three types
"warnings": [{"type": "PROJECT_RELATIONSHIP", "field": "relationships", "entity": "projects",
  "message": "relationships: not found: contracts_id 999 — these links were not written.", "first_occurrence": "record 1"}]
Returned export: Because PUT replaces all links and the import now only writes existing targets, a returned export loses its links to deleted orders, tickets, and contracts. They pointed to nothing anyway; the warning names them.

Notes

  • NEW v2.36.0: Projects and tasks include status_history[] in the export—all status entries, including comments (meeting minutes), progress_percent, status_name, and user_name.
  • admin_id = the admin who performed the action (stored as created_by/modified_by and as user_id in the status history; if not specified = 0/System).
  • status_id is validated against the status management (type projects or tasks); if not specified, the default status applies. A status change via PUT automatically creates a status history entry with status_comment—since v2.40.0, status_comment also writes an entry even without a status change (work notes/minutes); for tasks, progress_percent is included in the entry as progress.
  • descriptions[] is multilingual; for PUT requests, merge semantics apply—only the provided languages/fields are overwritten.
  • leader_admin_ids, relationships (projects), and assigned_admin_ids (tasks) are only replaced if the key is included in the payload (replace-on-present).
  • A POST request with an ID that has already been assigned returns Already exists—in that case, use PUT (and conversely, Not found is returned for PUT requests on unknown IDs).
  • Note: DELETE /project/{id} will cascade and delete all tasks associated with the project. Linked orders, tickets, and contracts are only unlinked, not deleted. The response contains deleted_tasks.