List valid prepaid total balances

GET/valid-prepaid-total-balances

Returns a paginated list of prepaid total balances (shared wallets) that have active or blocked status.

Audit event

  • total.balance.prepaid.list

Privileges (one of the following based on the deployment type):

  • bulk-billing-cust-sms.view
  • bulk-billing-supplier-sms.view
  • bulk-billing-cust-mnp.view
  • bulk-billing-supplier-mnp.view
  • bulk-billing-cust-sms-own.view
  • bulk-billing-supplier-sms-own.view
  • bulk-billing-cust-mnp-own.view
  • bulk-billing-supplier-mnp-own.view

Filter/Sort fields

  • id
  • bizPartnerId
  • currency
  • name
  • status
  • alertsPolicyId
  • alertsBaseAmount
  • bizPartnerName
  • bizPartnerShortName
  • alertsPolicyName
  • paidTotal
  • unpaidTotal
  • billedTotal
  • overdraftLimit
  • debitBalanceThreshold
  • pricePackageMode
  • pricePackageId
  • overdraftPriceListId
  • ownerId
  • ownerBpName
  • ownerBpBriefName
  • alertsLanguage
  • amount
  • smsCount
  • accountsTotal
  • usage
  • availableAmount
  • totalCredit
  • isDefault

Searchable attributes

  • name
  • billingTypeName
  • bizPartnerShortName
  • bizPartnerName
  • status
  • alertsPolicyName
  • ownerId
  • ownerBpName
  • ownerBpBriefName
  • blockOnOutOfCredit
  • bizPartnerId
  • debitBalanceThreshold
  • overdraftLimit

Errors:

  • NOT_AUTHENTICATED - Not authenticated
  • NOT_AUTHORIZED - Not authorized
  • INT_APP_ERROR - Unexpected internal error
Base URL
https://api-cpaas.sms.es/bulk/billing/v2
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Query parameters

allstring

If yes (or other truthy values accepted by the server), return all matching records in one page; pagination still returns total counts.

Possible values: yes, no, true, false, 1, 0 · Default: "no"
page_numberinteger

Page number (1-based) when not using paging

Default: 1 · min: 1
page_sizeinteger

Page size when not using paging

Default: 10 · min: 1
pagingstring

Alternative pagination as page_number,page_size (e.g. 1,10)

Example: 1,10
sortstring

Comma-separated sort keys for the collection returned by this operation. Prefix a key with - for descending order; omit the prefix for ascending.

Allowed keys, default order when omitted, and whether multiple keys are supported are defined on each list operation (often under a Field names for sort or equivalent section). Do not assume the same keys work on another path.

Example: sort=-field1,field2,-field3.

qstring

Free-text search across whatever fields the current list operation supports (full-text, partial match, or exact — as documented there).

Typical query forms: q=... and sometimes eq(q)=... where that operation documents it.

There is no global definition of which properties participate; always read the same operation’s description before reusing q on another endpoint.

operator(propertyName)string

Search criteria can be specified using the following operators and attributes: URL Filtering guidelines

Available Operators:

  • isnull, isnotnull
  • isempty, isnotempty
  • eq, neq
  • startswith, endswith, contains, doesnotcontain
  • lt, lte, gt, gte
  • in, notin
  • between, notbetween

Special Cases:

  1. For operators [isnull, isnotnull, isempty, isnotempty]: field value can be omitted.
  2. For operators [in, notin]: field value must be a comma-separated list. Example: in(status)=active,pending,deleted
  3. For operators [between, notbetween]: field value must be two comma-separated values. Example: between(statusTs)=2024-01-01,2024-12-31

Default Behavior:

  • If operator is omitted, 'eq' is assumed
  • Example: fieldName=fieldValue is equivalent to eq(fieldName)=fieldValue

Example Usage:

  • startswith(name)=hor # Find records where name starts with "hor"

Request example

cURL · cURL
curl -L -X GET "https://api-cpaas.sms.es/bulk/billing/v2/valid-prepaid-total-balances" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

OK — data contains active and blocked prepaid total balances with a fixed property set per row; meta.pagination describes the page.

application/json
dataobject[]required
Show child attributes
accountsTotalnumber (double)

Sum-side total across linked accounts; overlaid with open daily balances when real-time

alertsBaseAmountnumber (double)
alertsLanguagestring
alertsPolicyIdinteger (int64)
alertsPolicyNamestring
amountnumber (double)

Balance amount; real-time or snapshot depending on withRtBalance

availableAmountnumber (double)
billedTotalnumber (double)
billingCreditLimitnumber (double)
billingCycleinteger (int64)
billingCycleUnitstring
billingCycleUnitIdinteger (int64)
billingDebitLimitnumber (double)
billingDebitThresholdnumber (double)
billingOverdraftLimitnumber (double)
billingStartDatestring (date)

ISO date string from billing Date type

billingTriggerAmountnumber (double)
billingTypeinteger

1 = prepaid, 2 = postpaid, 3 = ABO postpaid

