Every approved price, no sign-in needed: products (plans, extension, numbers, add-ons) per 7-day period, and per-minute rates by destination prefix (US, international, incoming toll-free) with the destination's name. The plans (`kind: plan`) are the valid `planId` values for signup, e.g. `plan_standard`. Unavailable entries stay listed with `available: false` and must not be bought.
- Response
Catalog
Type definitions (8)
export interface Catalog {
catalog_version: string | null;
catalog_version_id: ID | null;
products: CatalogProduct[];
rates: CatalogRate[];
}
export type ID = string;
export interface CatalogProduct {
product_id: ID;
/** Stable code, e.g. "plan_standard" or "call_recording". */
code: string;
kind: ProductKind;
catalog_version_id: ID;
/** Price per `unit`, decimal USD. */
amount: string;
currency: string;
/** Always "week": recurring prices are per 7-day period. */
unit: string;
/** Unavailable entries must not be bought. */
available: boolean;
unavailable_reason: string | null;
/** Plans: `included_quantity` (extensions). Numbers: `number_type`. Add-ons: `addon_code`. */
product_details: Record<string, unknown>;
/** Plans: `included_us_seconds`. */
price_details: Record<string, unknown>;
}
export type ProductKind = "plan" | "extension" | "number" | "addon";
export interface CatalogRate {
kind: RateKind;
/** Destination prefix with "+", e.g. "+44". The longest matching prefix wins. */
prefix: string;
/** Matched when rating: empty, or `US` for incoming toll-free. */
region: string;
/** Destination name, e.g. "United Kingdom". */
destination: string;
/** Decimal USD per minute. */
amount_per_minute: string;
available: boolean;
unavailable_reason: string | null;
}
export type RateKind = "us_overage" | "international" | "toll_free";
export type Destination =
| { type: "extension"; extensionId: ID }
| { type: "ring_group"; ringGroupId: ID }
| { type: "ivr"; ivrMenuId: ID }
| { type: "voicemail"; extensionId: ID }
| { type: "external"; number: E164 }
| { type: "schedule"; businessHoursId: ID }
| { type: "repeat" }
| { type: "hangup" };
/** E.164 phone number, e.g. "+16315550142" */
export type E164 = string;