List wallet ledger entries
curl --request GET \
--url https://api.pineyard.ai/credits/ledger \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/credits/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/credits/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"amountMicro": "<string>",
"balanceAfter": "<string>",
"kind": "TOPUP",
"callId": "<string>",
"billingMode": "<string>",
"billsecSeconds": 123,
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"call": {
"id": "<string>",
"phone": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"durationMs": 123,
"billDurationSeconds": 123,
"campaignId": "<string>",
"campaignName": "<string>"
}
}
],
"nextCursor": "<string>",
"totalCount": 123,
"window": {
"period": "today",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "Asia/Kolkata",
"lastRechargeAt": "2023-11-07T05:31:56Z"
},
"filtered": {
"totalCount": 123,
"usageSpentMicro": "<string>",
"series": [
{
"date": "<string>",
"spentMicro": "<string>"
}
]
},
"reconciliation": {
"openingBalanceMicro": "<string>",
"topupsMicro": "<string>",
"adjustmentsMicro": "<string>",
"callSpendMicro": "<string>",
"whatsappSpendMicro": "<string>",
"otherSpendMicro": "<string>",
"usageSpentMicro": "<string>",
"netChangeMicro": "<string>",
"expectedClosingBalanceMicro": "<string>",
"closingBalanceMicro": "<string>",
"discrepancyMicro": "<string>"
}
}Credits
List wallet ledger entries
Get the exact paginated workspace wallet ledger, spend timeline and reconciliation
GET
/
credits
/
ledger
List wallet ledger entries
curl --request GET \
--url https://api.pineyard.ai/credits/ledger \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/credits/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/credits/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"amountMicro": "<string>",
"balanceAfter": "<string>",
"kind": "TOPUP",
"callId": "<string>",
"billingMode": "<string>",
"billsecSeconds": 123,
"reason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"call": {
"id": "<string>",
"phone": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"durationMs": 123,
"billDurationSeconds": 123,
"campaignId": "<string>",
"campaignName": "<string>"
}
}
],
"nextCursor": "<string>",
"totalCount": 123,
"window": {
"period": "today",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"timezone": "Asia/Kolkata",
"lastRechargeAt": "2023-11-07T05:31:56Z"
},
"filtered": {
"totalCount": 123,
"usageSpentMicro": "<string>",
"series": [
{
"date": "<string>",
"spentMicro": "<string>"
}
]
},
"reconciliation": {
"openingBalanceMicro": "<string>",
"topupsMicro": "<string>",
"adjustmentsMicro": "<string>",
"callSpendMicro": "<string>",
"whatsappSpendMicro": "<string>",
"otherSpendMicro": "<string>",
"usageSpentMicro": "<string>",
"netChangeMicro": "<string>",
"expectedClosingBalanceMicro": "<string>",
"closingBalanceMicro": "<string>",
"discrepancyMicro": "<string>"
}
}Required scope:
billing.viewAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Query Parameters
Available options:
today, last_7_days, last_30_days, this_month, last_month, since_last_recharge, all_time, custom Available options:
all, calls, whatsapp, topups, adjustments Required range:
1 <= x <= 200
