Quickstart
Quickstart setup
Install the SDK, authenticate, and make your first request to the Pierflow API in under five minutes.
Install the SDK#
Pierflow ships an official Node SDK. A Python SDK is on the way; in the meantime, every endpoint is callable directly over HTTPS.
terminal
bashnpm install @pierflow/nodeAuthenticate#
Set your sandbox secret key as PIERFLOW_KEY in your environment. The SDK reads it automatically.
server.ts
tsimport Pierflow from '@pierflow/node';
const pf = new Pierflow({
apiKey: process.env.PIERFLOW_KEY,
environment: 'sandbox', // or 'production'
});Make your first call#
List the plans available in the sandbox. The response includes a value_score on every plan — the platform's AI ranking signal.
list-plans.ts
tsconst plans = await pf.plans.list({ budget_ngn: 120000 });
console.log(plans[0]);
// {
// plan_id: 'pf_plan_01HX...',
// name: 'Silver Plan',
// value_score: 88,
// ...
// }Prefer curl?
Every endpoint is plain JSON over HTTPS:
bash
bashcurl https://sandbox.api.pierflow.com/v1/plans?budget_ngn=120000 \
-H "Authorization: Bearer $PIERFLOW_KEY"