1.0.2 • Published 12 months ago
@property-credit/partners-api v1.0.2
Partners API Client Documentation
This package provides a client for interacting with the Property Credit Partners API.
Installation
npm install @property-credit/partners-apiUsage
Creating client
import { createClient } from "@property-credit/partners-api";
// Initialize the client with your access key
const client = createClient("your-access-key");
// Or specify environment
const productionClient = createClient("your-access-key", "production");Available environments
- staging (default): https://api.staging.property.credit
- production: https://api.property.credit
Available Methods
Applications
// Get a single application
const application = await client.finance.v1.applications.get("application-id");
// List applications
const applications = await client.finance.v1.applications.list({
first: 20,
after: "djE6MTE3", // Used for pagination. Available on list() response `next` field.
});
// Create an application
const newApplication = await client.finance.v1.applications.create({
// Application data
});Drawdowns
// Create a drawdown
const newDrawdown = await client.finance.v1.drawdowns.create({
// Drawdown data
});Types
The package includes TypeScript definitions for all request and response objects. The compiler will help ensure you're sending correctly formatted data to the API.