Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Step-by-step guide to process token distributions: approve, tax, settle
const { pendingSchedules } = await tokuAPI('GET', 'getPendingSchedules?scheduleTypes=VESTING&lookaheadMonths=1' ); for (const schedule of pendingSchedules) { console.log(`${schedule.recipientName}: ${schedule.units} tokens on ${schedule.vestDate}`); }
const scheduleIDs = pendingSchedules.map(s => s.scheduleID); await tokuAPI('POST', 'batchApproveSchedules', { scheduleIDs, scheduleType: 'VESTING', performanceFactor: 1.0 // 1.0 = 100% of scheduled amount });
const { groupedSchedules } = await tokuAPI('GET', 'getSchedulesAwaitingTaxGrouping?scheduleTypes=VESTING' ); // Grouped by recipient for efficient tax processing
await tokuAPI('POST', 'addNoTaxDetails', { scheduleIDs: ['schedule-uuid-1', 'schedule-uuid-2'], scheduleType: 'VESTING', taxCurrencyCode: 'USD', fmvPerUnit: 0.50 // Fair market value per token });
await tokuAPI('POST', 'addManualTaxDetails', { scheduleIDs: ['schedule-uuid-1', 'schedule-uuid-2'], scheduleType: 'VESTING', taxCurrencyCode: 'USD', fmvPerUnit: 0.50, withholdingPercentage: 37 // 37% tax withholding });
await tokuAPI('POST', 'bulkDistributionProcessing', { items: [ { scheduleID: 'id-1', scheduleType: 'VESTING', taxMethod: 'NO_TAX', fmvPerUnit: 0.50, taxCurrencyCode: 'USD' }, { scheduleID: 'id-2', scheduleType: 'VESTING', taxMethod: 'MANUAL_TAX', fmvPerUnit: 0.50, taxRate: 37, taxCurrencyCode: 'USD' } ] });
await tokuAPI('POST', 'batchUpdateFMV', { taxReferenceIDs: ['tax-ref-uuid-1', 'tax-ref-uuid-2'], scheduleType: 'VESTING', newFmv: 0.55 // Updated price });
// Check what's awaiting finalization const { taxFinalizationGroups } = await tokuAPI('GET', 'getSchedulesAwaitingTaxFinalization?scheduleTypes=VESTING' ); // Finalize await tokuAPI('POST', 'batchFinalizeTaxDetails', { taxReferenceIDs: taxFinalizationGroups.map(g => g.taxReferenceID), scheduleType: 'VESTING' });
await tokuAPI('POST', 'batchRejectTaxDetails', { taxReferenceIDs: ['tax-ref-uuid'], scheduleType: 'VESTING', reason: 'FMV needs update' });
// Check if settlement can be submitted const { allowed, reason } = await tokuAPI('GET', 'canSubmitScheduleSettlement?taxReferenceID=tax-ref-uuid' ); if (allowed) { // Submit to Fireblocks or Anchorage const { transactionID } = await tokuAPI('POST', 'submitScheduleSettlement', { taxReferenceID: 'tax-ref-uuid', providerName: 'FIREBLOCKS', // or 'ANCHORAGE' custodyWalletID: 'wallet-uuid' // optional: specific vault }); }
const status = await tokuAPI('GET', 'getScheduleSettlementStatus?taxReferenceID=tax-ref-uuid' ); console.log(status); // { hasTransaction: true, status: "PROCESSING", canSubmit: false, canRetry: false }
if (status.canRetry) { await tokuAPI('POST', 'retryScheduleSettlement', { taxReferenceID: 'tax-ref-uuid' }); }
await tokuAPI('POST', 'settleTaxReference', { taxReferenceID: 'tax-ref-uuid', scheduleType: 'VESTING', settlementDate: '2026-04-15T00:00:00.000Z', transactionHash: '0xabc123...', transactionLink: 'https://etherscan.io/tx/0xabc123...' });
await tokuAPI('POST', 'batchSettleSchedules', { scheduleType: 'VESTING', settlements: [ { taxReferenceID: 'ref-1', settlementDate: '2026-04-15T00:00:00.000Z', transactionHash: '0x...' }, { taxReferenceID: 'ref-2', settlementDate: '2026-04-15T00:00:00.000Z', transactionHash: '0x...' } ] });
const { settlements, total, hasMore } = await tokuAPI('GET', 'getAllSettlementsForOrg?statusFilter=completed&page=1&pageSize=50' );
await tokuAPI('POST', 'revertTaxDetails', { taxReferenceIDs: ['tax-ref-uuid'], scheduleType: 'VESTING' });
await tokuAPI('POST', 'revertScheduleApproval', { scheduleIDs: ['schedule-uuid'], scheduleType: 'VESTING' });
Contact support