Source-agnostic approval workflow
AI agents, ERP integrations, or users propose changes via Change Sets. Reviewers inspect diffs, rate individual attributes, annotate text snippets, leave messages, and approve or reject — per-operation or in bulk. Approved changes are applied atomically to entities.
Source-Agnostic
Every change set has a source with type (agent, user, integration, import), a name, and optional context. Treat all sources equally.
Per-Operation Granularity
Each change set contains multiple operations. Each operation targets one entity and can be individually approved or rejected.
Feedback Loop
Rate individual attributes (good/bad), annotate text snippets, and exchange messages. Request revisions with an auto-computed feedback summary.
Confidence Scores
Each proposed change can include a confidence score (0–1) and reasoning text, letting reviewers focus on low-confidence suggestions first.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /change-sets | List change sets (filterable) |
| GET | /change-sets/stats | Get stats (pending, approved, applied) |
| POST | /change-sets | Create a change set |
| GET | /change-sets/:id | Get change set by ID |
| PUT | /change-sets/:id | Add operations (draft only) |
| DELETE | /change-sets/:id | Delete change set (draft only) |
| POST | /change-sets/:id/submit | Submit for approval |
| POST | /change-sets/:id/approve | Approve all operations |
| POST | /change-sets/:id/reject | Reject all operations |
| POST | /change-sets/:id/apply | Apply approved changes to entities |
| POST | /change-sets/:id/operations/:opId/approve | Approve a single operation |
| POST | /change-sets/:id/operations/:opId/reject | Reject a single operation |
| POST | /change-sets/:id/operations/:opId/rate | Rate an attribute (good/bad) |
| POST | /change-sets/:id/operations/:opId/annotate | Add snippet annotation |
| DELETE | /change-sets/:id/annotations/:annotationId | Remove snippet annotation |
| GET | /change-sets/:id/messages | Get feedback messages |
| POST | /change-sets/:id/messages | Send a message |
| POST | /change-sets/:id/request-revision | Request revision from source |
| POST | /change-sets/:id/resubmit | Resubmit after revision |
| GET | /records/:id/pending-changes | Get pending changes for an entity |
Returns all change sets, optionally filtered by status, source type, or schema.
| Parameter | Type | Description |
|---|---|---|
status | string? | Filter by status: draft, pending_approval, approved, rejected, applied, partially_applied, revision_requested |
sourceType | string? | Filter by source type: agent, user, integration, import |
schemaId | string? | Filter by schema ID |
Returns aggregate statistics for the change set dashboard.
Create a new change set in draft status. Add operations in the request body or later via PUT.
| Field | Type | Description |
|---|---|---|
title | string | Human-readable title |
description | string? | Optional description |
source.type | string | agent, user, integration, or import |
source.id | string? | Optional source identifier |
source.name | string | Display name of the source |
source.context | string? | Optional context (e.g. pipeline run ID) |
operations | Operation[] | Array of change operations (can be empty) |
operations[].type | string | create, update, or delete |
operations[].entityId | string? | Target entity ID (required for update/delete) |
operations[].schemaId | string | Schema ID for the target entity |
operations[].changes | Change[] | Array of proposed attribute changes |
operations[].changes[].attributeAlias | string | Attribute alias to change |
operations[].changes[].attributeName | string | Display name of the attribute |
operations[].changes[].scope | object? | Dimension scope (e.g. {"language":"en"}) |
operations[].changes[].oldValue | any? | Current value (for diff display) |
operations[].changes[].newValue | any | Proposed new value |
operations[].changes[].confidence | number? | Confidence score (0–1) |
operations[].changes[].reasoning | string? | Explanation for the change |
Retrieve a single change set by ID, including all operations and proposed changes.
Add more operations to a draft change set. Only works when status is draft.
Delete a change set. Only works when status is draft.
Submit a draft change set for approval. Validates that all referenced schemas and entities exist, and that the change set has at least one operation. Transitions status to pending_approval.
Approve all pending operations in the change set. Sets overall status to approved. Optionally include a review note.
Reject all pending operations. Sets overall status to rejected.
Apply all approved operations to entities. Creates/updates/deletes entities atomically. Creates audit entries for each change. Returns a summary of applied, skipped, and errored operations. Status becomes applied or partially_applied.
Per-Operation Actions
Approve a single operation within the change set. Only works when the change set is pending_approval and the operation is pending.
Reject a single operation. Optionally include a review note.
Feedback
Rate an individual attribute change as good or bad. This feedback is stored on the proposed change and included in revision request summaries.
| Field | Type | Description |
|---|---|---|
attributeAlias | string | The attribute to rate |
rating | string | good or bad |
Add a snippet annotation to a proposed change. Highlight specific text spans as good or bad with an optional note.
| Field | Type | Description |
|---|---|---|
attributeAlias | string | The attribute containing the text |
text | string | The selected text snippet |
startOffset | number | Character offset where the snippet starts |
endOffset | number | Character offset where the snippet ends |
sentiment | string | good or bad |
note | string? | Optional explanation |
Remove a snippet annotation by its ID.
Messages
Retrieve all feedback messages for a change set. Messages are ordered chronologically. Both humans and agents can participate in the thread.
Send a feedback message. Works in any status except draft. Can optionally target a specific operation.
| Field | Type | Description |
|---|---|---|
authorId | string | ID of the message author |
authorName | string | Display name |
authorType | string | user or agent |
body | string | Message text |
operationId | string? | Optional operation ID to scope the message |
Revision Loop
Request the source to revise the change set. Auto-computes a feedback summary (good/bad/unrated attribute counts, snippet count) and transitions status to revision_requested. Only works when status is pending_approval.
| Field | Type | Description |
|---|---|---|
requestedBy | string | ID of the reviewer requesting revision |
message | string? | Optional message to the source |
Resubmit a change set after revision. Resets all operation statuses to pending, increments revisionCount, and transitions to pending_approval. Only works when status is revision_requested.
Entity Integration
Get all pending change set operations that target a specific entity. Useful for showing "incoming changes" on the product detail page.