Update a subscriber

This PUT operation updates a certain subscriber’s information (based on MSISDN). You can send what updates you want to make via a JSON payload and will receive back an HTTP response code and (if successful 200), you will receive a JSON response showing the updated subscriber information.

See HTTP response codes for other response codes.

PUT /pcc/spcm/subscribers/<msisdn> + JSON request payload


HEADER INFO

tenant: <tenantName>

authorisation: HTTP Basic Auth

content-type: application/JSON

accept: application/JSON

permissions: SPCM_SUBSCRIBER_UPDATE_PERMISSION

URL parameters

There is one mandatory parameter.

Parameter Type Description

msisdn

string (max 255)

The subscriber’s MSISDN in international format.

JSON request payload

The following sample updates a subscriber’s paymentType to prepaid.

When sending the request payload, you need to only request those key:value pairs that are being updated. See Subscriber Type JSON Key Value Pairs for all key value pair options.
{
    "paymentType": "prepaid"
}


Response JSON payload

The following sample confirms the update to a subscriber’s paymentType to prepaid.

{
    "msisdn": "0871234567",
    "imsi": "871234567",
    "alternateNotificationMsisdn": "0871234567",
    "paymentType": "postpaid",
    "class": "Standard",
    "locale": "en",
    "status": "active",
    "dpsEnabled": false,
    "dpsNotification": false,
    "eosNotification": true,
    "paygNotification": true,
    "imei": "01234567890129",
    "zone": "TEST_LZ_Mumbai",
    "renewalDayOfMonth": 15,
    "tag": "treatOftheWeek",
    "renewPlanOnConsumption": false
}


Subscriber type descriptions

Field Type Description

msisdn

string

The subscriber’s MSISDN in international format.

imsi

string

The subscriber IMSI.

alternateNotificationMsisdn

string

An alternative MSISDN to which notifications are sent.

paymentType

enum

The payment type string value which is typically prepaid, postpaid, or unknown.

class

string

The subscriber’s class such as `personal` or `business`.

locale

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.

status

enum

Defines the subscriber status which is typically either `active`, `inactive`, or `barred`.

dpsEnabled

boolean

Indicates whether DPS is enabled. True is enabled and false is disabled. The defaule is `false`.

dpsNotification

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.

eosNotification

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.

paygNotification

boolean

Indicates whether the subscriber receives PAYG notifications or not. True is enabled (receives) and false is disalbed (does not receive).

imei

string

The IMEI number of the subscriber’s device.

Empty values are supported.

zone

string

The subscriber’s home location.

renewalDayOfMonth

integer

The subscriber’s monthly billing cycle date. This will be between `0-31`.

qosCategoryName

string

The name of the QoS (quality of service) category assigned by the operation; examples could be `silver`, `platinum`, or `gold`.

tag

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`.

renewPlanOnConsumption

boolean

Specifies if the subscriber plan should renew on consumption

options
  • true = plans renews on consumption

  • false = plan does not renew on consumption


HTTP response codes

Code Description

201/204

success!

If you receive a 204 code, you will not see a JSON response.

207

Multistatus response

Check out HTTP statuses for more details.
This is not applicable to all operations.

400

malformed request

401

unauthorised; bad username or password

403

forbidden; user does not have appropriate privileges

404

{api-object} not found

409

conflict with target resource

This often occurs if the item already exists, such as a plan, group, or name.
This is not applicable to all operations.

412

failed validation; this typically means that a property was not set or a value is out of range.

example
HTTP 412
{
  "errors" : [
        {
          "field" : "name",
          "description" : "name is mandatory"
        }
    ]
}

422

failed processing (after passing validation).

example
HTTP 422
{
    "message": "Subscriber max plan count exceeded",
    "errorCode": 1
}

500

internal error

503

request rejected due to overload