billingTypeCodeNamestring
billingTypeNamestring
bizPartnerIdinteger (int64)
bizPartnerNamestring
bizPartnerShortNamestring
blockOnOutOfCreditstring
Possible values: on, off
creditLimitnumber (double)

Maps to CreditLimitInCurrency — limit in limitsCurrency when extent sets confLimitCurrency; else DebitLimit (see Go makeTotalBalanceResponse)

creditTotalnumber (double)
currencyinteger (int64)
currencyCodestring
currencyNamestring
currentCreditRecordIdinteger (int64)
customFieldsobject[]
Show child attributes
attributeTypeIDinteger
customAtributeCodeNamestring

Spelling matches production JSON (customAtribute not customAttribute)

customAttributeIDinteger
customAttributeJsonValueobject
Show child attributes
valuestring
customAttributeNamestring
customAttributeValuestring
customAttributeValueStatusDTstring
debitLimitTotalnumber (double)

JSON name for internal debit total / limit aggregate (postpaid)

disputePercentnumber (double)
disputeValuenumber (double)
firstCreditRecordIdinteger (int64)
idinteger (int64)
instanceIdinteger (int64)
invoiceCreationstring
invoiceSendingstring
invoiceSettingsobject

null when total_balance_extent is missing, or extent invoice_settings is empty / not loaded — see makeTotalBalanceResponse (only set when t.InvoiceSettings != nil).

Show child attributes
autoRejectMarginnumber (double)
extentAdditionalEmailsobject
Show child attributes
bccstring
ccstring
tostring
extentNotestring
extentVatNotestring
reminderModestring

From billingapi.EnumEnabledDisabled — typically enabled or disabled

isDefaultstring

Typically yes or no

lastBillingRecordIdinteger (int64)
lastBillingReportIdinteger (int64)
lastOpenEventHistoryIdinteger (int64)
limitsCurrencyinteger (int64)

Currency id used for configured credit/overdraft limits when extent specifies one

minUsageAmountnumber (double)
namestring
nextBillingDatestring
nextReportDatestring (date)
orderedPrepaidModestring
Possible values: on, off
overdraftLimitnumber (double)

Maps to OverdraftLimitInCurrency — from extent overdraft config when confLimitCurrency set; else balance OverdraftLimit

overdraftPriceListIdinteger (int64)
ownerBpBriefNamestring
ownerBpNamestring
ownerIdinteger (int64)
paidTotalnumber (double)
paymentTermsDaysinteger (int64)
pricePackageIdinteger (int64)
pricePackageModestring
Possible values: on, off
reportCycleinteger (int64)
reportCycleUnitstring
reportCycleUnitIdinteger (int64)
reportStartDatestring (date)
smsCountinteger (int64)
statusstring
totalCreditnumber (double)
unpaidTotalnumber (double)
usagenumber (double)

Derived usage (conventionally -accountsTotal after load)

metaobject
Show child attributes
paginationobject
Show child attributes
countintegerrequired

Number of records in data for this response

currentPageintegerrequired
perPageintegerrequired
totalintegerrequired

Total matching records (before current page slice)

totalPagesintegerrequired
Example response
{
  "data": [
    {
      "accountsTotal": -1250.5,
      "alertsBaseAmount": 0,
      "alertsLanguage": "en",
      "alertsPolicyId": 0,
      "alertsPolicyName": "",
      "amount": 1250.5,
      "availableAmount": 5000.5,
      "billedTotal": 0,
      "billingCreditLimit": 5000,
      "billingDebitThreshold": 0,
      "billingOverdraftLimit": 0,
      "billingTypeCodeName": "prepaid",
      "billingTypeName": "Prepaid",
      "bizPartnerId": 5001,
      "bizPartnerName": "Customer A",
      "bizPartnerShortName": "CustA",
      "blockOnOutOfCredit": "off",
      "creditTotal": 0,
      "currency": 978,
      "currencyCode": "EUR",
      "currencyName": "Euro",
      "disputePercent": 0,
      "disputeValue": 0,
      "id": 501,
      "invoiceSending": "off",
      "isDefault": "yes",
      "lastBillingReportId": 0,
      "limitsCurrency": 978,
      "minUsageAmount": 0,
      "name": "Main prepaid wallet",
      "nextReportDate": "2025-02-01",
      "overdraftLimit": 0,
      "overdraftPriceListId": 0,
      "ownerBpBriefName": "Owner",
      "ownerBpName": "Owner Ltd",
      "ownerId": 7001,
      "paidTotal": 0,
      "paymentTermsDays": 0,
      "pricePackageId": 101,
      "pricePackageMode": "off",
      "reportCycle": 1,
      "reportCycleUnit": "month",
      "reportStartDate": "2025-01-01",
      "smsCount": 4200,
      "status": "active",
      "totalCredit": 5000,
      "unpaidTotal": 0,
      "usage": 1250.5
    }
  ],
  "meta": {
    "pagination": {
      "count": 1,
      "currentPage": 1,
      "perPage": 10,
      "total": 1,
      "totalPages": 1
    }
  }
}