Production API
Get an order
Read one owned order, learn when the Energy becomes usable, and determine whether delivery and the full rental lifecycle are final.
/v1/energy/orders/{id}On this page
Use the UUID returned by order creation or the path in its Location header.
Path parameter
| Parameter | Type | Description |
|---|---|---|
id |
UUID | Public order identifier. |
Response 200
{"id":"7c0c9a54-517c-4bbb-a946-bf14bf86c113","client_request_id":"order-1042","address":"TJRabPrwbZy45sbavfcjinPJC18kjpRTv8","energy":65000,"duration_minutes":60,"total_trx":"3.200000","status":"delivered","lifecycle_final":false,"delivery_final":true,"created_at":1784376000,"updated_at":1784376073,"energy_usable":true,"rental_expires_at":1784379612}
A field with no value is left out of the response instead of being sent as null: an order that has not reached an address yet carries no rental_expires_at key at all, and a successful one carries no failure key. Read a missing key as null, and do not require it to be present.
| Field | Type | Description |
|---|---|---|
status |
string | created, executing, available, delivered, rental_finished, failed, or rental_interrupted. |
energy_usable |
boolean | The Energy is on the address and can be spent. True for available and delivered while rental_expires_at is still ahead, false once that moment passes — the status keeps reading delivered for a while longer, because the end of the rental is confirmed on finalized chain evidence. |
rental_expires_at |
integer, absent when unset | Unix seconds at which the paid rental window ends. Absent until the Energy reaches the address, and absent again on failed, where the hold is refunded in full and the window is annulled with it. rental_interrupted keeps the window its rental was cut short in. |
lifecycle_final |
boolean | The full rental is over and no further transition will happen. |
delivery_final |
boolean | The delivery attempt is over. Still false while available, because the delivery is not yet independently proven. true is not success by itself; inspect failure. |
failure |
object, absent when unset | Present on failed with code: energy_delivery_failed, and on rental_interrupted with code: energy_delivery_interrupted. Each carries that stable code and a safe message. |
created_at, updated_at |
integer | Unix seconds. |
When to send your transaction
Branch on energy_usable, never on delivered.
{"status":"available","lifecycle_final":false,"delivery_final":false,"energy_usable":true,"rental_expires_at":1784379612}
available means the Energy is already delegated to the address and spendable, and the window you paid for is running until rental_expires_at. delivered replaces it about a minute later, once our independent verification proves the delivery; rental_expires_at does not move when that happens. Waiting for delivered only spends rental time you have already paid for.
When to stop polling
Stop only when both final flags are true. A successful full lifecycle ends as rental_finished. failed and rental_interrupted include failure.
Not found
Missing and foreign-account IDs intentionally return the same response:
{"type":"https://rentron.xyz/docs/errors/codes#energy_order_not_found","title":"Not Found","status":404,"detail":"Order was not found.","code":"energy_order_not_found"}
Rentron