Skip to main content

Changes

Understand how Diffy tracks and reports changes.

Accessing Changes

Changes are returned as part of domain details. When you fetch a domain, you get its recent changes:

GET /api/domains/:id

Response with Changes

{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"domain": "competitor.com",
"displayName": "Competitor",
"status": "active",
"pages": [...],
"recentChanges": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"pageId": "550e8400-e29b-41d4-a716-446655440001",
"domainId": "550e8400-e29b-41d4-a716-446655440000",
"orgId": "770e8400-e29b-41d4-a716-446655440000",
"changeType": "price_change",
"severity": "high",
"confidence": "0.95",
"summary": "Price increased from $99 to $129 on Pro plan",
"diffData": {
"before": "Starting at $99/month",
"after": "Starting at $129/month",
"stats": {
"additions": 1,
"deletions": 1,
"changes": 1
}
},
"snapshotBeforeId": "880e8400-e29b-41d4-a716-446655440000",
"snapshotAfterId": "880e8400-e29b-41d4-a716-446655440001",
"acknowledgedAt": null,
"acknowledgedBy": null,
"createdAt": "2024-01-15T10:30:00Z"
}
],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}

Change Object

FieldTypeDescription
iduuidUnique change identifier
pageIduuidPage where change was detected
domainIduuidDomain the page belongs to
changeTypestringClassification of the change
severitystringImpact level: critical, high, medium, low
confidencedecimalDetection confidence (0.00 to 1.00)
summarystringHuman-readable description
diffDataobjectDetailed diff information
snapshotBeforeIduuidReference to previous snapshot
snapshotAfterIduuidReference to new snapshot
acknowledgedAtdatetimeWhen change was acknowledged (if any)
createdAtdatetimeWhen change was detected

Change Types

TypeDescription
price_changePricing modification
feature_addedNew feature announced
feature_removedFeature deprecated or removed
terms_updateLegal or terms change
section_addedNew content section added
section_removedContent section removed
content_changeGeneral content modification

Severity Levels

SeverityDescriptionExample
criticalMajor business impactCompetitor discontinued a product
highSignificant changePrice increase over 20%
mediumNotable changeNew feature added
lowMinor changeText correction

Diff Data Structure

The diffData object contains:

{
"before": "Original text content",
"after": "Modified text content",
"stats": {
"additions": 5,
"deletions": 2,
"changes": 3
},
"hunks": [
{
"oldStart": 10,
"oldLines": 3,
"newStart": 10,
"newLines": 5,
"lines": [
{ "type": "context", "content": "unchanged line" },
{ "type": "deletion", "content": "removed line" },
{ "type": "addition", "content": "added line" }
]
}
]
}

Future: Dedicated Changes API

Coming Soon

A dedicated Changes API with filtering, pagination, and search is planned for a future release. This will include:

  • GET /api/changes - List all changes across domains
  • GET /api/changes/:id - Get detailed change information
  • Filtering by severity, change type, date range
  • Full-text search in change summaries