Example integrations for the Ditio Core API — one folder per integration kind, each with a runnable C# example and curl snippets, plus a Postman collection that covers everything.
- Production: https://integration.ditio.no/swagger
- Test: https://core-api.ditio.dev/core/swagger
Start here
authentication— get an OAuth2 token (shared by everything below)
Send data into Ditio (create / update)
projects— projectswork-orders— work orders (tasks)machines— machines & equipmentreference-data— machine types, alert types (lookups you need first)users— users (v4)employees-v5— employees (v5, recommended)certificates— user certificatesdocuments— documents on projects & work orders
Get data out of Ditio (read / sync)
data-extraction— projects, work orders, checklists, alerts, project transactions, absences, payroll, users, images … (paginatedv1/*)
Other
postman— Postman collection + Production/Test environmentsPowerBI template— Power BI data-source template
| Production | Test | |
|---|---|---|
| Identity | https://identity.ditio.app |
https://identity.ditio.dev |
Integration API (api/v4, api/v5) |
https://integration.ditio.no |
https://core-api.ditio.dev/core |
Reporting API (v1/*) |
https://core-api.ditio.app/reporting |
https://core-api.ditio.dev/reporting |
| Scope — integration / core | ditioapiv3 |
ditioapiv3 |
| Scope — reporting | reportingapiv1 |
reportingapiv1 |
- In Ditio Web → Company Setup → Integration (Administrator access), create an API client and copy its
client_id/client_secret. - Copy
appsettings.example.json→appsettings.jsonand fill inClientId/ClientSecret/CompanyId. Defaults are production; test values are in the comments.appsettings.jsonis git-ignored. - Run:
dotnet run # interactive menu
dotnet run -- 2 # run example #2 (projects) directlyEach folder's README has curl snippets. Set these once:
# Production (test values in comments)
IDENTITY=https://identity.ditio.app # test: https://identity.ditio.dev
BASE_URL=https://integration.ditio.no # test: https://core-api.ditio.dev/core
TOKEN=$(curl -s -X POST $IDENTITY/connect/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=ditioapiv3" | jq -r '.access_token')Use PATCH for updates, not PUT.
PATCHis a partial, dynamic update — send only the fields you want to change; everything else is left exactly as it was. You don't need to fetch the full object first.PUTis a full replace — it overwrites the entire object with the body you send. Any field you omit is wiped (cleared or reset to its default). This is a common cause of accidental data loss during syncs.
So unless you deliberately want to replace every field, reach for PATCH.
| Entity | PATCH endpoint |
|---|---|
| Projects | PATCH /api/v4/integration/projects/{id} — dynamic, any subset of fields |
| Work orders | PATCH /api/v4/integration/tasks/{id} — dynamic |
| Machines | PATCH /api/v4/integration/machines/{id} · ESG: PATCH /machines/{id}/esg |
| Users (v4) | PATCH /api/v4/integration/users/{companyProfileId} |
| Employees (v5) | PATCH /api/v5/integration/employees/{employeeNumber} — omitted = unchanged, explicit null = clear |
Each folder's README shows the PATCH call for that entity.
Import postman/Ditio-Integration.postman_collection.json plus the Production or Test environment file. See postman/README.md.
- Tokens are short-lived (~30 min by default) — cache and reuse them (see
authentication). - Most write endpoints require Administrator-level access and are company-scoped.
- The authoritative schema reference is the Swagger above.