Create a Spending Limit Control Subscription

post

{apiRoot}/nchf-spendinglimitcontrol/v1/subscriptions

Creates a new spending limit retrieval subscription for a specified subscriber.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Information about a new individual spending limit subscription.
Show Source
  • The date and time when the spending limit subscription expires.
  • Pattern: ^(msisdn-[0-9]{5,15}|extid-[^@]+@[^@]+|.+)$
    The unique 5G Generic Public Subscription Identifier (GPSI). It contains either an external ID or an MSISDN.
  • The recipient of the spending limit notifications sent to the NF service consumer by the CHF.
  • policyCounterIds
    Minimum Number of Items: 1
    A list of policy counter identifiers.
  • Pattern: ^(imsi-[0-9]{5,15}|nai-.+|.+)$
    The unique 5G Subscription Permanent Identifier (SUPI). A SUPI is usually a string of 15 decimal digits.
  • Pattern: ^[A-Fa-f0-9]*$
    The list of supported features.
Nested Schema : policyCounterIds
Type: array
Minimum Number of Items: 1
A list of policy counter identifiers.
Show Source
Back to Top

Response

Supported Media Types

201 Response

The spending limit context was created successfully.
Headers
  • Contains the URI of the created individual spending limit resource, according to the structure: {apiRoot}/nchf-spendinglimitcontrol/v1/subscriptions/{subscriptionId}
Body ()
Root Schema : SpendingLimitStatus
Type: object
The status of the spending limit control subscription.
Show Source
Nested Schema : statusInfos
Type: object
Minimum Number of Properties: 1
Additional Properties Allowed
Show Source
The status of the requested policy counters. The key of the map is the policyCounterId attribute.
Nested Schema : PolicyCounterInfo
Type: object
Information about a policy counter.
Show Source
Nested Schema : penPolCounterStatuses
Type: array
Minimum Number of Items: 1
The status of the pending policy counter.
Show Source
Nested Schema : PendingPolicyCounterStatus
Type: object
The status of the pending policy counter.
Show Source

400 Response

The request isn't valid.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

401 Response

The client doesn't have the correct privileges.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

403 Response

The request wasn't authorized.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

404 Response

The requested resource couldn't be found.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

411 Response

The content's length is missing from the request.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

413 Response

The request is too large for the server to process.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

415 Response

The media type isn't supported.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

429 Response

The client has sent too many requests at once.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

500 Response

An internal server error occurred.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

503 Response

The server is overloaded or down for maintenance.
Body ()
Root Schema : Error
Type: object
An error.
Show Source

Callbacks

statusNotification
Method: post
Path: {$request.body#/notifUri}/notify
subscriptionTermination
Method: post
Path: {$request.body#/notifUri}/terminate
Back to Top

Examples

The following example shows how to create a spending limit control subscription by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".

The -d option specifies the file to attach as the request body.

curl -X POST 'apiRoot/nchf-spendinglimitcontrol/v1/subscriptions" -H "accept: */*" -H "Content-Type: application/json" -d @file.json

where:

  • apiRoot is for accessing the HTTP Gateway server at either http://hostname:httpPort or https://hostname:httpsPort.

  • file.json is the JSON file that specifies the spending limit subscription to create.

Example of Request Body

The following is an example of the contents of the file.json file sent as the request body:

{
   "supi": "imsi-6500000427",
   "expiry": "2022-07-12T03:12:10.293Z",
   "notifUri": "http://test.example.com",
   "policyCounterIds": [
      "BOOSTPCS"
   ],
   "supportedFeatures": "F"
}  

Example of Response Body

If successful, the 201 response code is returned along with a header and response body. The following shows sample header contents:

connection: keep-alive
content-type: application/json
date: Tue, 12 Jul 2022 08:43:23 +0530
location: apiroot/nchf-spendinglimitcontrol/v1/subscriptions/imsi-6500000427
transfer-encoding: chunked

The following shows sample response body contents:

{
   "supi": "imsi-6500000427",
   "statusInfos": {
      "BOOSTPCS": {
         "policyCounterId": "BOOSTPCS",
         "currentStatus": "Active"
      }
   },
   "expiry": null,
   "supportedFeatures": null
}
Back to Top