API Reference
API Reference
Complete reference for all Betalink API endpoints
Base URL
All API requests should be made to:
https://betalink.dev/apiAuthentication
All endpoints (except health check) require authentication via the X-API-Key header:
X-API-Key: your-api-keyEndpoints
Health Check
GET /api/health - Check API status
List Companies
GET /api/v1/companies - Get paginated list of companies
Get Company
GET /api/v1/companies/{cvr} - Get a single company by CVR
Get Transactions
GET /api/v1/companies/{cvr}/transactions - Get company transactions
Common Response Codes
| Status Code | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
404 | Not Found - Resource doesn't exist |
422 | Validation Error - Request/response validation failed |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Error Response Format
All errors follow a consistent format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}Pagination
List endpoints support cursor-based pagination with these parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Items per page (1-100) |
after | string | - | Cursor for next page |
before | string | - | Cursor for previous page |
Paginated responses include:
{
"data": [...],
"meta": {
"total": 150,
"limit": 50,
"hasMore": true
},
"_links": {
"self": "/api/v1/companies?limit=50",
"next": "/api/v1/companies?limit=50&after=cursor",
"prev": null
}
}