Subscription
A subscription record exposes a SuiteBilling subscription to REST web services. This record:
-
is not a subrecord
-
has no subrecords
The REST API Browser includes information about the field names and field types of the subscription record, and about the HTTP methods, request parameters, and operations available to this record. For details, see the REST API Browser’s subscription reference page.
For information about using the REST API Browser, see The REST API Browser.
Record ID
The record ID for a subscription REST record is subscription.
Prerequisites
You must Enabling SuiteBilling Features before you can use this record through REST web services.
Limitations
A subscription REST record does not show change orders, related records, or system information.
Code Samples
These samples show common use cases for creating subscriptions.
Create with all Header Fields
{ "name": "REST-Subscription", "customer": 4, "billingAccount": 1, "subscriptionPlan": 8, "priceBook": 1, "initialTerm": {"id" : -102}, "startDate": "2019-2-20", "billingSchedule": 1, "billingFrequency": "MONTHLY", "defaultRenewalTerm": {"id" : 2}, "autoRenewal": true, "advanceRenewalPeriodNumber": 5, "advanceRenewalPeriodUnit": "DAYS", "defaultRenewalMethod": "CREATE_NEW_SUBSCRIPTION", "defaultRenewalPriceBook": {"id" : 103}, "defaultRenewalPlan": {"id" : 8}, "defaultRenewalTranType": "SalesOrd", "endDate": "2022-3-5"
}
Create with Different Pricing Values
{ "name": "REST-Subscription_with_pricing", "customer": 4, "billingAccount": 1, "subscriptionPlan": 8, "priceBook": 1, "initialTerm": {"id" : 1}, "startDate": "2019-2-20", "billingFrequency": "MONTHLY", "priceinterval": { "items": [{ "subscriptionplanlinenumber": 2, "quantity": 3, "repeatEvery": 2, "pricePlan": {"id": 820}, "frequency": "ANNUALLY" }] }
}
Create a New Price Interval
{ "name": "REST-Subscription_with_pricing", "customer": 4, "billingAccount": 1, "subscriptionPlan": 8, "priceBook": 1, "initialTerm": {"id" : 1}, "startDate": "2019-2-20", "billingFrequency": "MONTHLY", "priceinterval": { "items": [{ "subscriptionplanlinenumber": 2, "linenumber": 2, "quantity": 2, "startDate": "2019-4-20", "pricePlan": {"id": 1020}, "frequency": "MONTHLY", "repeatEvery": 1 }] }
}
Create with Different Subline Values
{ "name": "REST-Subscription_with_pricing", "customer": 4, "billingAccount": 1, "subscriptionPlan": 8, "priceBook": 1, "initialTerm": {"id" : 1}, "startDate": "2019-2-20", "billingFrequency": "MONTHLY", "subscriptionline": { "items": [{ "linenumber": 1, "includeinrenewal": true, "revrecoption": "OVER_TERM" }, { "linenumber": 2, "proratestartdate": false, "prorateenddate": false, "includeinrenewal": false }] }
}
Create with an Add-On Item
{ "name": "REST-Subscription_with_pricing", "customer": 4, "billingAccount": 1, "subscriptionPlan": 8, "priceBook": 1, "initialTerm": {"id" : 1}, "startDate": "2019-2-20", "billingFrequency": "MONTHLY", "subscriptionline": { "items": [{ "linenumber": 4, "includeinrenewal": true, "item": 5, "subscriptionlinetype": 2, "billingMode": "IN_ADVANCE", "proratestartdate": false, "prorateenddate": true, "isincluded": false }] }, "priceinterval": { "items": [{ "subscriptionplanlinenumber": 4, "linenumber": 4, "quantity": 3, "repeatEvery": 2, "pricePlan": {"id": 1217}, "frequency": "ANNUALLY" }] }
}