{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Ledger Atlas Public API",
    "version": "1.29.0",
    "summary": "Parcel-confirmed NSW property and environmental evidence.",
    "description": "Machine-readable contract for the existing Ledger Atlas public integration surface. The recommended public-browser sequence is address search, explicit parcel confirmation, hosted Checkout, signed paid or authorised zero-amount completion, evidence run, then durable report creation against the same order. A browser request carrying a foreign Origin is rejected; same-origin browser calls and authenticated server-to-server bulk calls are supported. Unavailable, partial and outside-coverage source states must not be interpreted as no record, Low risk or absence of environmental risk. The API is an automated desktop screening service, not title, survey, site-investigation, certification or legal advice."
  },
  "servers": [
    {
      "url": "/",
      "description": "Ledger Atlas deployment origin"
    }
  ],
  "tags": [
    {
      "name": "Parcels",
      "description": "Resolve candidates; the caller must present every candidate and obtain explicit confirmation."
    },
    {
      "name": "Evidence",
      "description": "Run the seventeen-source server-authoritative evidence screen for one paid confirmed parcel, or through the contracted integration batch route."
    },
    {
      "name": "Reports",
      "description": "Persist, retrieve and publicly verify immutable report records."
    },
    {
      "name": "Monitoring",
      "description": "Compare authenticated same-parcel durable reports without creating a second evidence store."
    },
    {
      "name": "Commerce",
      "description": "Inspect the catalogue and create the parcel-bound hosted-checkout order that gates public source work."
    },
    {
      "name": "Integration",
      "description": "Validate a reseller key and inspect its active scopes, routes, limits and public contracts without running a source search."
    }
  ],
  "paths": {
    "/api/v1/parcels/lot-plan-search": {
      "post": {
        "operationId": "searchNswLotPlan",
        "summary": "Resolve real NSW Lot and deposited-plan identifiers",
        "description": "Runs the canonical pinned NSW Spatial Lot layer contract in GDA2020. It returns every exact active candidate and never selects one automatically.",
        "tags": [
          "Parcels"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LotPlanSearchRequest"
              },
              "example": {
                "lotNumber": "1823",
                "dpNumber": "841390"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "All exact active parcel candidates or an explicit no-match/held state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotPlanSearchResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/parcels/address-search": {
      "post": {
        "operationId": "searchNswAddress",
        "summary": "Resolve an NSW address to parcel candidates",
        "description": "Runs the pinned AddressString to AddressPoint to Lot path in GDA2020. Structured address components are recommended; the legacy combined address remains accepted. Every returned parcel candidate must be shown to the user; the API never selects one automatically.",
        "tags": [
          "Parcels"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressSearchRequest"
              },
              "example": {
                "addressComponents": {
                  "streetNumber": "6",
                  "streetName": "MACQUARIE",
                  "streetType": "STREET",
                  "suburb": "SYDNEY",
                  "postcode": "2000"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Candidate parcels or an explicit no-match/held state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressSearchResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/parcels/point-identify": {
      "post": {
        "operationId": "identifyNswParcelAtPoint",
        "summary": "Identify a surrounding NSW Lot from the contextual map",
        "description": "Resolves one clicked GDA2020 map point against the same pinned NSW Spatial Lot layer used by the canonical parcel contract. This identification-only route returns Lot/DP, geometry and an address only where the Lot response supplies one. It runs no environmental, planning, legal, proximity, source-match or risk search, never selects an ambiguous boundary automatically and does not create an entitlement.",
        "tags": [
          "Parcels"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParcelPointIdentifyRequest"
              },
              "example": {
                "x": 151.213,
                "y": -33.864
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One identified Lot, an explicit ambiguous edge, a validated no-match or held source state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelPointIdentifyResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/evidence-runs": {
      "post": {
        "operationId": "createEvidenceRun",
        "summary": "Run paid authoritative evidence for a confirmed parcel",
        "description": "Requires the private bearer or same-origin HttpOnly cookie for a paid or authorised zero-amount order bound to the exact confirmed parcel. Ledger Atlas claims that order before any source call, then executes the pinned NSW Spatial, NSW EPA, SEED and National Pollutant Inventory contracts and returns a short-lived single-use evidence attestation. An unpaid order returns HTTP 402 before parcel resolution or source work.",
        "tags": [
          "Evidence"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvidenceRunRequest"
              },
              "example": {
                "orderId": "LAO-NSW-20260724010203-a1b2c3d4e5f6",
                "parcelSelection": {
                  "evidenceId": "NSW-LOT-11223344",
                  "lotNumber": "1823",
                  "planLabel": "DP841390",
                  "objectId": 11223344,
                  "lotIdString": "1823//DP841390"
                },
                "radiusMetres": 500
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The exact seventeen-source snapshot, release decision and evidence attestation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceRunResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EvidencePaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/bulk-evidence-runs": {
      "post": {
        "operationId": "createBulkEvidenceRuns",
        "summary": "Prepaid batch entitlement required",
        "description": "The unauthenticated public bulk route is currently unavailable until a prepaid batch entitlement contract is issued. It returns HTTP 402 before resolving parcels or invoking any evidence source, so submitted items are not searched or interpreted. Contracted resellers should use the separately authenticated integration bulk route, whose request and row-level response contract is unchanged.",
        "tags": [
          "Evidence"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkEvidenceRunRequest"
              },
              "example": {
                "items": [
                  {
                    "clientReference": "matter-001",
                    "parcelSelection": {
                      "evidenceId": "NSW-LOT-11223344",
                      "lotNumber": "1823",
                      "planLabel": "DP841390",
                      "objectId": 11223344,
                      "lotIdString": "1823//DP841390"
                    },
                    "radiusMetres": 500,
                    "parcelConfirmed": true
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "402": {
            "$ref": "#/components/responses/BatchEntitlementRequired"
          }
        }
      }
    },
    "/api/v1/integrations/capabilities": {
      "get": {
        "operationId": "getIntegrationCapabilities",
        "summary": "Inspect the authenticated reseller contract",
        "description": "Validates the presented integration key and returns only its non-secret client/key IDs, active scopes, supported routes, exact request limits, self-only operational usage and public contract paths. The usage measure counts accepted scoped authentications; it is not an invoice, quota, item count or completed-report total. This request does not increment usage, perform a parcel/source query or create a report, order or account.",
        "tags": [
          "Integration"
        ],
        "security": [
          {
            "integrationApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated key capabilities and current integration contract.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationCapabilitiesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/IntegrationKeyRequired"
          },
          "403": {
            "$ref": "#/components/responses/IntegrationAccessDenied"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bulk-evidence-runs": {
      "post": {
        "operationId": "createIntegrationBulkEvidenceRuns",
        "summary": "Run authenticated reseller evidence for up to ten confirmed parcels",
        "description": "Processes a bounded batch sequentially through the existing single-parcel resolver, seventeen-source evidence engine and evidence-attestation contract. Every item requires an explicit parcelConfirmed assertion. Invalid batch structure is rejected before source work; a parcel-specific failure is returned only on that row and does not erase completed rows. No queue, batch database or second parcel identity is created. This server-to-server path additionally requires a configured Ledger Atlas integration bearer with the bulk-evidence:create scope. The public bulk route remains separate and returns HTTP 402 before source work; this authenticated integration route remains available under its existing governed limits.",
        "tags": [
          "Evidence"
        ],
        "security": [
          {
            "integrationApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkEvidenceRunRequest"
              },
              "example": {
                "items": [
                  {
                    "clientReference": "matter-001",
                    "parcelSelection": {
                      "evidenceId": "NSW-LOT-11223344",
                      "lotNumber": "1823",
                      "planLabel": "DP841390",
                      "objectId": 11223344,
                      "lotIdString": "1823//DP841390"
                    },
                    "radiusMetres": 500,
                    "parcelConfirmed": true
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ordered row-level evidence runs and failures, with a summary that never converts a failed row into a no-match result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkEvidenceRunResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/IntegrationKeyRequired"
          },
          "403": {
            "$ref": "#/components/responses/IntegrationAccessDenied"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/integrations/bulk-reports": {
      "post": {
        "operationId": "createIntegrationBulkReports",
        "summary": "Create up to ten canonical reports from confirmed parcels",
        "description": "Authenticates one reseller request, runs each confirmed parcel through the existing seventeen-source evidence engine and signed attestation, then persists an ordinary durable report through the existing report API. The caller supplies a unique report ID and private report bearer for each row; neither bearer is returned. Row failures remain explicit and no queue, batch report record, tenant database or second evidence identity is created.",
        "tags": [
          "Evidence",
          "Reports"
        ],
        "security": [
          {
            "integrationApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationBulkReportRequest"
              },
              "example": {
                "items": [
                  {
                    "clientReference": "matter-001",
                    "parcelSelection": {
                      "evidenceId": "NSW-LOT-11223344",
                      "lotNumber": "1823",
                      "planLabel": "DP841390",
                      "objectId": 11223344,
                      "lotIdString": "1823//DP841390"
                    },
                    "radiusMetres": 500,
                    "parcelConfirmed": true,
                    "reportId": "LAT-NSW-20260724010203-11223344",
                    "reportAccessToken": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ordered durable-report outcomes. A failed row never becomes a successful or no-record result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationBulkReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/IntegrationKeyRequired"
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports": {
      "post": {
        "operationId": "createReport",
        "summary": "Persist a report bound to an evidence run",
        "description": "Creates a durable canonical report only when the parcel, report and unexpired single-use evidence attestation agree. The caller generates a 32-byte base64url report bearer and must retain it privately. A public-browser request also supplies the same paid orderId used for its evidence run; the order bearer or same-origin cookie authenticates the final binding. Contracted integration creation uses its authenticated integration channel and does not supply an orderId.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The identical request converged idempotently on the existing report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportCreateResponse"
                }
              }
            }
          },
          "201": {
            "description": "The report was created and persisted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportCreateResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "getReport",
        "summary": "Retrieve a private report record",
        "description": "Requires the bearer token supplied when the report was created. The token is never returned by Ledger Atlas. A public-browser report also remains bound to its active paid order; contracted integration reports retain their authenticated API channel.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated private record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRecordResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/exports/manifest.json": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "exportReportEvidenceManifest",
        "summary": "Download the canonical evidence manifest",
        "description": "Returns the exact durable report record with its existing canonical-record SHA-256. A public-browser report requires active paid entitlement; contracted integration reports retain their authenticated API channel. No second report or integrity lineage is created.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated deterministic report export.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the report ID and version.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Manifest-SHA256": {
                "description": "SHA-256 of the canonical durable report record used for this export.",
                "schema": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportEvidenceManifestExport"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/exports/findings.csv": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "exportReportFindingsCsv",
        "summary": "Download source findings as CSV",
        "description": "Returns one row per canonical source check with report, parcel, source-state, provenance, result and limitation fields. A public-browser report requires active paid entitlement; contracted integration reports retain their authenticated API channel. Formula-shaped text is neutralised for spreadsheet safety.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated deterministic report export.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the report ID and version.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Manifest-SHA256": {
                "description": "SHA-256 of the canonical durable report record used for this export.",
                "schema": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/exports/parcel.geojson": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "exportReportParcelGeoJson",
        "summary": "Download the canonical parcel as GDA2020 GeoJSON",
        "description": "Returns the exact canonical EPSG:7844 parcel geometry stored with the report. A public-browser report requires active paid entitlement; contracted integration reports retain their authenticated API channel. It is not silently relabelled WGS 84 and includes the strict RFC 7946 transformation notice.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated deterministic report export.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the report ID and version.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Manifest-SHA256": {
                "description": "SHA-256 of the canonical durable report record used for this export.",
                "schema": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "content": {
              "application/geo+json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportParcelGeoJsonExport"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/exports/report.pdf": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "exportReportPdf",
        "summary": "Download the authenticated report PDF",
        "description": "Compiles a tagged A4 PDF transiently from the exact canonical durable report. A public-browser report requires active paid entitlement; contracted integration reports retain their authenticated API channel. The existing report identity, version, correction lineage and manifest SHA-256 remain authoritative; no PDF blob or second report record is created.",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated deterministic report export.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the report ID and version.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Manifest-SHA256": {
                "description": "SHA-256 of the canonical durable report record used for this export.",
                "schema": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/reports/{reportId}/verify": {
      "parameters": [
        {
          "name": "reportId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          }
        }
      ],
      "get": {
        "operationId": "verifyReport",
        "summary": "Verify public report identity and integrity metadata",
        "description": "Returns only non-sensitive report identity, version, status and SHA-256 metadata. It does not expose the parcel or source results.",
        "tags": [
          "Reports"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public integrity metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportVerificationResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/report-comparisons": {
      "post": {
        "operationId": "compareReports",
        "summary": "Compare two authenticated reports for the same parcel",
        "description": "Runs the existing deterministic source-by-source change rule on demand. Each report keeps its own private bearer in the request body because two independently protected records are involved. Every public-browser report must also retain active paid entitlement; contracted integration reports retain their authenticated API channel. Source failure remains source-specific; this route creates no schedule, subscription, webhook or parallel evidence record.",
        "tags": [
          "Monitoring"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportComparisonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A deterministic same-parcel comparison with source-specific events and integrity metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportComparisonResponse"
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "Inspect the server-owned product catalogue",
        "description": "The response exposes checkoutAvailable, test/live checkout mode, Stripe Managed Payments state, promotion-code support and exact payment-path blockers. Checkout requires the hosted payment provider, first-party commercial policy and enforced D1 abuse control. Separately authenticated operator audit, refund, recovery and correction endpoints report their own configuration failures locally and do not disable an otherwise configured customer checkout.",
        "tags": [
          "Commerce"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current catalogue and checkout configuration state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCatalogueResponse"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders": {
      "post": {
        "operationId": "createOrder",
        "summary": "Create a parcel-bound pre-search checkout order",
        "description": "Configuration-gated. The public-browser path binds Checkout to one explicitly confirmed parcel before evidence sources run. The legacy report-bound form remains accepted for an existing durable report with its private bearer. Both forms require current policy versions and explicit scope/policy acceptance. Payment or authorised zero-amount promotion state is controlled by the signed provider webhook, never the browser return URL.",
        "tags": [
          "Commerce"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A parcel-bound or legacy report-bound hosted Checkout session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderCreateResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/batch-orders": {
      "post": {
        "operationId": "createBatchOrder",
        "summary": "Create one hosted-checkout order for up to ten persisted reports",
        "description": "Uses the existing parent order, signed payment webhook, refund and recovery controls. Each item must identify an existing durable report and supply its private bearer in the JSON body; failed or unpersisted evidence rows cannot be ordered.",
        "tags": [
          "Commerce"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchOrderCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "One hosted Checkout session bound to every ordered report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchOrderCreateResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CrossOriginBlocked"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/RequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/ContentTypeInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getOrder",
        "summary": "Retrieve a private order record",
        "description": "Requires the private order bearer generated by the caller.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated private record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderRecordResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/support-requests": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "post": {
        "operationId": "createOrderSupportRequest",
        "summary": "Submit a support or remedy request for a paid order",
        "description": "Requires the private order bearer or same-origin HttpOnly order cookie. The caller supplies an idempotent request ID and one bounded correction, refund, delivery, billing, privacy or other message. Ledger Atlas appends the receipt to the existing commerce event ledger; authorised refund and correction operators can use that request ID as their existing operator reference. No support-case database or new customer identity is created.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderSupportRequestCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The identical support request already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSupportRequestResponse"
                }
              }
            }
          },
          "201": {
            "description": "The support request was appended to the existing order audit trail.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSupportRequestResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/invoice.pdf": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getOrderTaxInvoicePdf",
        "summary": "Download the authenticated Stripe tax invoice",
        "description": "Requires the private order bearer or same-origin HttpOnly order cookie. Ledger Atlas resolves the single provider invoice ID captured from the signed Checkout event, verifies its customer, currency, amount, paid status and optional order metadata against the existing order, then proxies a validated PDF transiently. Refunded customers retain invoice access. No billing profile, invoice database or stored PDF is created.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The provider-generated tax invoice PDF bound to this order.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the private order ID.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Provider-Invoice-Id": {
                "description": "The provider invoice identifier captured from the signed Checkout event.",
                "schema": {
                  "type": "string",
                  "pattern": "^in_[A-Za-z0-9_]+$"
                }
              },
              "X-Ledger-Atlas-Invoice-Audit": {
                "description": "Whether the non-blocking download audit event was recorded.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "recorded",
                    "unavailable"
                  ]
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/SourceUnavailable"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/verify": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "verifyOrder",
        "summary": "Verify public order status",
        "description": "Returns non-sensitive order and entitlement status only.",
        "tags": [
          "Commerce"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public order status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderVerificationResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/report": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getEntitledReport",
        "summary": "Retrieve the paid report entitlement",
        "description": "Requires the private order bearer and an active paid entitlement. A signed full-refund event revokes access.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated private record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitledReportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRevoked"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/report.pdf": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getEntitledReportPdf",
        "summary": "Download the paid canonical report PDF",
        "description": "Requires the same private order bearer and active paid entitlement as the JSON report route. The PDF is compiled transiently from the correction-aware canonical report; a signed full-refund event revokes access and no second report record or blob is created.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The paid canonical report PDF.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the fulfilled report ID and version.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Manifest-SHA256": {
                "description": "SHA-256 of the fulfilled canonical report record used for the PDF.",
                "schema": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRevoked"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/reports": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getEntitledReports",
        "summary": "Retrieve every paid report in a batch order",
        "description": "Requires the private parent-order bearer and an active paid entitlement. The response is all-or-explicit-error: an invalid item binding prevents a partial bundle from being presented as complete.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The authenticated private record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitledReportsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRevoked"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/{orderId}/reports.zip": {
      "parameters": [
        {
          "name": "orderId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          }
        }
      ],
      "get": {
        "operationId": "getEntitledReportsZip",
        "summary": "Download every paid batch report as PDFs",
        "description": "Requires the private parent-order bearer and an active paid entitlement. Ledger Atlas resolves every correction-aware canonical fulfilment record, compiles its authenticated PDF and returns a deterministic transient ZIP with a private archive manifest. The archive is all-or-explicit-error and is not persisted as a new report or blob.",
        "tags": [
          "Commerce"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "A transient archive containing the paid report PDFs and private archive manifest.",
            "headers": {
              "Content-Disposition": {
                "description": "Attachment filename bound to the paid parent order.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Ledger-Atlas-Report-Count": {
                "description": "Number of entitled PDFs included in the complete archive.",
                "schema": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 10
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/BearerRequired"
          },
          "402": {
            "$ref": "#/components/responses/EntitlementPending"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRevoked"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/SourceUnavailable"
          }
        }
      }
    },
    "/api/v1/orders/session": {
      "delete": {
        "operationId": "clearOrderSession",
        "summary": "Clear same-tab checkout continuity",
        "description": "Clears the Secure, HttpOnly, SameSite=Strict first-party order cookie. It does not delete the durable order.",
        "tags": [
          "Commerce"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The browser continuity cookie was cleared.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "state"
                  ],
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "cleared"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    }
  },
  "webhooks": {
    "portfolioComparison": {
      "post": {
        "operationId": "receivePortfolioComparisonWebhook",
        "summary": "Receive a signed portfolio comparison event",
        "description": "The optional caller-side portfolio runner sends one event for each included completed comparison. By default, checked/no-change comparisons are omitted; the private webhook configuration can include them explicitly. The event ID is the existing deterministic comparison ID, so recipients can deduplicate retries without creating another change identity. Verify HMAC-SHA256 over `<timestamp>.<raw request body>` using the separate webhook signing secret, reject stale timestamps and return any 2xx response only after accepting the event. Report and integration bearer credentials are never included.",
        "tags": [
          "Monitoring",
          "Integration"
        ],
        "parameters": [
          {
            "name": "X-Ledger-Atlas-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^LAC-[A-F0-9]{32}$"
            }
          },
          {
            "name": "X-Ledger-Atlas-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "ledger-atlas.portfolio.comparison"
            }
          },
          {
            "name": "X-Ledger-Atlas-Timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{10}$"
            }
          },
          {
            "name": "X-Ledger-Atlas-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^v1=[a-f0-9]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationPortfolioWebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The recipient accepted the event and its stable event ID."
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "base64url-32-byte-secret",
        "description": "Opaque caller-generated bearer. Keep private; send only in the Authorization header."
      },
      "integrationApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ledger-atlas-integration-key",
        "description": "Ledger Atlas-issued 32-byte integration bearer. Keep it server-side and send it only in the Authorization header."
      }
    },
    "schemas": {
      "ParcelSelection": {
        "type": "object",
        "required": [
          "evidenceId",
          "lotNumber",
          "planLabel",
          "objectId",
          "lotIdString"
        ],
        "properties": {
          "evidenceId": {
            "type": "string",
            "pattern": "^NSW-LOT-[1-9][0-9]*$"
          },
          "lotNumber": {
            "type": "string",
            "minLength": 1
          },
          "planLabel": {
            "type": "string",
            "pattern": "^[A-Z]+[0-9]+$"
          },
          "objectId": {
            "type": "integer",
            "minimum": 1
          },
          "lotIdString": {
            "type": "string",
            "minLength": 4
          }
        },
        "additionalProperties": false
      },
      "AddressSearchRequest": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "addressComponents"
            ],
            "properties": {
              "addressComponents": {
                "type": "object",
                "required": [
                  "streetNumber",
                  "streetName",
                  "streetType",
                  "suburb",
                  "postcode"
                ],
                "properties": {
                  "streetNumber": {
                    "type": "string",
                    "pattern": "^[0-9][0-9A-Za-z/-]{0,19}$"
                  },
                  "streetName": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "streetType": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "suburb": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "postcode": {
                    "type": "string",
                    "pattern": "^[0-9]{4}$"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "required": [
              "address"
            ],
            "properties": {
              "address": {
                "type": "string",
                "minLength": 3,
                "maxLength": 200
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "LotPlanSearchRequest": {
        "type": "object",
        "required": [
          "lotNumber",
          "dpNumber"
        ],
        "properties": {
          "lotNumber": {
            "type": "string",
            "minLength": 1,
            "maxLength": 6
          },
          "dpNumber": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^(?:DP\\s*)?[0-9]{1,13}$"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "ParcelPointIdentifyRequest": {
        "type": "object",
        "required": [
          "x",
          "y"
        ],
        "properties": {
          "x": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "y": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          }
        },
        "additionalProperties": false
      },
      "ParcelCandidate": {
        "type": "object",
        "required": [
          "evidenceId",
          "lotNumber",
          "planLabel",
          "lotIdString",
          "objectId",
          "geometry"
        ],
        "properties": {
          "evidenceId": {
            "type": "string"
          },
          "lotPlan": {
            "type": "string"
          },
          "lotNumber": {
            "type": "string"
          },
          "planLabel": {
            "type": "string"
          },
          "lotIdString": {
            "type": "string"
          },
          "objectId": {
            "type": "integer",
            "minimum": 1
          },
          "address": {
            "type": "string"
          },
          "geometry": {
            "type": "object",
            "required": [
              "rings",
              "spatialReference"
            ],
            "properties": {
              "rings": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "array",
                  "minItems": 4,
                  "items": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "number"
                      }
                    ],
                    "minItems": 2
                  }
                }
              },
              "spatialReference": {
                "type": "object",
                "required": [
                  "wkid"
                ],
                "properties": {
                  "wkid": {
                    "type": "integer",
                    "const": 7844
                  }
                },
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "AddressSearchResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "releaseHeld",
          "mayInterpretEmptyAsNoMatch",
          "candidates",
          "errors",
          "retrievedAt"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "nsw-address-parcel-search"
          },
          "state": {
            "type": "string",
            "enum": [
              "matched",
              "no-match",
              "no-parcel-match",
              "held"
            ]
          },
          "releaseHeld": {
            "type": "boolean"
          },
          "mayInterpretEmptyAsNoMatch": {
            "type": "boolean"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParcelCandidate"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "retrievedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "LotPlanSearchResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "releaseHeld",
          "mayInterpretEmptyAsNoMatch",
          "query",
          "retrievedAt",
          "candidates",
          "errors",
          "selection"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "nsw-lot-plan-parcel-search"
          },
          "state": {
            "type": "string",
            "enum": [
              "matched",
              "no-match",
              "held"
            ]
          },
          "releaseHeld": {
            "type": "boolean"
          },
          "mayInterpretEmptyAsNoMatch": {
            "type": "boolean"
          },
          "query": {
            "type": "object",
            "required": [
              "lotNumber",
              "planLabel"
            ],
            "properties": {
              "lotNumber": {
                "type": "string"
              },
              "planLabel": {
                "type": "string",
                "pattern": "^DP[0-9]+$"
              }
            },
            "additionalProperties": false
          },
          "retrievedAt": {
            "type": "string",
            "format": "date-time"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParcelCandidate"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "selection": {
            "type": "object",
            "required": [
              "automaticSelection",
              "confirmationRequired"
            ],
            "properties": {
              "automaticSelection": {
                "type": "boolean",
                "const": false
              },
              "confirmationRequired": {
                "type": "boolean",
                "const": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": true
      },
      "ParcelPointIdentifyResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "releaseHeld",
          "mayInterpretEmptyAsNoMatch",
          "query",
          "retrievedAt",
          "candidates",
          "errors",
          "selection"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "nsw-parcel-point-identify"
          },
          "state": {
            "type": "string",
            "enum": [
              "matched",
              "no-match",
              "ambiguous",
              "held"
            ]
          },
          "releaseHeld": {
            "type": "boolean"
          },
          "mayInterpretEmptyAsNoMatch": {
            "type": "boolean"
          },
          "query": {
            "type": "object",
            "required": [
              "x",
              "y",
              "spatialReference"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "spatialReference": {
                "type": "object",
                "required": [
                  "wkid"
                ],
                "properties": {
                  "wkid": {
                    "type": "integer",
                    "const": 7844
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "retrievedAt": {
            "type": "string",
            "format": "date-time"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParcelCandidate"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "selection": {
            "type": "object",
            "required": [
              "automaticSelection",
              "confirmationRequired"
            ],
            "properties": {
              "automaticSelection": {
                "type": "boolean",
                "const": false
              },
              "confirmationRequired": {
                "type": "boolean",
                "const": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": true
      },
      "EvidenceRunRequest": {
        "type": "object",
        "required": [
          "orderId",
          "parcelSelection",
          "radiusMetres"
        ],
        "properties": {
          "orderId": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$",
            "description": "Paid or authorised zero-amount order bound to this exact parcel. Its private bearer is supplied in Authorization or by the same-origin HttpOnly order cookie."
          },
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "radiusMetres": {
            "type": "integer",
            "const": 500
          }
        },
        "additionalProperties": false
      },
      "SourceCheck": {
        "type": "object",
        "required": [
          "id",
          "name",
          "authority",
          "status",
          "result",
          "limitation"
        ],
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "cadastre",
              "epa-notified",
              "epa-record-notices",
              "epa-poeo",
              "seed-groundwater",
              "seed-acid-sulfate",
              "npi",
              "planning-da",
              "bushfire-prone-land",
              "fire-history",
              "biodiversity-values",
              "flood-planning",
              "heritage-planning",
              "state-heritage-register",
              "state-heritage-inventory",
              "land-zoning",
              "planning-development-standards"
            ]
          },
          "name": {
            "type": "string"
          },
          "authority": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "current",
              "delayed",
              "stale",
              "missing",
              "unavailable",
              "conflicting",
              "outside-coverage"
            ]
          },
          "result": {
            "type": "string"
          },
          "limitation": {
            "type": "string"
          },
          "sourceDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "retrieved": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "EvidenceAttestation": {
        "type": "object",
        "required": [
          "kind",
          "evidenceRunId",
          "sourceSnapshotSha256",
          "signature"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "const": "ledger-atlas-server-evidence-attestation"
          },
          "evidenceRunId": {
            "type": "string",
            "pattern": "^LAER-[a-f0-9]{32}$"
          },
          "sourceSnapshotSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "signature": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "writeOnly": true
          }
        },
        "additionalProperties": true
      },
      "EvidenceRunResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "checkedAt",
          "parcel",
          "sourceSnapshot",
          "decision",
          "evidenceAttestation"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-server-evidence-run"
          },
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "partial",
              "review"
            ]
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "parcel": {
            "$ref": "#/components/schemas/ParcelCandidate"
          },
          "sourceSnapshot": {
            "type": "array",
            "minItems": 7,
            "maxItems": 7,
            "items": {
              "$ref": "#/components/schemas/SourceCheck"
            }
          },
          "decision": {
            "type": "object",
            "additionalProperties": true
          },
          "evidence": {
            "type": "object",
            "additionalProperties": true
          },
          "evidenceAttestation": {
            "$ref": "#/components/schemas/EvidenceAttestation"
          }
        },
        "additionalProperties": false
      },
      "BulkEvidenceRunItemRequest": {
        "type": "object",
        "required": [
          "clientReference",
          "parcelSelection",
          "radiusMetres",
          "parcelConfirmed"
        ],
        "properties": {
          "clientReference": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$",
            "description": "Caller-owned non-personal row reference returned unchanged."
          },
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "radiusMetres": {
            "type": "integer",
            "const": 500
          },
          "parcelConfirmed": {
            "type": "boolean",
            "const": true,
            "description": "The caller asserts that this exact candidate was explicitly confirmed using the Ledger Atlas parcel-confirmation workflow."
          }
        },
        "additionalProperties": false
      },
      "BulkEvidenceRunRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/BulkEvidenceRunItemRequest"
            }
          }
        },
        "additionalProperties": false
      },
      "BulkEvidenceRunItemResponse": {
        "type": "object",
        "required": [
          "clientReference",
          "state"
        ],
        "properties": {
          "clientReference": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "completed",
              "failed"
            ]
          },
          "evidenceRun": {
            "$ref": "#/components/schemas/EvidenceRunResponse"
          },
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "BulkEvidenceRunResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "itemCount",
          "completedCount",
          "failedCount",
          "processing",
          "items"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-bulk-evidence-run"
          },
          "state": {
            "type": "string",
            "enum": [
              "complete",
              "partial",
              "failed"
            ]
          },
          "itemCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "completedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "failedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "processing": {
            "type": "string",
            "const": "sequential"
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/BulkEvidenceRunItemResponse"
            }
          }
        },
        "additionalProperties": false
      },
      "IntegrationCapabilitiesResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "clientId",
          "keyId",
          "scopes",
          "credentialsReturned",
          "usage",
          "routes",
          "callerTools",
          "publicContracts"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-integration-capabilities"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          },
          "clientId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
          },
          "keyId": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
          },
          "scopes": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "bulk-evidence:create",
                "bulk-reports:create"
              ]
            }
          },
          "credentialsReturned": {
            "type": "boolean",
            "const": false
          },
          "usage": {
            "type": "object",
            "required": [
              "state",
              "acceptedScopedRequestCount",
              "lastAuthenticatedAt",
              "measure"
            ],
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "available",
                  "not-metered",
                  "unavailable"
                ]
              },
              "acceptedScopedRequestCount": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "lastAuthenticatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "measure": {
                "type": "string",
                "const": "accepted-scoped-authentications",
                "description": "Accepted scoped API authentications for this calling managed key. Not an invoice, quota, item count or completed-report total."
              }
            },
            "additionalProperties": false
          },
          "routes": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {
              "type": "object",
              "required": [
                "method",
                "path",
                "requiredScope",
                "maximumItems",
                "rateLimit"
              ],
              "properties": {
                "method": {
                  "type": "string",
                  "const": "POST"
                },
                "path": {
                  "type": "string"
                },
                "requiredScope": {
                  "type": "string",
                  "enum": [
                    "bulk-evidence:create",
                    "bulk-reports:create"
                  ]
                },
                "maximumItems": {
                  "type": "integer",
                  "const": 10
                },
                "rateLimit": {
                  "type": "object",
                  "required": [
                    "burst",
                    "sustained"
                  ],
                  "properties": {
                    "burst": {
                      "type": "object",
                      "required": [
                        "windowSeconds",
                        "maximumRequests"
                      ],
                      "properties": {
                        "windowSeconds": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "maximumRequests": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "additionalProperties": false
                    },
                    "sustained": {
                      "type": "object",
                      "required": [
                        "windowSeconds",
                        "maximumRequests"
                      ],
                      "properties": {
                        "windowSeconds": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "maximumRequests": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "callerTools": {
            "type": "object",
            "required": [
              "maximumPortfolioItems",
              "reportBatchSize",
              "signedWebhookDelivery"
            ],
            "properties": {
              "maximumPortfolioItems": {
                "type": "integer",
                "const": 1000
              },
              "reportBatchSize": {
                "type": "integer",
                "const": 10
              },
              "signedWebhookDelivery": {
                "type": "object",
                "required": [
                  "eventType",
                  "signatureAlgorithm",
                  "checkedEventsIncludedByDefault",
                  "maximumAttempts"
                ],
                "properties": {
                  "eventType": {
                    "type": "string",
                    "const": "ledger-atlas.portfolio.comparison"
                  },
                  "signatureAlgorithm": {
                    "type": "string",
                    "const": "HMAC-SHA256"
                  },
                  "checkedEventsIncludedByDefault": {
                    "type": "boolean",
                    "const": false
                  },
                  "maximumAttempts": {
                    "type": "integer",
                    "const": 3
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "publicContracts": {
            "type": "object",
            "required": [
              "openApi",
              "publicBulkCatalogue"
            ],
            "properties": {
              "openApi": {
                "type": "string",
                "const": "/openapi.json"
              },
              "publicBulkCatalogue": {
                "type": "string",
                "const": "/data/ledger-atlas-public-bulk-catalogue.json"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "IntegrationBulkReportItemRequest": {
        "type": "object",
        "required": [
          "clientReference",
          "parcelSelection",
          "radiusMetres",
          "parcelConfirmed",
          "reportId",
          "reportAccessToken"
        ],
        "properties": {
          "clientReference": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$",
            "description": "Caller-owned non-personal row reference returned unchanged."
          },
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "radiusMetres": {
            "type": "integer",
            "const": 500
          },
          "parcelConfirmed": {
            "type": "boolean",
            "const": true
          },
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$",
            "description": "Caller-owned durable report ID. Reusing the same ID and bearer makes a completed retry idempotent."
          },
          "reportAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true,
            "description": "Caller-generated 32-byte unpadded-base64url bearer. It is hashed by Ledger Atlas and never returned."
          }
        },
        "additionalProperties": false
      },
      "IntegrationBulkReportRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/IntegrationBulkReportItemRequest"
            }
          }
        },
        "additionalProperties": false
      },
      "IntegrationBulkReportItemResponse": {
        "type": "object",
        "required": [
          "clientReference",
          "state"
        ],
        "properties": {
          "clientReference": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "persisted",
              "failed"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "evidence",
              "report"
            ]
          },
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "persistedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "withdrawn"
            ]
          },
          "idempotent": {
            "type": "boolean"
          },
          "manifestSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "retrievalPath": {
            "type": "string"
          },
          "verificationPath": {
            "type": "string"
          },
          "exportPaths": {
            "$ref": "#/components/schemas/ReportExportPaths"
          }
        },
        "additionalProperties": false
      },
      "IntegrationBulkReportResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "state",
          "itemCount",
          "persistedCount",
          "failedCount",
          "processing",
          "credentialsReturned",
          "items"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-integration-bulk-reports"
          },
          "state": {
            "type": "string",
            "enum": [
              "complete",
              "partial",
              "failed"
            ]
          },
          "itemCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "persistedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "failedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "processing": {
            "type": "string",
            "const": "sequential"
          },
          "credentialsReturned": {
            "type": "boolean",
            "const": false
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/IntegrationBulkReportItemResponse"
            }
          }
        },
        "additionalProperties": false
      },
      "ReportCreateRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PublicReportCreateRequest"
          },
          {
            "$ref": "#/components/schemas/IntegrationReportCreateRequest"
          }
        ],
        "description": "The active delivery channel selects the valid form: public-browser creation requires the paid orderId, while contracted integration creation omits it."
      },
      "PublicReportCreateRequest": {
        "type": "object",
        "required": [
          "orderId",
          "parcelSelection",
          "report",
          "accessToken",
          "evidenceAttestation"
        ],
        "properties": {
          "orderId": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$",
            "description": "The same paid order claimed and completed by the evidence run."
          },
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "report": {
            "type": "object",
            "description": "Canonical report compiled from the exact evidence-run sourceSnapshot.",
            "additionalProperties": true
          },
          "accessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "evidenceAttestation": {
            "$ref": "#/components/schemas/EvidenceAttestation"
          }
        },
        "additionalProperties": false
      },
      "IntegrationReportCreateRequest": {
        "type": "object",
        "required": [
          "parcelSelection",
          "report",
          "accessToken",
          "evidenceAttestation"
        ],
        "properties": {
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "report": {
            "type": "object",
            "description": "Canonical report compiled from the exact evidence-run sourceSnapshot.",
            "additionalProperties": true
          },
          "accessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "evidenceAttestation": {
            "$ref": "#/components/schemas/EvidenceAttestation"
          }
        },
        "description": "Internal request shape used by the separately authenticated contracted-integration report flow.",
        "additionalProperties": false
      },
      "ReportCreateResponse": {
        "type": "object",
        "required": [
          "state",
          "reportId",
          "version",
          "status",
          "manifestSha256",
          "retrievalPath",
          "verificationPath",
          "exportPaths"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "persisted"
          },
          "idempotent": {
            "type": "boolean"
          },
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "withdrawn"
            ]
          },
          "manifestSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "retrievalPath": {
            "type": "string"
          },
          "verificationPath": {
            "type": "string"
          },
          "exportPaths": {
            "$ref": "#/components/schemas/ReportExportPaths"
          }
        },
        "additionalProperties": true
      },
      "ReportRecordResponse": {
        "type": "object",
        "required": [
          "state",
          "reportId",
          "manifestSha256",
          "exportPaths",
          "record"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "available"
          },
          "reportId": {
            "type": "string"
          },
          "manifestSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "exportPaths": {
            "$ref": "#/components/schemas/ReportExportPaths"
          },
          "record": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "ReportExportPaths": {
        "type": "object",
        "required": [
          "evidenceManifest",
          "findingsCsv",
          "parcelGeoJson",
          "reportPdf"
        ],
        "properties": {
          "evidenceManifest": {
            "type": "string"
          },
          "findingsCsv": {
            "type": "string"
          },
          "parcelGeoJson": {
            "type": "string"
          },
          "reportPdf": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ReportEvidenceManifestExport": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "reportId",
          "reportVersion",
          "generatedAt",
          "persistedAt",
          "status",
          "integrity",
          "canonicalRecord"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-report-evidence-manifest"
          },
          "reportId": {
            "type": "string"
          },
          "reportVersion": {
            "type": "integer",
            "minimum": 1
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "persistedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "withdrawn"
            ]
          },
          "integrity": {
            "type": "object",
            "required": [
              "algorithm",
              "scope",
              "value",
              "verificationPath"
            ],
            "properties": {
              "algorithm": {
                "type": "string",
                "const": "SHA-256"
              },
              "scope": {
                "type": "string"
              },
              "value": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "verificationPath": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "canonicalRecord": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      },
      "ReportParcelGeoJsonExport": {
        "type": "object",
        "required": [
          "type",
          "report_id",
          "report_version",
          "report_manifest_sha256",
          "coordinate_reference_system",
          "rfc7946_notice",
          "features"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "FeatureCollection"
          },
          "report_id": {
            "type": "string"
          },
          "report_version": {
            "type": "integer",
            "minimum": 1
          },
          "report_manifest_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "coordinate_reference_system": {
            "type": "string",
            "const": "GDA2020 geographic 2D / EPSG:7844"
          },
          "rfc7946_notice": {
            "type": "string"
          },
          "features": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "ReportVerificationResponse": {
        "type": "object",
        "required": [
          "state",
          "reportId",
          "version",
          "status",
          "manifestSha256"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "verified"
          },
          "reportId": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "withdrawn"
            ]
          },
          "manifestSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "additionalProperties": true
      },
      "ReportComparisonReference": {
        "type": "object",
        "required": [
          "reportId",
          "accessToken"
        ],
        "properties": {
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "accessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true,
            "description": "The private bearer originally supplied for this report. It is authenticated but never returned."
          }
        },
        "additionalProperties": false
      },
      "ReportComparisonRequest": {
        "type": "object",
        "required": [
          "baseline",
          "current"
        ],
        "properties": {
          "baseline": {
            "$ref": "#/components/schemas/ReportComparisonReference"
          },
          "current": {
            "$ref": "#/components/schemas/ReportComparisonReference"
          }
        },
        "additionalProperties": false
      },
      "ReportComparisonEvent": {
        "type": "object",
        "required": [
          "schemaVersion",
          "eventId",
          "generatedAt",
          "kind",
          "state",
          "comparison",
          "sourceHealth",
          "message",
          "limitation",
          "reviewRequired",
          "nextAction",
          "integrity"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "eventId": {
            "type": "string",
            "pattern": "^PCM-[A-F0-9]{32}$"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "checked",
              "evidence-change",
              "source-health",
              "parcel-control"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "checked-no-matching-source-change",
              "changed",
              "delayed",
              "stale",
              "missing",
              "unavailable",
              "conflict",
              "recovered",
              "not-applicable",
              "needs-reconfirmation"
            ]
          },
          "changeType": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "added",
              "modified",
              "removed-from-source",
              "re-linked",
              "corrected",
              null
            ]
          },
          "baselineRelease": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "currentRelease": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "comparison": {
            "type": "object",
            "additionalProperties": true
          },
          "sourceHealth": {
            "type": "object",
            "additionalProperties": true
          },
          "message": {
            "type": "string"
          },
          "limitation": {
            "type": "string"
          },
          "reviewRequired": {
            "type": "boolean"
          },
          "nextAction": {
            "type": "string"
          },
          "integrity": {
            "type": "object",
            "required": [
              "algorithm",
              "scope",
              "value"
            ],
            "properties": {
              "algorithm": {
                "type": "string",
                "const": "SHA-256"
              },
              "scope": {
                "type": "string"
              },
              "value": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ReportComparisonResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "comparisonId",
          "state",
          "comparedAt",
          "diffRuleVersion",
          "parcel",
          "baselineReport",
          "currentReport",
          "summary",
          "events",
          "boundaries",
          "integrity"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "ledger-atlas-report-comparison"
          },
          "comparisonId": {
            "type": "string",
            "pattern": "^LAC-[A-F0-9]{32}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "checked",
              "attention",
              "review",
              "needs-reconfirmation"
            ]
          },
          "comparedAt": {
            "type": "string",
            "format": "date-time"
          },
          "diffRuleVersion": {
            "type": "string"
          },
          "parcel": {
            "type": "object",
            "additionalProperties": true
          },
          "baselineReport": {
            "type": "object",
            "additionalProperties": true
          },
          "currentReport": {
            "type": "object",
            "additionalProperties": true
          },
          "summary": {
            "type": "object",
            "additionalProperties": true
          },
          "events": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ReportComparisonEvent"
            }
          },
          "boundaries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "integrity": {
            "type": "object",
            "required": [
              "algorithm",
              "scope",
              "value"
            ],
            "properties": {
              "algorithm": {
                "type": "string",
                "const": "SHA-256"
              },
              "scope": {
                "type": "string"
              },
              "value": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "IntegrationPortfolioWebhookEvent": {
        "type": "object",
        "required": [
          "schemaVersion",
          "id",
          "type",
          "createdAt",
          "data"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "id": {
            "type": "string",
            "pattern": "^LAC-[A-F0-9]{32}$"
          },
          "type": {
            "type": "string",
            "const": "ledger-atlas.portfolio.comparison"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "required": [
              "clientReference",
              "comparison"
            ],
            "properties": {
              "clientReference": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
              },
              "comparison": {
                "$ref": "#/components/schemas/ReportComparisonResponse"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "CommerceProduct": {
        "type": "object",
        "required": [
          "id",
          "version",
          "name",
          "currency",
          "amountExGstCents",
          "estimatedGstCents",
          "estimatedTotalInclGstCents",
          "taxBehaviour",
          "taxEstimateNotice",
          "managedPayments",
          "stripeTaxCode",
          "orderKinds",
          "minimumItems",
          "maximumItems"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "const": "AUD"
          },
          "amountExGstCents": {
            "type": "integer",
            "minimum": 1
          },
          "estimatedGstCents": {
            "type": "integer",
            "minimum": 0
          },
          "estimatedTotalInclGstCents": {
            "type": "integer",
            "minimum": 1
          },
          "taxBehaviour": {
            "type": "string",
            "const": "exclusive"
          },
          "taxEstimateNotice": {
            "type": "string"
          },
          "managedPayments": {
            "type": "boolean",
            "const": true
          },
          "stripeTaxCode": {
            "type": "string",
            "const": "txcd_10103100"
          },
          "priceLabel": {
            "type": "string"
          },
          "unitLabel": {
            "type": "string"
          },
          "orderKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single-report",
                "batch-reports"
              ]
            }
          },
          "recommendedFor": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "single-report",
                "batch-reports"
              ]
            }
          },
          "minimumItems": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "maximumItems": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "includedOutputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopeNotice": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ProductCatalogueResponse": {
        "type": "object",
        "required": [
          "schemaVersion",
          "state",
          "checkoutMode",
          "managedPayments",
          "promotionCodesAccepted",
          "checkoutAvailable",
          "checkoutBlockers",
          "products"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "const": 1
          },
          "state": {
            "type": "string",
            "const": "available"
          },
          "checkoutMode": {
            "type": "string",
            "enum": [
              "unconfigured",
              "test",
              "live"
            ]
          },
          "managedPayments": {
            "type": "boolean",
            "const": true
          },
          "promotionCodesAccepted": {
            "type": "boolean",
            "const": true
          },
          "checkoutAvailable": {
            "type": "boolean"
          },
          "checkoutBlockers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commercialPolicy": {
            "type": "object",
            "additionalProperties": true
          },
          "pricesExcludeGst": {
            "type": "boolean",
            "const": true
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommerceProduct"
            }
          }
        },
        "additionalProperties": true
      },
      "OrderCreateRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ParcelBoundOrderCreateRequest"
          },
          {
            "$ref": "#/components/schemas/ReportBoundOrderCreateRequest"
          }
        ],
        "description": "Use parcelSelection for the pre-search public-browser flow. The reportId/reportAccessToken form is retained for compatible legacy report-bound checkout."
      },
      "ParcelBoundOrderCreateRequest": {
        "type": "object",
        "required": [
          "productId",
          "parcelSelection",
          "orderAccessToken",
          "scopeAccepted",
          "commercialTermsAccepted",
          "commercialTermsVersion",
          "refundPolicyAcknowledged",
          "refundPolicyVersion",
          "customerReference"
        ],
        "properties": {
          "productId": {
            "type": "string",
            "const": "nsw-environmental-evidence-screen"
          },
          "parcelSelection": {
            "$ref": "#/components/schemas/ParcelSelection"
          },
          "orderAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "scopeAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsVersion": {
            "type": "string"
          },
          "refundPolicyAcknowledged": {
            "type": "boolean",
            "const": true
          },
          "refundPolicyVersion": {
            "type": "string"
          },
          "customerReference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        },
        "additionalProperties": false
      },
      "ReportBoundOrderCreateRequest": {
        "type": "object",
        "required": [
          "productId",
          "reportId",
          "reportAccessToken",
          "orderAccessToken",
          "scopeAccepted",
          "commercialTermsAccepted",
          "commercialTermsVersion",
          "refundPolicyAcknowledged",
          "refundPolicyVersion",
          "customerReference"
        ],
        "properties": {
          "productId": {
            "type": "string",
            "const": "nsw-environmental-evidence-screen"
          },
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "reportAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "orderAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "scopeAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsVersion": {
            "type": "string"
          },
          "refundPolicyAcknowledged": {
            "type": "boolean",
            "const": true
          },
          "refundPolicyVersion": {
            "type": "string"
          },
          "customerReference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        },
        "additionalProperties": false
      },
      "ParcelOrderBinding": {
        "type": "object",
        "required": [
          "evidenceId",
          "objectId",
          "lotIdString"
        ],
        "properties": {
          "evidenceId": {
            "type": "string",
            "pattern": "^NSW-LOT-[1-9][0-9]*$"
          },
          "objectId": {
            "type": "integer",
            "minimum": 1
          },
          "lotIdString": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "additionalProperties": false
      },
      "OrderCreateResponse": {
        "type": "object",
        "required": [
          "state",
          "orderId",
          "reportId",
          "parcelBinding",
          "fulfilmentState",
          "checkoutUrl",
          "checkoutSessionId"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "checkout-ready"
          },
          "orderId": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          },
          "reportId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$",
            "description": "Null for a parcel-bound order until the paid evidence run is persisted as a report."
          },
          "reportVersion": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "reportManifestSha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-f0-9]{64}$"
          },
          "parcelBinding": {
            "$ref": "#/components/schemas/ParcelOrderBinding"
          },
          "fulfilmentState": {
            "type": "string",
            "enum": [
              "awaiting-evidence",
              "evidence-complete",
              "report-bound"
            ]
          },
          "checkoutUrl": {
            "type": "string",
            "format": "uri"
          },
          "checkoutSessionId": {
            "type": "string",
            "pattern": "^cs_(?:test|live)_[A-Za-z0-9_]+$"
          },
          "checkoutExpiresAt": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        },
        "additionalProperties": true
      },
      "BatchOrderItemRequest": {
        "type": "object",
        "required": [
          "clientReference",
          "reportId",
          "reportAccessToken"
        ],
        "properties": {
          "clientReference": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$"
          },
          "reportId": {
            "type": "string",
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "reportAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          }
        },
        "additionalProperties": false
      },
      "BatchOrderCreateRequest": {
        "type": "object",
        "required": [
          "productId",
          "items",
          "orderAccessToken",
          "scopeAccepted",
          "commercialTermsAccepted",
          "commercialTermsVersion",
          "refundPolicyAcknowledged",
          "refundPolicyVersion",
          "customerReference"
        ],
        "properties": {
          "productId": {
            "type": "string",
            "const": "nsw-environmental-evidence-screen"
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/BatchOrderItemRequest"
            }
          },
          "orderAccessToken": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "writeOnly": true
          },
          "scopeAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsAccepted": {
            "type": "boolean",
            "const": true
          },
          "commercialTermsVersion": {
            "type": "string"
          },
          "refundPolicyAcknowledged": {
            "type": "boolean",
            "const": true
          },
          "refundPolicyVersion": {
            "type": "string"
          },
          "customerReference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        },
        "additionalProperties": false
      },
      "BatchOrderReportBinding": {
        "type": "object",
        "required": [
          "clientReference",
          "reportId",
          "reportVersion",
          "reportManifestSha256"
        ],
        "properties": {
          "clientReference": {
            "type": "string"
          },
          "reportId": {
            "type": "string"
          },
          "reportVersion": {
            "type": "integer",
            "minimum": 1
          },
          "reportManifestSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "additionalProperties": false
      },
      "BatchOrderCreateResponse": {
        "type": "object",
        "required": [
          "state",
          "orderKind",
          "orderId",
          "itemCount",
          "reports",
          "checkoutUrl",
          "checkoutSessionId"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "checkout-ready"
          },
          "orderKind": {
            "type": "string",
            "const": "batch-reports"
          },
          "orderId": {
            "type": "string"
          },
          "itemCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "reports": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "$ref": "#/components/schemas/BatchOrderReportBinding"
            }
          },
          "checkoutUrl": {
            "type": "string",
            "format": "uri"
          },
          "checkoutSessionId": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "OrderRecordResponse": {
        "type": "object",
        "required": [
          "state",
          "orderId",
          "status",
          "reportId",
          "reportManifestSha256",
          "parcelBinding",
          "fulfilmentState",
          "invoiceState",
          "invoicePdfPath"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "available"
          },
          "orderId": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "checkout-open",
              "processing",
              "paid",
              "expired",
              "payment-failed",
              "refunded"
            ]
          },
          "reportId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^LAT-NSW-[0-9]{14}-[1-9][0-9]*$"
          },
          "reportVersion": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "reportManifestSha256": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-f0-9]{64}$"
          },
          "parcelBinding": {
            "$ref": "#/components/schemas/ParcelOrderBinding"
          },
          "fulfilmentState": {
            "type": "string",
            "enum": [
              "awaiting-evidence",
              "evidence-complete",
              "report-bound"
            ]
          },
          "evidenceRunId": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^LAER-[a-f0-9]{32}$"
          },
          "invoiceState": {
            "type": "string",
            "enum": [
              "not-created",
              "not-required",
              "pending",
              "available"
            ]
          },
          "invoicePdfPath": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "OrderSupportRequestCreate": {
        "type": "object",
        "required": [
          "supportRequestId",
          "category",
          "message"
        ],
        "properties": {
          "supportRequestId": {
            "type": "string",
            "pattern": "^LASR-[A-Za-z0-9_-]{16,64}$",
            "description": "Caller-generated idempotency and customer receipt identifier."
          },
          "category": {
            "type": "string",
            "enum": [
              "correction",
              "refund",
              "delivery",
              "billing",
              "privacy",
              "other"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 20,
            "maxLength": 2000
          }
        },
        "additionalProperties": false
      },
      "OrderSupportRequestReceipt": {
        "type": "object",
        "required": [
          "supportRequestId",
          "category",
          "message",
          "state",
          "requestedAt"
        ],
        "properties": {
          "supportRequestId": {
            "type": "string",
            "pattern": "^LASR-[A-Za-z0-9_-]{16,64}$"
          },
          "category": {
            "type": "string",
            "enum": [
              "correction",
              "refund",
              "delivery",
              "billing",
              "privacy",
              "other"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 20,
            "maxLength": 2000
          },
          "state": {
            "type": "string",
            "const": "received"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "OrderSupportRequestResponse": {
        "type": "object",
        "required": [
          "state",
          "idempotent",
          "orderId",
          "supportRequest"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "received"
          },
          "idempotent": {
            "type": "boolean"
          },
          "orderId": {
            "type": "string",
            "pattern": "^LAO-NSW-[0-9]{14}-[a-f0-9]{12}$"
          },
          "supportRequest": {
            "$ref": "#/components/schemas/OrderSupportRequestReceipt"
          }
        },
        "additionalProperties": false
      },
      "OrderVerificationResponse": {
        "type": "object",
        "required": [
          "state",
          "orderId",
          "status",
          "entitlementState"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "verified"
          },
          "orderId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "checkout-open",
              "processing",
              "paid",
              "expired",
              "payment-failed",
              "refunded"
            ]
          },
          "entitlementState": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "pending",
              "inactive"
            ]
          }
        },
        "additionalProperties": true
      },
      "EntitledReportResponse": {
        "type": "object",
        "required": [
          "state",
          "entitlement",
          "reportStatus",
          "record"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "entitled"
          },
          "entitlement": {
            "type": "object",
            "required": [
              "state",
              "orderId",
              "reportId",
              "reportVersion",
              "reportManifestSha256"
            ],
            "properties": {
              "state": {
                "type": "string",
                "const": "active"
              },
              "orderId": {
                "type": "string"
              },
              "reportId": {
                "type": "string"
              },
              "reportVersion": {
                "type": "integer",
                "minimum": 1
              },
              "reportManifestSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "additionalProperties": true
          },
          "reportStatus": {
            "type": "string",
            "enum": [
              "active",
              "superseded",
              "withdrawn"
            ]
          },
          "record": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "EntitledReportsResponse": {
        "type": "object",
        "required": [
          "state",
          "entitlement",
          "reports"
        ],
        "properties": {
          "state": {
            "type": "string",
            "const": "entitled"
          },
          "entitlement": {
            "type": "object",
            "required": [
              "state",
              "kind",
              "orderId",
              "itemCount"
            ],
            "properties": {
              "state": {
                "type": "string",
                "const": "active"
              },
              "kind": {
                "type": "string",
                "const": "batch-report-bound-evidence-pack"
              },
              "orderId": {
                "type": "string"
              },
              "itemCount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              }
            },
            "additionalProperties": false
          },
          "reports": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "object",
              "required": [
                "clientReference",
                "entitlement",
                "reportStatus",
                "record"
              ],
              "properties": {
                "clientReference": {
                  "type": "string"
                },
                "entitlement": {
                  "type": "object",
                  "required": [
                    "state",
                    "kind",
                    "orderId",
                    "purchasedReportId",
                    "reportId",
                    "reportVersion",
                    "reportManifestSha256",
                    "correctionState"
                  ],
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "active"
                    },
                    "kind": {
                      "type": "string",
                      "const": "report-bound-evidence-pack"
                    },
                    "orderId": {
                      "type": "string"
                    },
                    "purchasedReportId": {
                      "type": "string"
                    },
                    "reportId": {
                      "type": "string"
                    },
                    "reportVersion": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "reportManifestSha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "correctionState": {
                      "type": "string",
                      "enum": [
                        "original-report",
                        "replacement-issued"
                      ]
                    },
                    "correctedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "correctionReason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "reportStatus": {
                  "type": "string",
                  "enum": [
                    "active",
                    "superseded",
                    "withdrawn"
                  ]
                },
                "record": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "schemaVersion": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "error",
              "held",
              "unavailable"
            ]
          },
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      }
    },
    "responses": {
      "CrossOriginBlocked": {
        "description": "A foreign browser Origin was rejected.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RequestTooLarge": {
        "description": "The request exceeded the route byte limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ContentTypeInvalid": {
        "description": "Content-Type must be application/json.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "The request, parcel binding or source response failed validation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimited": {
        "description": "The governed burst or sustained limit was exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "headers": {
          "RateLimit-Limit": {
            "schema": {
              "type": "integer"
            }
          },
          "RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            }
          },
          "RateLimit-Reset": {
            "schema": {
              "type": "integer"
            }
          },
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "SourceUnavailable": {
        "description": "A required adapter, secret, store, limiter or upstream source was unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BearerRequired": {
        "description": "The private bearer was absent or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "IntegrationKeyRequired": {
        "description": "The integration bearer was absent or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "IntegrationAccessDenied": {
        "description": "The request came from a foreign browser origin or the integration bearer lacks the required scope.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "The requested durable record was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "The identifier, attestation, report or order binding conflicts with an existing record.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "EvidencePaymentRequired": {
        "description": "A signed paid or authorised zero-amount order is required before the parcel or evidence sources are queried.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "BatchEntitlementRequired": {
        "description": "The public bulk route is unavailable until a prepaid batch entitlement contract is issued; no parcel or evidence source work was performed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "EntitlementPending": {
        "description": "The signed payment state has not activated the order or report entitlement.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "EntitlementRevoked": {
        "description": "The signed refund state has revoked the report entitlement.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "The HTTP method is not supported.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "security": [],
  "externalDocs": {
    "description": "Ledger Atlas source, evidence and limitation documentation",
    "url": "https://github.com/mgthemis/australian-property-environmental-intelligence"
  }
}
