API reference · Meter charges
Get my meter charges
GET
/v1/wallets/{walletId}/meter-chargesFind this application's operations in an authorized wallet by status and date.
Permission
meter_charges:readAuthenticationSigned read
Anis’s answerNot signed
Staff-set limits it counts towardAll requests
.NET SDK
anis.MeterCharges.GetMeterChargesAsync(walletId, query)- Only your application's operations in this authorized wallet are returned, newest first. Filters combine:
status(processing|succeeded|failed), exactmeterNumber(1 to 64 ASCII digits),from/toin UTC,cursor(at most 2048 characters), and optionalpageSize(default 50, range 1–100). Request at most 31 days; absent dates select the last 31 days. PassnextCursorunchanged with the same filters and page size until it is null. Correct filters or the cursor aftervalidation_failed(422); never repeat a purchase to recover a list. - Receipts and tokens are available only on the signed detail read; this list never returns a processing
202.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
walletIdrequired | path | UUID | A UUID, lower-case with hyphens. |
statusoptional | query | MeterChargeStatus | Optional charge status: processing, succeeded or failed. |
meterNumberoptional | query | string | Optional exact meter number filter: 1 to 64 ASCII digits; preserve leading zeros. |
fromoptional | query | string | Optional inclusive UTC period bound; request at most 31 days. Absent bounds select the last 31 days. |
tooptional | query | string | Optional inclusive UTC period bound; request at most 31 days. Absent bounds select the last 31 days. |
cursoroptional | query | string | The nextCursor of the previous page, passed back exactly as received. Leave it out for the first page. |
pageSizeoptional | query | integer | Optional page size from 1 to 100; default 50. |
Request
Signed with your key. No body, no nonce.
Headers: Signature-Input, Signature, X-Anis-Date, Accept-Language (optional). The SDKs set all of them for you.
Body: none.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | MeterChargeCollection |
| 400 | Refused: the signed request is badly built. | Problem |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No decision: a dependency was unavailable. | Problem |
The answers of this call are not signed — no Signature or Signature-Input header, success or refusal. There is nothing to verify; TLS protects them. Content-Digest and X-Request-Id are still present.
Refusals
A refusal of this call is a problem without a signature. Branch on its code; each links to what it means and what to do.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Malformed signed request | malformed_signed_request | 400 |
| Insufficient scope | insufficient_scope | 403 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Validation failed | validation_failed | 422 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
| Account not authorised | binding_not_authorized | 403 |
| Account inactive | account_inactive | 403 |
| Wallet not granted | wallet_not_granted | 404 |
| Not found | resource_not_found | 404 |
| Currency not supported | currency_not_supported | 422 |
Types
MeterChargeCollection
| Field | Type | Notes |
|---|---|---|
itemsalways present | list of MeterChargeSummary | The records on this page. |
nextCursoralways present | string | Pass this opaque value unchanged as cursor; null marks the last page. |
MeterChargeSummary
| Field | Type | Notes |
|---|---|---|
operationIdalways present | UUID | The same UUID sent as Idempotency-Key for this purchase. |
statusalways present | MeterChargeStatus | processing, succeeded or failed; receipts, tokens, failure and refund details are available on the signed detail read. |
meterNumberalways present | string | The meter number as text; preserve leading zeros. |
packagealways present | MeterChargePackage | The package recorded for this charge. |
totalalways present | Money | The frozen total wallet cost in every state, as LYD Money. |
externalReference | string | Your reference, included when supplied. |
createdAtalways present | string (date-time) | When the charge was recorded, in UTC. |
completedAt | string (date-time) | When the charge succeeded; omitted in processing and failed states. |
MeterChargeStatus
MeterChargePackage
| Field | Type | Notes |
|---|---|---|
idalways present | UUID | The meter package identifier. |
namealways present | string | One stored package name, not a bilingual text object. |
gecolPackageNamealways present | string | The electricity supplier's package name. |
Money
| Field | Type | Notes |
|---|---|---|
amountalways present | string | A decimal string, never a JSON number. Wallet balances may be negative while allowed debt is used. Prices and totals follow each route's amount rules. |
currencyalways present | string | An uppercase three-letter currency code, such as LYD. Read a wallet’s currency from balance.currency. |
asOf | string (date-time) | When this price or balance was read. |