The Marketplace API provides a read-only interface for investors to discover published receivables (invoices) available for investment. This decentralized marketplace allows investors to browse investment opportunities without exposing unnecessary seller PII.
The marketplace endpoint allows unauthenticated access to published invoices, providing essential investment signals like discount rates, amounts, and due dates while protecting sensitive seller information.
GET /api/v1/marketplace/invoices
Returns a paginated list of invoices available for investment.
- No authentication required - Public read access for published invoices only
- This reduces friction for investors to discover opportunities
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 | Page number (min: 1) |
limit |
integer | 20 | Items per page (min: 1, max: 100) |
status |
string/array | ["published"] |
Invoice status filter |
dueBefore |
ISO date | - | Filter invoices due before this date |
minAmount |
number | - | Minimum invoice amount |
maxAmount |
number | - | Maximum invoice amount |
sort |
string | "due_date" |
Sort field: due_date, discount_rate, amount, created_at |
sortOrder |
string | "ASC" |
Sort order: ASC or DESC |
Success (200)
{
"success": true,
"data": [
{
"id": "uuid",
"invoiceNumber": "INV-001",
"customerName": "Customer Corp",
"amount": "10000.00",
"discountRate": "5.50",
"netAmount": "9450.00",
"dueDate": "2024-12-31T00:00:00.000Z",
"status": "published",
"createdAt": "2024-01-15T10:30:00.000Z"
}
],
"meta": {
"total": 150,
"page": 1,
"limit": 20,
"totalPages": 8
}
}Error Responses
400- Invalid query parameters500- Server error
The API exposes only investor-relevant fields while protecting seller privacy:
id- Invoice identifier for investment referencesinvoiceNumber- Public invoice referencecustomerName- Debtor information (relevant for credit assessment)amount- Full invoice valuediscountRate- Discount percentage offerednetAmount- Amount after discount (what seller receives)dueDate- Payment due date (tenor information)status- Current invoice statuscreatedAt- When invoice was created
❌ Private Fields (Hidden)
sellerId- Seller identity protectionipfsHash- Internal document referencesriskScore- Internal risk assessmentssmartContractId- Technical implementation detailsupdatedAt- Internal timestampsdeletedAt- Soft deletion markers
The field selection balances investor needs with seller privacy:
- Investment Signals: Discount rate, amount, and due date provide essential yield and risk information
- Credit Assessment: Customer name allows investors to evaluate debtor creditworthiness
- Privacy Protection: Seller identity and internal risk scores remain confidential
- Operational Security: Technical details like IPFS hashes and contract IDs are hidden
curl "https://api.stellarsettle.com/api/v1/marketplace/invoices"curl "https://api.stellarsettle.com/api/v1/marketplace/invoices?minAmount=1000&maxAmount=50000&sort=discount_rate&sortOrder=DESC"curl "https://api.stellarsettle.com/api/v1/marketplace/invoices?dueBefore=2024-12-31T23:59:59.999Z&sort=due_date"curl "https://api.stellarsettle.com/api/v1/marketplace/invoices?page=2&limit=50"curl "https://api.stellarsettle.com/api/v1/marketplace/invoices?status=published&status=funded"- Default: Only
publishedinvoices (ready for investment) - Available statuses:
published,funded,settled(thoughfundedandsettledare less relevant for new investments) - Multiple values: Use array format or repeat parameter
- Both
minAmountandmaxAmountare optional - Validation ensures
minAmount ≤ maxAmount - Useful for portfolio size constraints
dueBefore: Find invoices with shorter tenors- ISO 8601 date format required
- Timezone-aware filtering
due_date: Sort by payment due date (tenor)discount_rate: Sort by yield/discount offeredamount: Sort by invoice sizecreated_at: Sort by listing recency
- Stable ordering: Results use
ORDER BY {sort_field} {order}, id ASCfor consistent pagination - Reasonable limits: Maximum 100 items per page to prevent abuse
- Complete metadata: Response includes total count and page calculations
- Database indexes: Optimized queries on
status,due_date,amount, andcreated_at - Soft deletes: Automatically excludes deleted invoices
- Efficient counting: Separate count query for accurate totals
// Fetch marketplace data
const response = await fetch('/api/v1/marketplace/invoices?page=1&limit=20&sort=discount_rate&sortOrder=DESC');
const { data, meta } = await response.json();
// Display investment opportunities
data.forEach(invoice => {
console.log(`${invoice.invoiceNumber}: ${invoice.discountRate}% discount, due ${invoice.dueDate}`);
});- Discovery: Browse marketplace for suitable invoices
- Analysis: Evaluate discount rate, amount, tenor, and debtor
- Investment: Use separate investment API (out of scope for this endpoint)
- No authentication required: Reduces friction for discovery
- Public data only: No sensitive seller information exposed
- Rate limiting: Standard API rate limits apply
- CORS enabled: Supports browser-based applications
Potential future features (out of current scope):
- Full-text search across invoice documents
- Advanced filtering (industry, geography, credit ratings)
- Real-time updates via WebSocket
- Bulk export capabilities