KeelResponse

@Serializable
data class KeelResponse<T>(val code: Int, val message: String? = null, val data: T? = null, val timestamp: Long = Clock.System.now().toEpochMilliseconds())(source)

Standard Keel API response with unified format.

All API responses should use this format: { "code": 200, "message": "success", "data": {...}, "timestamp": 1234567890 }

Parameters

code

HTTP-style status code (200=success, 400=bad request, 401=unauthorized, 403=forbidden, 404=not found, 500=error)

message

Human-readable message

data

Response payload

timestamp

Unix timestamp in milliseconds

Constructors

Link copied to clipboard
constructor(code: Int, message: String? = null, data: T? = null, timestamp: Long = Clock.System.now().toEpochMilliseconds())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val code: Int
Link copied to clipboard
val data: T?
Link copied to clipboard
Link copied to clipboard