Billing
Get credit balance
The balance, its grants, and what holds the reserved part (reservations).
financial_blocked says the figures are paused for reconciliation, when they and the
reservations can disagree until the account is repaired.
GET
/
v1
/
organization
/
wallet
Get credit balance
curl --request GET \
--url https://api.sqwish.ai/v1/organization/wallet \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/wallet"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"paid_usd": "<string>",
"promotional_usd": "<string>",
"balance_usd": "<string>",
"available_usd": "<string>",
"reserved_usd": "<string>",
"financial_shortfall_usd": "<string>",
"financial_blocked": true,
"grants": [
{
"id": "<string>",
"source": "<string>",
"amount_usd": "<string>",
"spent_usd": "<string>",
"held_usd": "<string>",
"created_at": 123,
"expires_at": 123,
"revoked_at": 123
}
],
"reservations": {
"work": [
{
"activity": "labeling",
"id": "<string>",
"name": "<string>",
"reserved_usd": "<string>",
"since": 123,
"until": 123,
"reason": "rerun"
}
],
"decisions": {
"requests": 123,
"reserved_usd": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Response
Successful Response
Get credit balance
curl --request GET \
--url https://api.sqwish.ai/v1/organization/wallet \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/wallet"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/wallet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"paid_usd": "<string>",
"promotional_usd": "<string>",
"balance_usd": "<string>",
"available_usd": "<string>",
"reserved_usd": "<string>",
"financial_shortfall_usd": "<string>",
"financial_blocked": true,
"grants": [
{
"id": "<string>",
"source": "<string>",
"amount_usd": "<string>",
"spent_usd": "<string>",
"held_usd": "<string>",
"created_at": 123,
"expires_at": 123,
"revoked_at": 123
}
],
"reservations": {
"work": [
{
"activity": "labeling",
"id": "<string>",
"name": "<string>",
"reserved_usd": "<string>",
"since": 123,
"until": 123,
"reason": "rerun"
}
],
"decisions": {
"requests": 123,
"reserved_usd": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}