Compliance exports

Preview a compliance export

Changed on

What a compliance export would hold, before building it (COMPLIANCE_EXPORT.md §4 "Preview"): per property, the rows each CSV would have, the photos, a size estimate, the count of every record kind in the scope and date range (so the dialog can show counts and disable empty kinds, whatever record_types says) and the LPA fields the records do not hold, each with the tasks to open. The export is one owner: organization_id, or the caller's own account when that is blank. "all" is that owner's properties only. A property id the owner does not own is a 422 and nothing is previewed. A property of that owner the caller cannot read is listed with access: denied and the 403 detail a read of it would return, verbatim; it is never worked around.

Reads the records through the same policy-scoped relation the task list uses, in pages of 100; nothing is written. First-party web and mobile only: an assistant or API key is refused with a 403 and the operation is not an MCP tool.

post/compliance-exports/preview

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/compliance-exports/preview
  • Auth: HTTP bearer

Request body

organization_idstring nullable

The organisation this export is for. Blank (omitted or null) is the caller's own account. The server stores it on the export. properties: all, and a missing properties, is every property of that one owner — never every organisation the caller belongs to, and never the personal account beside an organisation. An id that owner does not own is rejected.

fromstring date

First record date (the Melbourne day the work was done). Defaults to twelve months before to.

tostring date

Last record date. Defaults to today in Melbourne.

record_typesstring[]

Which kinds to export. Defaults to every kind. general is a completed task with no typed detail.

include_openboolean

Also export open tasks that already carry drafted details, each row marked status = open; the zip name ends -incl-open.

Response

The preview.

zip_namestring required
totalsobject required

The counts summed over the properties that passed, plus bytes_estimate.

ok_countinteger required
denied_countinteger required

Example response

{
  "zip_name": "purplegrain-compliance-2026-10-20T0915-hillcrest.zip"
}

Changes

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the //// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the //// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the //// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the //// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the /// response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/vnd.api+json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/json)

    • warning

      added the new map_boundaries enum value to the // response property for the response status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property // to the response with the status (media type: application/json)

    • info

      added the optional property // to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: application/vnd.api+json)