API Documentation Portal

REST API reference, SDK distribution, authentication guides — Stage 198-199

Live
Global

UDF Platform API v1.0

Base URL: https://api.udf.platform/v1

API Online

Authentication

POST/api/auth/token
POST/api/auth/refresh
DELETE/api/auth/session

Devices

GET/api/v1/devices
POST/api/v1/devices/enroll
GET/api/v1/devices/:id
POST/api/v1/devices/:id/command
POST/api/v1/devices/:id/heartbeat

Loans

GET/api/v1/loans
POST/api/v1/loans
GET/api/v1/loans/:id
POST/api/v1/loans/:id/restructure

Payments

POST/api/v1/payments
GET/api/v1/payments
POST/api/v1/webhooks/payment

Risk & AI

POST/api/v1/risk/compute
GET/api/v1/risk/scores
GET/api/v1/fraud/alerts

Tenants

GET/api/v1/tenants
POST/api/v1/tenants
PATCH/api/v1/tenants/:id/status

Authentication

Include your API key in all requests:

Authorization: Bearer udf_your_key
JWT with RS256 signing
Refresh token rotation
Per-tenant API keys
Scope-based permissions

Rate Limits

Starter1,000 req/min
Growth10,000 req/min
Enterprise100,000 req/min
CustomUnlimited

SDK Distribution

🟨

JavaScript/TypeScript

npm install @udf/sdk
🐍

Python

pip install udf-sdk
🔵

Go

go get github.com/udf/sdk-go

Java

implementation 'com.udf:sdk:1.0.0'
🤖

Android (Kotlin)

implementation 'com.udf:android-sdk:1.0.0'
🍎

iOS (Swift)

pod 'UDFiOSSDK', '~> 1.0'

Quick Start — JavaScript SDK

// Initialize UDF SDK
import { UDFClient } from '@udf/sdk';

const client = new UDFClient({
  apiKey: 'udf_your_api_key_here',
  tenantId: 'your-tenant-id',
  region: 'ap-southeast-1',
});

// Enroll a device
const device = await client.devices.enroll({
  serialNumber: 'SM-G998B-001',
  platform: 'android',
  imei: '123456789012345',
});

// Send lock command
await client.devices.sendCommand({
  deviceId: device.id,
  command: 'lock',
  payload: { reason: 'payment_overdue' },
});

// Create a loan
const loan = await client.loans.create({
  deviceId: device.id,
  principalAmount: 850,
  interestRate: 10,
  termMonths: 12,
  currency: 'USD',
  amortizationType: 'reducing',
});

// Process payment
const payment = await client.payments.process({
  loanId: loan.id,
  amount: 93.50,
  currency: 'USD',
  provider: 'stripe',
});