Decrease quota for subscriber

This POST operation decreases the size of the donor plan for a specified subscriber by passing the donor msisdn in the URL and the plan ID and share of the quota in the JSON payload. If successful, you receive an HTTP response code of 201 and a JSON response containing the amount (in bytes) the plan was reduced.

See HTTP response codes for other response codes.

POST /pcc/spcm/subscribers/<msisdn>/shared-quota/deduct-quota + JSON request payload


HEADER INFO

tenant: <tenantName>

authorisation: HTTP Basic Auth

content-type: application/JSON

accept: application/JSON

permissions: SPCM_SHARED_QUOTA_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

This example shares decreases the unitAmountShare of the the plan 135062 by 34343.

The percentage of quota shared is expressed as an integer between 0 and 10000000. So for example, 5% is 5/100 * 10000000 which equals 500000 which would be what you specify in the payload.
{
    "planId": 135062,
    "unitAmountShare": 34343
}

JSON response

The unitAmount denotes how much the plan was reduced in bytes.

{
  "unitAmount": 56566
}


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

subscriber 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

example
HTTP/1.1 500
{
    "message": "Internal server error - [Failed to get session information]",
    "status": "error"
}

503

request rejected due to overload