API Reference
Hantera's API is organized into four surfaces. The HTTP and WebSocket surfaces are the transports — the messages and commands catalogs describe the operational surface available through those transports.
HTTP
REST-style endpoints for resources such as actors, apps, files, ingresses, jobs, registry entries and rules.
A small set of these endpoints — most importantly POST /resources/actors/{type}/{externalId} — is what you use to dispatch all actor messages. The catalog of those messages is documented under Messages, not under HTTP.
Messages
Messages are how you interact with actors, the business entities in Hantera (orders, payments, SKUs, custom actors). Every mutation and every actor query goes through a message. Each actor type defines its own set of messages.
Commands
Commands are atomic mutations applied to a single actor, batched inside a message such as applyCommands. A batch either succeeds as a whole or is rejected with no changes.
WebSocket
Streaming endpoint for live queries and event subscriptions.
How they fit together
POST /resources/actors/order/ORD12345
Content-Type: application/json
[{
"type": "applyCommands",
"body": {
"commands": [
{ "type": "addTag", "key": "blocked" }
]
}
}]In this single HTTP request:
- The HTTP surface is the
POST /resources/actors/{type}/{externalId}endpoint. - The message is
order.applyCommands. - The command is
order.addTag.
The actor model means that most of Hantera's API surface lives in the message and command catalogs, not in the list of HTTP endpoints. If you came here looking for "what can I do with an Order?", start with Messages and Commands.
See also: Actors overview for the conceptual model.