Decrement the bundle counter

This PUT operation decrements a subscriber’s bundle each it is used. The response includes how many units are remaining as well as a returnCode that displays the counter’s status.

PUT /crs-api/decrementCounter + JSON request payload


HEADER INFO

authorisation: HTTP Basic Auth

tenant: <tenantName>

content-type: application/JSON

accept: application/JSON

By default, accept is XML. You must explicitly set accept in your header to application/JSON to receive a JSON response.

JSON request payload

The request payload should contain both the msisdn of the subscriber whose bundle is being decremented as well as the bundleId that identifies the bundle to be decremented.

Both are mandatory in the request payload.
{
    "msisdn": "087123456",
    "bundleId": 1
}

JSON request object descriptions

Object Description

msisdn

The subscriber’s MSISDN in international format.

bundleId

Identifies the bundle to be decremented.


JSON response

The JSON response contains the return code and the count (remaining units) for the bundle.

{
    "count": 99,
    "returnCode": 3
}


Return codes

The following return codes are possible in the JSON response.

  • 0 = the counter does not exist

  • 1 = the counter has expired

  • 2 = the counter is full

  • 3 = counter successfully decremented

  • 4 = more than one counter was found