Get subscriber balance
This GET
operation retrieves the subscriber’s current balance (by MSISDN). If successful, an HTTP response code of 200
is returned as well as a JSON
response containing the balance (and possible loan information if applicable).
GET /pcc/spcm/subscribers/<msisdn>/balance
HEADER INFO
tenant: <tenantName>
authorisation: HTTP Basic Auth
accept: application/JSON
permissions: SPCM_SUBSCRIBER_READ_PERMISSION
URL parameters
There is one mandatory parameter.
Parameter | Type | Description |
---|---|---|
|
string (max 255) |
The subscriber’s MSISDN in international format. |
Response
If you receive a 200
HTTP response code (valid subscriber), you will receive a JSON
payload similar to the following:
For other HTTP response codes, see HTTP response codes. |
{
"balance": 775,
"maxLoan": 50
}
Subscriber type descriptions
Field | Type | Description | ||
---|---|---|---|---|
|
string |
The subscriber’s MSISDN in international format. |
||
|
string |
The subscriber IMSI. |
||
|
string |
An alternative MSISDN to which notifications are sent. |
||
|
enum |
The payment type string value which is typically prepaid, postpaid, or unknown. |
||
|
string |
The subscriber’s class such as `personal` or `business`. |
||
|
string |
This is the valid locale name. It must be either be a language code such as `ja`, defined by ISO-639; alternatively, it can be a language-code_country-code such as `ja_JP` as defined by ISO-3166. |
||
|
enum |
Defines the subscriber status which is typically either `active`, `inactive`, or `barred`. |
||
|
boolean |
Indicates whether DPS is enabled. True is enabled and false is disabled. The defaule is `false`. |
||
|
boolean |
Indicates whether the subscriber receives DPS notifications or not. True is enabled (receives) and false is disabled (does not receive). Default is set in the SPCM application.properties file under the `spcm.subscriber.dps.notification.enabled.default` property. |
||
|
boolean |
Indicates whether the subscriber receives EOS notifications or not. True is enabled (receives) and false is disalbed (does not receive). Default is set in the SPCM application.properties file under the `spcm.subscriber.eos.notification.enabled.default` property. |
||
|
boolean |
Indicates whether the subscriber receives PAYG notifications or not. True is enabled (receives) and false is disalbed (does not receive). |
||
|
string |
The IMEI number of the subscriber’s device.
|
||
|
string |
The subscriber’s home location. |
||
|
integer |
The subscriber’s monthly billing cycle date. This will be between `0-31`. |
||
|
string |
The name of the QoS (quality of service) category assigned by the operation; examples could be `silver`, `platinum`, or `gold`. |
||
|
string |
This is an optional string that is used to tag certain subscribers for batch updates. You can use whatever string you like to attach to subscribers - maybe `chivas` or `lovesPonyRides`. |
||
|
boolean |
Specifies if the subscriber plan should renew on consumption options
|
HTTP response codes
Code | Description | ||||
---|---|---|---|---|---|
|
success! |
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
{api-object} not found |
||||
|
conflict with target resource
|
||||
|
failed validation; this typically means that a property was not set or a value is out of range. example
|
||||
|
failed processing (after passing validation). example
|
||||
|
internal error |
||||
|
request rejected due to overload |