LiteLogDocs
English

REST API: Work orders

This page belongs to the REST API reference, which covers the address, authentication, scopes, pagination and errors. Every path is appended to https://api.litelog.de/api. In the examples $KEY stands for your API key; the example values are made up.

Overview

Call Purpose Scope
GET /v1/work-orders List work orders (Kundenaufträge) work_orders:read
POST /v1/work-orders Create a work order work_orders:write
GET /v1/work-orders/{id} Get a work order incl. billing positions work_orders:read
PATCH /v1/work-orders/{id} Update title/description/property/positions work_orders:write
DELETE /v1/work-orders/{id} Delete a work order work_orders:write
GET /v1/work-orders/{id}/actuals Actuals collected via the execution task work_orders:read
POST /v1/work-orders/{id}/complete Complete a work order (freeze final positions) work_orders:write

GET /v1/work-orders

List work orders (Kundenaufträge).

List work orders (filters: status, customer_id, property_id, q) / create one.

Scope: work_orders:read

Parameters

Name In Type Required Description
status query string no Values: open, completed, billed.
customer_id query integer no —
property_id query integer no —
q query string no Case-insensitive substring match on the order title. At most 200 characters.

Example call

curl "https://api.litelog.de/api/v1/work-orders?status=open&customer_id=7&page=1&limit=50" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": [
    {
      "order_id": 318,
      "uuid": "5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28",
      "user_id": 284,
      "customer_id": 7,
      "property_id": 123,
      "title": "Grundreinigung Filiale Nord",
      "description": "Grundreinigung aller Verkaufsflächen nach dem Umbau.",
      "status": "open",
      "task_id": 4711,
      "completed_at": null,
      "billed_at": null,
      "lexoffice_invoice_id": null,
      "created_by_account_id": 5,
      "created_at": "2026-12-01T08:15:00.000Z",
      "updated_at": "2026-12-01T08:15:01.000Z",
      "end_date": null,
      "cancelled_at": null,
      "approved_at": null,
      "approved_by_account_id": null,
      "customer_name": "Muster Immobilien GmbH",
      "property_name": "Filiale Nord",
      "task_uuid": "9b3d5f71-2a4c-4e86-9f0b-1c3e5a7d9b24",
      "task_completed_at": null,
      "net_total_cents": 34000,
      "shift_count": 0,
      "unstaffed_count": 0
    }
  ],
  "total": 1
}

POST /v1/work-orders

Create a work order.

List work orders (filters: status, customer_id, property_id, q) / create one.

Scope: work_orders:write

Body fields (JSON)

The example shows the structure of the body.

Example call

curl -X POST "https://api.litelog.de/api/v1/work-orders" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "customer_id": 7,
  "property_id": 123,
  "title": "Grundreinigung Filiale Nord",
  "description": "Grundreinigung aller Verkaufsflächen nach dem Umbau.",
  "positions": [
    {
      "kind": "service",
      "title": "Grundreinigung Verkaufsfläche",
      "unit": "Stunden",
      "unit_price_cents": 4250,
      "tax_rate": 19,
      "quantity": 8
    },
    {
      "kind": "material",
      "title": "Reinigungsmittel",
      "unit": "Liter",
      "unit_price_cents": 890,
      "tax_rate": 19,
      "quantity": null
    }
  ],
  "staffing": [
    {
      "weekdays": [
        1,
        2,
        3,
        4,
        5
      ],
      "window_from": "06:00",
      "window_to": "14:00",
      "headcount": 2
    }
  ],
  "task": {
    "title": "Grundreinigung durchführen",
    "due_date": "2026-12-10",
    "assignee_account_ids": [
      41,
      42
    ]
  }
}'

Example response (201)

{
  "uuid": "5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28",
  "order_id": 318
}

GET /v1/work-orders/{id}

Get a work order incl. billing positions.

Read a work order incl. billing positions, update or delete it.

