The API caller must have the VSR role to run the API.
Table 1. API details
| Method | Resource address | Input representation |
| POST | /resource/subscription | A JavaScript™ Object Notation (JSON) entry that represents a subscription order. |
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, MONTHS, and DAYS. |
| 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