Presets

Restore an earlier preset version

Replays an earlier version's preset content as a NEW version on top of the current state.

For example, restoring v3 while at v8 produces v9 whose content equals v3's. Intermediate versions (v4-v8) remain queryable through the history endpoints — restore never destroys history.

post/v1/presets/restore

Request

  • Base URL: https://api.handoff.ai
  • URL: https://api.handoff.ai/v1/presets/restore
  • Auth: HTTP bearer

Request body

forType'MATCHING' | 'ESTIMATE' | 'TAKEOFF' | 'TRADE_REPORT'

Preset workflow type. Defaults to MATCHING.

versioninteger required

The version to restore. The restored content is written as a NEW version equal to current+1; intermediate versions are preserved in history.

changeDescriptionstring

Human-readable description of why this restore is happening. Required when called from the internal admin UI; optional for external callers (defaults to "Restored from v{version}").

storeReferencestring

Store/region identifier scoping the preset row.

customerReferencestring

Customer identifier scoping the preset row.

targetClientIdstring uuid

Example request

{
  "forType": "MATCHING",
  "version": 3,
  "changeDescription": "Reverting accidental clearing of premium-materials presets",
  "storeReference": "STORE-NYC-001",
  "customerReference": "CUST-12345"
}

Response

Restore applied; returns the new current version.

presetIdstring uuid nullable required

Unique identifier for this preset configuration. Null if no presets exist yet.

storeReferencestring nullable required

Store reference if store-specific, null otherwise

customerReferencestring nullable required

Customer reference if customer-specific, null otherwise

forType'MATCHING' | 'ESTIMATE' | 'TAKEOFF' | 'TRADE_REPORT' required

Preset workflow type

presetsstring[] required

List of preset instructions

versioninteger required

Monotonic version number for this preset row. Starts at 1 and increments on every write.

changeDescriptionstring nullable required

Description of the change that produced the current version, or null for pre-versioning rows.

createdAtstring date-time required

ISO 8601 timestamp of preset creation

updatedAtstring date-time required

ISO 8601 timestamp of last update

warningsstring[]

Non-fatal validation warnings for the saved presets (e.g. a TAKEOFF_PRODUCT: tag naming an unknown product — such presets never apply to any job until fixed)

Example response

{
  "presetId": "e3f4a5b6-c7d8-4e9f-0a1b-2c3d4e5f6a7b",
  "storeReference": "STORE-NYC-001",
  "forType": "MATCHING",
  "presets": [
    "Include 10% waste factor for all lumber",
    "Prefer in-stock items over special orders",
    "Use premium grade materials for structural components"
  ],
  "version": 3,
  "changeDescription": "Added premium-materials preset for high-end residential customers",
  "createdAt": "2025-12-05T16:30:00Z",
  "updatedAt": "2025-12-05T16:30:00Z",
  "warnings": [
    "Preset 2 has an unrecognized TAKEOFF_PRODUCT tag (\"WINDOW_DOORS\") and will never apply to any job"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.