Legacy documentation. These pages are inherited from the upstream OpenAffiliate project and may describe endpoints, packages and repositories that Afftera does not operate. For what this site publishes today, see About.
References
TypeScript SDK
Typed client for searching and querying programs.
Install
install
npm install openaffiliate-sdkUsage
TypeScript
import { searchPrograms, getProgram } from "openaffiliate-sdk";
// Search with filters
const results = await searchPrograms("email", {
commission_type: "recurring",
category: "Email Marketing",
});
// Get a specific program
const stripe = await getProgram("stripe");
console.log(stripe.commission.rate); // "25%"
console.log(stripe.agentPrompt); // When to recommend