Data TrustData Trust

Build on top of your compliance data

A read-only REST API for every DPO account: pull companies, compliance scores, tickets, breaches, ROPA and DPIA records into your own reporting, dashboards or client portals.

Simple key auth

Generate a personal API key from Account → API once you're signed in, no OAuth dance, just a bearer token.

Scoped to your data

Every endpoint is scoped to companies your account manages. Your key can never see another DPO's data.

Plain JSON

Every response is JSON over HTTPS. No SDK required: curl, a browser, or any HTTP client works.

Authentication

Send your key in an Authorization header (or X-API-Key) on every request:

curl -H "Authorization: Bearer YOUR_API_KEY" \ https://datatrust.co.zw/api/v1/companies.php

Get a key: create a free account, then generate one from Account → API once logged in. Keys are shown once at creation and stored hashed. If you lose one, revoke it and generate a new one.

Response shape & conventions

Every successful response is a JSON object with a single data key — an object for a single-record endpoint like compliance.php, or an array for a list endpoint like tickets.php. There's no pagination: list endpoints return everything that matches (a DPO's own company/record counts are small enough that this stays fast). Dates are returned exactly as stored, in Africa/Harare, as YYYY-MM-DD HH:MM:SS (or null when the event hasn't happened yet, e.g. resolved_at on an open ticket).

The API is deliberately read-only (GET only, everything else gets a 405) — it's built for pulling data into dashboards, spreadsheets and reporting tools, not for writing back into the platform.

Jump to an endpoint

GET /companies.php

Every company the authenticated DPO manages, with its current overall compliance percentage. This is the endpoint most integrations start with — use the id from each entry as the company_id for every other endpoint below.

Params: none.

curl -H "Authorization: Bearer YOUR_API_KEY" \ https://datatrust.co.zw/api/v1/companies.php

Response — data is an array of:

{ "data": [ { "id": 12, "name": "Acme Financial Services", "industry": "Financial Services", "compliance_percent": 84.3, "created_at": "2025-11-04 09:12:00" } ] }

compliance_percent is the same weighted overall score shown on that company's dashboard — see compliance.php below for the per-module breakdown behind it. A brand-new company with nothing recorded yet in any module shows 0 rather than an inflated score.

GET /compliance.php

The full compliance breakdown for one company: every module's individual score, its configured weight, and how much it contributes to the overall percentage — the same numbers that drive the compliance chart inside the app.

Params: company_id (required) — from companies.php.

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://datatrust.co.zw/api/v1/compliance.php?company_id=12"

Response — modules has one entry per compliance module (keyed by module id: licensing, policies, breaches, tickets, dpia, ropa, training, audits, vendors):

{ "data": { "company_id": 12, "company_name": "Acme Financial Services", "overall_percent": 84.3, "modules": { "licensing": { "label": "POTRAZ Licensing", "score": 100, "weight": 13.5, "contribution": 13.5 }, "tickets": { "label": "Data Subject Support", "score": 72.5, "weight": 9, "contribution": 6.5 } } } }

weight reflects that company's current compliance weight settings (a platform default unless the DPO has customised them), and score/contribution are each rounded to one decimal place.

GET /tickets.php

Data subject support tickets (access, deletion, correction and similar requests) logged for one company, newest first.

Params: company_id (required). status (optional) — one of Open, In Progress, Resolved, Rejected; any other value is ignored and all statuses are returned.

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://datatrust.co.zw/api/v1/tickets.php?company_id=12&status=Open"

Response — data is an array of:

{ "data": [ { "id": 41, "requester_name": "Tendai Moyo", "requester_email": "tendai@example.com", "request_type": "Access request", "description": "Requesting a copy of all personal data held about me.", "status": "Open", "sla_due_date": "2026-09-24", "resolved_at": null, "created_at": "2026-09-17 08:41:00", "updated_at": "2026-09-17 08:41:00" } ] }

GET /breaches.php

Data breach incidents logged for one company, newest first.

Params: company_id (required). status (optional) — one of Open, Investigating, Contained, Closed; any other value is ignored and all statuses are returned.

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://datatrust.co.zw/api/v1/breaches.php?company_id=12&status=Contained"

Response — data is an array of:

{ "data": [ { "id": 6, "title": "Misdirected email containing customer statements", "description": "A billing export was emailed to the wrong recipient.", "date_occurred": "2026-09-10", "severity": "Medium", "response_taken": "Recipient confirmed deletion; affected customers notified.", "status": "Contained", "sla_due_date": "2026-09-13", "closed_at": null, "created_at": "2026-09-10 14:02:00", "updated_at": "2026-09-11 09:15:00" } ] }

GET /ropa.php

Records of Processing Activities for one company. ROPA's field set is customisable per company (see Vendor/ROPA field customisation inside the app), so every entry carries both its data (the actual answers, keyed by field key) and a fields array describing what each key means — don't hard-code field keys in your integration, read them from fields.

Params: company_id (required).

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://datatrust.co.zw/api/v1/ropa.php?company_id=12"

Response — data is an array of:

{ "data": [ { "id": 9, "activity_name": "Payroll processing", "requires_dpia": false, "status": "Active", "fields": [ { "key": "legal_basis", "label": "Legal basis" }, { "key": "retention_period", "label": "Retention period" } ], "data": { "legal_basis": "Contract", "retention_period": "7 years" }, "created_at": "2026-01-08 10:00:00", "updated_at": "2026-06-02 11:20:00" } ] }

GET /dpia.php

Data Protection Impact Assessments for one company. Works the same way as ropa.php: read field metadata from fields rather than assuming keys. Each field also carries a type (e.g. text, textarea, table) and an optional section heading. For a table-type field, its value inside data is an array of row objects instead of a scalar.

Params: company_id (required).

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://datatrust.co.zw/api/v1/dpia.php?company_id=12"

Response — data is an array of:

{ "data": [ { "id": 3, "title": "New CRM vendor rollout", "status": "Completed", "fields": [ { "key": "risk_summary", "label": "Risk summary", "type": "textarea", "section": "Risk assessment" }, { "key": "mitigations", "label": "Mitigating measures", "type": "table", "section": "Risk assessment" } ], "data": { "risk_summary": "Moderate risk from third-party data storage outside Zimbabwe.", "mitigations": [ { "risk": "Unauthorised access", "measure": "MFA enforced, access logs reviewed monthly" } ] }, "created_at": "2026-04-01 09:00:00", "updated_at": "2026-04-20 16:45:00" } ] }

Errors

A failed request returns a matching HTTP status code and a JSON body of the form {"error": "..."} instead of data:

StatusMeaning
400A required parameter is missing or not a valid integer — e.g. company_id left out or non-numeric.
401No API key was sent, or the key is invalid, revoked, or belongs to a DPO account that's no longer active.
404The company_id doesn't exist, or exists but belongs to a different DPO account — the API never distinguishes the two, so another account's data can't be probed for.
405Anything other than GET was used. The API is read-only.

Every key you generate is scoped to your own account only — even a leaked key can't be used to read another DPO's companies, and revoking a key from Account → API takes effect immediately on the next request.

Create a free account Ask a question