Wallet
Your organization's balance and transactions. Read-only through the API: you top up in the panel. It needs the wallet:read permission.
Get the balance
GET/wallet
Balance, currency, whether it is low and an estimate of how long it lasts at the current pace. Needs wallet:read.
Scopes: wallet:read
curl "https://micuenta.whatsmarketing.es/api/v1/wallet" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/wallet', {
headers: {
Authorization: `Bearer ${process.env.WM_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://micuenta.whatsmarketing.es/api/v1/wallet",
headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
data = r.json()<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/wallet');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);No response example yet.
List transactions
GET/wallet/transactions
Top-ups, consumption, refunds and adjustments, with filters by type (type), period or dates (from, to) and free search (q). Needs wallet:read.
Scopes: wallet:read
Parameters
| Name | Where | Type | Values |
|---|---|---|---|
page | query | number | default: 1 · 1 – … |
pageSize | query | number | default: 20 · 1 – 100 |
type | query | string | TOPUP · CONSUMPTION · REFUND · ADJUSTMENT · TOPUP_REVERSAL |
period | query | string | month · 30 · 90 · last_month |
from | query | string | |
to | query | string | |
q | query | string | 0–120 characters |
curl "https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20" \
-H "Authorization: Bearer $WM_API_KEY"const res = await fetch('https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20', {
headers: {
Authorization: `Bearer ${process.env.WM_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20",
headers={"Authorization": f"Bearer {os.environ['WM_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
data = r.json()<?php
$ch = curl_init('https://micuenta.whatsmarketing.es/api/v1/wallet/transactions?page=1&pageSize=20');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WM_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);No response example yet.