nozle.margin.*) and REST API (GET /api/v1/margin/*). Secret key required.
Summary — overall margin overview:
from/to date range parameters (ISO 8601 format).Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Query margin data by customer, metric, plan, and model
nozle.margin.*) and REST API (GET /api/v1/margin/*). Secret key required.
Summary — overall margin overview:
const summary = await nozle.margin.summary({
from: '2026-07-01',
to: '2026-07-31'
});
const byCustomer = await nozle.margin.byCustomer({
from: '2026-07-01',
to: '2026-07-31'
});
const byMetric = await nozle.margin.byMetric();
const byPlan = await nozle.margin.byPlan();
const byModel = await nozle.margin.byModel();
const trend = await nozle.margin.trend({
from: '2026-07-01',
to: '2026-08-31',
granularity: 'week', // 'hour' | 'day' | 'week' | 'month'
});
curl -X POST https://api.nozle.app/api/v1/margin/simulate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "plan_code": "growth", "price_change_percent": 10 }'
from/to date range parameters (ISO 8601 format).