Create subscription
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 9, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

The API caller must have the VSR role to run the API.


Table 1. API details

Method
Resource address
Input representation
POST
/resource/subscription
/resource/subscription?suppressEmail=true
A JavaScript™ Object Notation (JSON) entry that represents a subscription order.
NOTE: By default email notification will be sent.suppressEmail flag is used to suppress email notification for create subscription using BSS API.

When suppressEmail=true email notification will not be sent

/resource/subscription?suppressEmail=true

 

URL parameters


None.

Input attributes


The input attribute must be a well formatted JSON object with the following information.

Table 2. Input attributes

Attribute
Required
Description
DurationUnits
Yes
The unit of duration. Valid values are YEARS and MONTHS
DurationLength
Yes
The duration of the subscription. Any positive numeric value is valid.
PartNumber
Yes
The part number of the service offering. Check your service contract for a list of values.
PartQuantity
Yes
The quantity of the service offering.
CustomerId
Yes
The ID of the customer for whom the subscription is being created.
BillingFrequency
No
The frequency for billing. Valid values include MRC, QRC, and ARC.
ServiceCode
No
The value for the service code. This value typically does not need to be specified.
OrderNumber
No
The order number for the purchase order. The default value is RESELLER-ORDER. This value typically does not need to be specified.
OrderItemAttributeSet
No
An optional set of attributes for the purchase order. These attributes are only needed when performing add-on operations. This value typically does not need to be specified.

 

 

Sample payload

{

"Order": {

"OrderItemSet": [

{

"DurationUnits": "YEARS",

"DurationLength": 2,

"PartNumber": "D08SWLL",

"PartQuantity": 5

},

{

"DurationUnits": "YEARS",

"DurationLength": 1,

"PartNumber": "D08S1LL",

"PartQuantity": 95

}

],

"CustomerId": 30097263

}

} 


Output


When the API call is successful, a list of subscription IDs and part numbers are returned, for example:

{"List": [{"SubscriptionId":16697,"PartNumber":"D08SWLL"},

{"SubscriptionId":16698,"PartNumber":"D08S1LL"}]}


For a list of common HTTP status codes that are returned for API calls, see HTTP status codes.

Parent topic: Subscription management services

 

 

 

Input
Method URI Description
POST /api/bss/resource/subscription
Content Type: application/json
Sample Request:
{
   "Order": {
       "OrderItemSet":  [
           {
               "DurationUnits": "YEARS",
               "DurationLength": 2,
               "PartNumber": "D08SWLL",
               "PartQuantity": 5
           },
           {
               "DurationUnits": "YEARS",
               "DurationLength": 1,
               "PartNumber": "D08S1LL",
               "PartQuantity": 95
           }
       ],
       "CustomerId": 30097263
   }
} 
Use the table below that represents the expected fields:
Name Type Optional Description
DurationUnits
string No The unit of duration. Valid values are YEARS, MONTHS, and DAYS.
DurationLength
int No The duration of the subscription. Any positive numeric value is valid.
PartNumber
string No The part number of the service offering. Check your service contract for a list of values.
PartQuality
string No The quantity of the service offering.
CustomerId
string No The ID of the customer for whom the subscription is being created.
BillingFrequency
string Yes The frequency for billing. Valid values include MRC, QRC, and ARC.
ServiceCode
string Yes The value for the service code. This value typically does not need to be specified.
OrderNumber
string Yes The order number for the purchase order. The default value is RESELLER-ORDER. This value typically does not need to be specified.
OrderItemAttributeSet
object Yes An optional set of attributes for the purchase order. These attributes are only needed when performing add-on operations. This value typically does not need to be specified.
Name Type Optional Description
supressEmail
string Yes Flag to suppress email notification for create subscription.
Examples
When the API call is successful, a list of subscription IDs and part numbers are returned, for example:

Response returned by the server
{"List": [{"SubscriptionId":16697,"PartNumber":"D08SWLL"},
{"SubscriptionId":16698,"PartNumber":"D08S1LL"}]}