Simple Start Rating Request

In its simplest form a rating session start request must define the Service and Amount parameters as shown in Simple Start Rating Request.

Note: The SessionId is optional for a start request, but is mandatory for stop and update requests. This example shows a SessionId inside and outside of a RatingRequest. If a SessionId occurs in both places, the SessionId outside of the RatingRequest is used.
The following example is a start request, which is similar to a PUT call update request.
Table 1. Simple Start Rating Request
URI
POST http://host:port/rsgateway/data/json/service/device/0-1-5-15/rating/start
Request Body
"RatingRequest": {  
  "$": "CustomDiamRoMsg",
  "CustomField1": "value1",
  "CustomField2": "value2"
},
"Service": "gprs",
"Amount": 1048576,
"SessionId": "170805120000"
"ServiceContextId" : 54322 

This call queries the GPRS service to get the unit quantity for the specified amount. The DataUnit for the default context is returned unless the serviceContextId is provided. If the serviceContextId is provided, the DataUnit is returned using the serviceContextId and the service. To specify the DataUnit, you should use the MultiServiceList in the RatingRequest as shown in the discussion about the MultiServiceList request.