Engineering manualAPI route source
/api/brands/basic/changes
Exact current route handler: hosted-app/app/api/brands/basic/changes/route.js
Methods: GET. Input signals: query parameters. Literal response-status signals: none detected.
Source: hosted-app/app/api/brands/basic/changes/route.js. Imports: ../../../../../lib/basic-brands.mjs, ../../../../../lib/comprehensive-pull.mjs, ../../../../../lib/supabase-rest.mjs, next/server. Exact source is shown for inspection; its presence does not prove authentication, validation or live behavior.
All API routes · API and execution contract
// GET /api/brands/basic/changes?id= | ?domain= — what changed between a saved
// basic read and the read saved before it (the latest read for a domain).
// Sessions and API keys with read_reports. Free; reads stored data only.
// See lib/basic-brands.mjs and lib/basic-changes.mjs.
import { NextResponse } from "next/server";
import { supabaseConfigFromEnv } from "../../../../../lib/supabase-rest.mjs";
import { bearerTokenFromHeader } from "../../../../../lib/comprehensive-pull.mjs";
import { getBasicReadChanges } from "../../../../../lib/basic-brands.mjs";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
const PRIVATE = { "cache-control": "private, no-store", "x-content-type-options": "nosniff" };
export async function GET(request) {
const params = new URL(request.url).searchParams;
const result = await getBasicReadChanges({ token: bearerTokenFromHeader(request.headers.get("authorization")), config: supabaseConfigFromEnv(process.env), readId: params.get("id") || "", domain: params.get("domain") || "" });
return NextResponse.json(result.body, { status: result.http_status, headers: PRIVATE });
}