API · Schema
Schema reference
Canonical TypeScript shapes for every resource returned by the API.
Business
type Business = {
id: string; "c">// "biz_••••"
slug: string;
name: string;
tagline: string;
about: string;
city: string;
state: string; "c">// ISO subdivision
category: string;
rating: number; "c">// 0–5
review_count: number;
properties: string[]; "c">// descriptors agents filter on
founded: number; "c">// year
};Offering
type Offering = {
id: string; "c">// "off_••••"
business_id: string;
name: string;
kind: "product" | "service";
category: string;
price: { amount: number; currency: "USD"; unit: string };
description: string;
specifications: Record;
purpose: string[]; "c">// goals this offering serves
properties: string[]; "c">// soft descriptors ("light", "easy-to-use")
sla: {
lead_time_hours: number;
uptime_pct?: number;
response_time_ms?: number;
notes?: string;
};
warranty: { duration_days: number; terms: string };
}; Project (DAG)
type Project = {
id: string;
name: string;
description: string;
units: number;
nodes: { id: string; offering_id: string; qty: number }[];
edges: { from: string; to: string; label: string }[];
};Transaction
type Transaction = {
id: string;
status: "pending" | "committed" | "rolled_back" | "failed";
atomic: boolean;
total: { amount: number; currency: "USD" };
vendor_charges: {
vendor_id: string;
amount: number;
stripe_pi: string; "c">// Stripe PaymentIntent
}[];
rollback_token?: string;
committed_at?: string; "c">// ISO 8601
};Envelope
type Envelope= { data: T; meta: { request_id: string; latency_us: number; served_by: string; "c">// edge POP id schema_version: "v1"; }; };