Create new plan definition version
This POST
operation creates a new version of an existing plan definition by planDefinitionId
. If successful, you receive an HTTP response code of 201
and a JSON
response.
See HTTP response codes for other response codes. |
POST /pcc/spcm/planDefinitions/<planDefinitionId>/create-new-version
+ JSON request payload
HEADER INFO
tenant: <tenantName>
authorisation: HTTP Basic Auth
content-type: application/json
accept: application/json
permissions: SPCM_PLAN_DEFINITION_CREATE_PERMISSION
URL parameters
There is one mandatory parameter.
Parameter | Type | Description |
---|---|---|
|
integer |
A unique identifier for a plan definition which was assigned by the server upon creating the plan definition. |
JSON request payload
The following example shows a payload with a new version called planDefinitionVersion2
.
You can only pass name in the JSON request for creating new plan definition versions. This just names the new version of the plan definition (which you specify with the planDefinitionId in the URL).
|
{
"name": "planDefinitionVersion2"
}
JSON response
The following example shows our JSON
response from the above JSON request payload. Note the state
being equal to EDITABLE
.
{
"id": 200,
"name": "planDefinitionVersion2",
"validityPeriod": {
"validityPeriod": "1week"
},
"grantedAmount" : {
"volumeAmount" : 1000
},
"state": "EDITABLE",
"unitMeteringType": "VOLUME",
"core": false,
"recurring": false,
"cost" : 100,
"unitAmount": "1000",
"planPrecedence": 0
}
Plan definition type descriptions
Field | Type | Description | ||
---|---|---|---|---|
|
integer |
The unique identifier for the plan. This is assigned by the server upon creating a plan definition.
|
||
|
string (255) |
The name of the plan definition.
|
||
|
string (255) |
|||
|
enum |
Defines the unit type. This can be
|
||
|
integer |
The cost or purchasing the plan. Like
|
||
|
string (255) |
A formatted string that displays for how long a plan definition exists. An example is
|
||
|
string |
Denotes the hour, minute, and second at which the plan will expire or renew.
|
||
|
integer |
The precedence of the plan over other plans purchased by the subscriber where
|
||
|
boolean |
Denotes whether a plan is recurring or not where
|
||
|
boolean |
Indicates if this plan is the core plan for the subscriber where
|
||
|
string (2048 char) |
A brief summary describing the plan. |
||
|
integer |
The amount of times a plan definition can be deactivated. |
||
|
integer |
The maximum number of times a recurring plan can recur. |
||
|
integer |
The maximum amount of unused data usage that can be carried forward when a plan is renewed.
|
||
|
boolean |
Indicates if accumulation is permitted where
|
||
|
boolean |
Indicates whether DPS is enabled where
|
||
|
boolean |
Indicates if a plan is activated upon purchase where
|
||
|
boolean |
Indicates if a plan is shared where
|
||
|
integer |
Denotes the version of the plan
|
||
|
integer |
Specifies the maximum number of recipients with whom quota can be shared.
|
||
|
integer |
The chunk size that is granted to a data session. The session reports usage after using the granted amount.
|
||
|
boolean |
{define-renewOnConsumption}
Default = false |
HTTP response codes
Code | Description | ||||
---|---|---|---|---|---|
|
success!
|
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
plan definition not found |
||||
|
conflict with target resource
|
||||
|
failed validation; this typically means that a property was not set or a value is out of range. example
|
||||
|
failed processing (after passing validation). example
|
||||
|
internal error example
|
||||
|
request rejected due to overload |