Scope: work_orders:read

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl "https://api.litelog.de/api/v1/work-orders/5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "order_id": 318,
  "uuid": "5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28",
  "user_id": 284,
  "customer_id": 7,
  "property_id": 123,
  "title": "Grundreinigung Filiale Nord",
  "description": "Grundreinigung aller Verkaufsflächen nach dem Umbau.",
  "status": "open",
  "task_id": 4711,
  "completed_at": null,
  "billed_at": null,
  "end_date": null,
  "cancelled_at": null,
  "approved_at": null,
  "approved_by_account_id": null,
  "lexoffice_invoice_id": null,
  "created_by_account_id": 5,
  "created_at": "2026-12-01T08:15:00.000Z",
  "updated_at": "2026-12-01T08:15:01.000Z",
  "positions": [
    {
      "position_id": 901,
      "order_id": 318,
      "kind": "service",
      "title": "Grundreinigung Verkaufsfläche",
      "description": null,
      "unit": "Stunden",
      "unit_price_cents": 4250,
      "tax_rate": "19.00",
      "quantity": "8.00",
      "service_type_id": null,
      "item_id": null,
      "plan_weekdays": null,
      "plan_window_from": null,
      "plan_window_to": null,
      "plan_note": null,
      "plan_headcount": null,
      "sort_order": 0,
      "created_at": "2026-12-01T08:15:00.000Z"
    },
    {
      "position_id": 902,
      "order_id": 318,
      "kind": "material",
      "title": "Reinigungsmittel",
      "description": null,
      "unit": "Liter",
      "unit_price_cents": 890,
      "tax_rate": "19.00",
      "quantity": null,
      "service_type_id": null,
      "item_id": null,
      "plan_weekdays": null,
      "plan_window_from": null,
      "plan_window_to": null,
      "plan_note": null,
      "plan_headcount": null,
      "sort_order": 1,
      "created_at": "2026-12-01T08:15:00.000Z"
    }
  ],
  "staffing": [
    {
      "staffing_id": 77,
      "weekdays": [
        1,
        2,
        3,
        4,
        5
      ],
      "window_from": "06:00",
      "window_to": "14:00",
      "headcount": 2,
      "qualification_id": null,
      "qualification_name": null,
      "sort_order": 0
    }
  ],
  "customer_name": "Muster Immobilien GmbH",
  "property_name": "Filiale Nord",
  "task_uuid": "9b3d5f71-2a4c-4e86-9f0b-1c3e5a7d9b24",
  "task_completed_at": null
}

PATCH /v1/work-orders/{id}

Update title/description/property/positions.

Read a work order incl. billing positions, update or delete it.

Scope: work_orders:write

Parameters

Name In Type Required Description
id path string (uuid) yes —

Body fields (JSON)

The example shows the structure of the body.

Example call

curl -X PATCH "https://api.litelog.de/api/v1/work-orders/5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "title": "Grundreinigung Filiale Nord inkl. Lager",
  "positions": [
    {
      "kind": "service",
      "title": "Grundreinigung Verkaufsfläche und Lager",
      "unit": "Stunden",
      "unit_price_cents": 4250,
      "tax_rate": 19,
      "quantity": 10
    },
    {
      "kind": "material",
      "title": "Reinigungsmittel",
      "unit": "Liter",
      "unit_price_cents": 890,
      "tax_rate": 19,
      "quantity": null
    }
  ]
}'

Example response (200)

{
  "success": true
}

DELETE /v1/work-orders/{id}

Delete a work order.

Read a work order incl. billing positions, update or delete it.

Scope: work_orders:write

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl -X DELETE "https://api.litelog.de/api/v1/work-orders/5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "success": true
}

GET /v1/work-orders/{id}/actuals

Actuals collected via the execution task (recorded quantities/times).

Scope: work_orders:read

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl "https://api.litelog.de/api/v1/work-orders/5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28/actuals" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "total_service_minutes": 465,
  "services": [
    {
      "service_type_id": "d6e8fa02-4c1b-4a3d-8e5f-7a9b1c3d5e60",
      "service_key": "cleaning",
      "name_de": "Reinigung",
      "name_en": "Cleaning",
      "minutes": 465,
      "quantity": 7.75,
      "unit": "h"
    }
  ],
  "materials": [
    {
      "item_id": 88,
      "name": "Reinigungsmittel Universal",
      "size": "5 l",
      "quantity": 2,
      "unit_price_cents": 890
    }
  ],
  "completions": 1
}

POST /v1/work-orders/{id}/complete

Complete a work order — the final positions are frozen.

Scope: work_orders:write

Parameters

Name In Type Required Description
id path string (uuid) yes —

Body fields (JSON)

The example shows the structure of the body.

Example call

curl -X POST "https://api.litelog.de/api/v1/work-orders/5a8c2e94-1f3b-4d67-b0a2-9e6d4c7f1b28/complete" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{
  "positions": [
    {
      "kind": "service",
      "title": "Grundreinigung Verkaufsfläche",
      "unit": "Stunden",
      "unit_price_cents": 4250,
      "tax_rate": 19,
      "quantity": 7.75
    },
    {
      "kind": "material",
      "title": "Reinigungsmittel",
      "unit": "Liter",
      "unit_price_cents": 890,
      "tax_rate": 19,
      "quantity": 2,
      "item_id": 88
    }
  ]
}'

Example response (200)

{
  "success": true
}