Get a list of subscriptions customer related
GET https://api.billagain.com/v1/customers/{customerID}/subscriptions
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| page |
Numeric |
Current page number |
| page_size |
Numeric |
Amount of items on requested page |
| Parameter |
Format |
Description |
| subscriptionID |
Numeric |
Unique subscription identifier |
| customerID |
Numeric |
Unique customer identifier |
| packageID |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier |
| packageVersionNumber |
Numeric |
Unique package version number |
| comp_nextInvDate |
Date |
Computed date whereby the next subscription invoice will be send |
| comp_Status |
Alpha |
Computed subscription status:
- future - Subscription is not currently active but will start at a date specified
- trial - Subscription is currently on a trial period and running its trial terms as specified in its selected package’s set up
- active- Subscription is currently in progress and being billed to its customer
- cancelled – Subscription has been terminated and is not being billed to the Customer
- expired - The Subscription has reached its end date and Is no longer being billed to the Customer
|
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier required if no componentVersionNumber is passed through |
| componentVersionNumber |
Numeric |
Unique component version number |
| Memo |
Alpha Numeric |
Specific component usage memo |
| NumUnits |
Numeric |
Current units used |
| isSetUnits |
Numeric |
Indicate if component usage units has been set for current component |
|
| CustomerName |
Alpha |
Specific subscription customer name |
| EndDate |
Date |
Specific subscription end date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| isCancelled |
Boolean |
Indicates if subscription is cancelled |
| isExpired |
Boolean |
Indicates if subscription is expired |
| lastInvDate |
Date |
|
| lastRenewDate |
Date |
Previous date the current subscription invoice was sent on |
| LastModified |
Date |
Last date specific subscription was modified |
| nextRenewDate |
Date |
Next date the specific subscription invoice will be send on |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| PackageName |
Alpha Numeric |
Specific subscription package name |
| packageRateTermID |
Numeric |
Specific subscription package rate term identifier |
| StartDate |
Date |
Specific subscription start date |
| Term |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
| TrialEndDate |
Date |
Specific subscription trial end date |
| isFutureChange |
Boolean |
Indicates if subscription has future changes |
| isProRata |
Boolean |
Indicates if pro rate applies to current subscription |
JSON Output
HTTP CODE: 200 OK
[
{
"packageRateTermID": 792,
"CustomerName": "Rudi ",
"customerID": 268,
"PackageName": "AGENT-BASIC",
"subscriptionID": 10207,
"packageID": 291,
"packageVersionID": 296,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-05-01T00:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-04-05T09:14:40.1715987+00:00",
"comp_nextInvDate": "2016-05-01T00:00:00+00:00",
"comp_Status": "Future",
"componentUsage": [ ],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10186,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-01-16T13:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-01-16T13:12:51.7837721+00:00",
"comp_nextInvDate": "2016-02-16T13:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 20000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10205,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-04-04T00:00:00+02:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-04-04T08:12:27.4427299+00:00",
"comp_nextInvDate": "2016-02-16T13:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 20000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10185,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-01-15T15:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": "2016-01-16T13:12:08.1913733+00:00",
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": true,
"numDaysBeforeToInv": 0,
"LastModified": "2016-01-15T15:17:29.5149402+00:00",
"comp_nextInvDate": "2016-02-15T15:00:00+00:00",
"comp_Status": "Cancelled",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 25000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 784,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "TRADER-BASIC",
"subscriptionID": 10206,
"packageID": 287,
"packageVersionID": 292,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-04-01T14:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": "2016-08-01T14:00:00+00:00",
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 3,
"LastModified": "2016-04-05T06:40:39.0188236+00:00",
"comp_nextInvDate": "2016-03-29T14:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [ ],
"isFutureChange": false,
"isProRata": false
}
]
Get a list of subscriptions
GET https://api.billagain.com/v1/subscriptions
| Parameter |
Format |
Description |
| page |
Numeric |
Current page number |
| page_size |
Numeric |
Amount of items on requested page |
| Parameter |
Format |
Description |
| subscriptionID |
Numeric |
Unique subscription identifier |
| customerID |
Numeric |
Unique customer identifier |
| packageID |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier |
| packageVersionNumber |
Numeric |
Unique package version number |
| comp_nextInvDate |
Date |
Computed date whereby the next subscription invoice will be send |
| comp_Status |
Alpha |
Computed subscription status:
- future - Subscription is not currently active but will start at a date specified
- trial - Subscription is currently on a trial period and running its trial terms as specified in its selected package’s set up
- active- Subscription is currently in progress and being billed to its customer
- cancelled – Subscription has been terminated and is not being billed to the Customer
- expired - The Subscription has reached its end date and Is no longer being billed to the Customer
|
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier required if no componentVersionNumber is passed through |
| componentVersionNumber |
Numeric |
Unique component version number |
| Memo |
Alpha Numeric |
Specific component usage memo |
| NumUnits |
Numeric |
Current units used |
| isSetUnits |
Numeric |
Indicate if component usage units has been set for current component |
|
| CustomerName |
Alpha |
Specific subscription customer name |
| EndDate |
Date |
Specific subscription end date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| isCancelled |
Boolean |
Indicates if subscription is cancelled |
| isExpired |
Boolean |
Indicates if subscription is expired |
| lastInvDate |
Date |
|
| lastRenewDate |
Date |
Previous date the current subscription invoice was sent on |
| LastModified |
Date |
Last date specific subscription was modified |
| nextRenewDate |
Date |
Next date the specific subscription invoice will be send on |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| PackageName |
Alpha Numeric |
Specific subscription package name |
| packageRateTermID |
Numeric |
Specific subscription package rate term identifier |
| StartDate |
Date |
Specific subscription start date |
| Term |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
| TrialEndDate |
Date |
Specific subscription trial end date |
| isFutureChange |
Boolean |
Indicates if subscription has future changes |
| isProRata |
Boolean |
Indicates if pro rate applies to current subscription |
JSON Output
HTTP CODE: 200 OK
[
{
"packageRateTermID": 792,
"CustomerName": "Rudi ",
"customerID": 268,
"PackageName": "AGENT-BASIC",
"subscriptionID": 10207,
"packageID": 291,
"packageVersionID": 296,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-05-01T00:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-04-05T09:14:40.1715987+00:00",
"comp_nextInvDate": "2016-05-01T00:00:00+00:00",
"comp_Status": "Future",
"componentUsage": [ ],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10186,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-01-16T13:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-01-16T13:12:51.7837721+00:00",
"comp_nextInvDate": "2016-02-16T13:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 20000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10205,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-04-04T00:00:00+02:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-04-04T08:12:27.4427299+00:00",
"comp_nextInvDate": "2016-02-16T13:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 20000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 760,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10185,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-01-15T15:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": "2016-01-16T13:12:08.1913733+00:00",
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": true,
"numDaysBeforeToInv": 0,
"LastModified": "2016-01-15T15:17:29.5149402+00:00",
"comp_nextInvDate": "2016-02-15T15:00:00+00:00",
"comp_Status": "Cancelled",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 1,
"NumUnits": 25000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
},
{
"packageRateTermID": 784,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "TRADER-BASIC",
"subscriptionID": 10206,
"packageID": 287,
"packageVersionID": 292,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-04-01T14:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": "2016-08-01T14:00:00+00:00",
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 3,
"LastModified": "2016-04-05T06:40:39.0188236+00:00",
"comp_nextInvDate": "2016-03-29T14:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [ ],
"isFutureChange": false,
"isProRata": false
}
]
Get specific subscriptions
GET https://api.billagain.com/v1/subscriptions/{subscriptionID}
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| subscriptionID |
Numeric |
Unique subscription identifier |
| customerID |
Numeric |
Unique customer identifier |
| packageID |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier |
| packageVersionNumber |
Numeric |
Unique package version number |
| comp_nextInvDate |
Date |
Computed date whereby the next subscription invoice will be send |
| comp_Status |
Alpha |
Computed subscription status:
- future - Subscription is not currently active but will start at a date specified
- trial - Subscription is currently on a trial period and running its trial terms as specified in its selected package’s set up
- active- Subscription is currently in progress and being billed to its customer
- cancelled – Subscription has been terminated and is not being billed to the Customer
- expired - The Subscription has reached its end date and Is no longer being billed to the Customer
|
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier required if no componentVersionNumber is passed through |
| componentVersionNumber |
Numeric |
Unique component version number |
| Memo |
Alpha Numeric |
Specific component usage memo |
| NumUnits |
Numeric |
Current units used |
| isSetUnits |
Numeric |
Indicate if component usage units has been set for current component |
|
| CustomerName |
Alpha |
Specific subscription customer name |
| EndDate |
Date |
Specific subscription end date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| isCancelled |
Boolean |
Indicates if subscription is cancelled |
| isExpired |
Boolean |
Indicates if subscription is expired |
| lastInvDate |
Date |
|
| lastRenewDate |
Date |
Previous date the current subscription invoice was sent on |
| LastModified |
Date |
Last date specific subscription was modified |
| nextRenewDate |
Date |
Next date the specific subscription invoice will be send on |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| PackageName |
Alpha Numeric |
Specific subscription package name |
| packageRateTermID |
Numeric |
Specific subscription package rate term identifier |
| StartDate |
Date |
Specific subscription start date |
| Term |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
| TrialEndDate |
Date |
Specific subscription trial end date |
| isFutureChange |
Boolean |
Indicates if subscription has future changes |
| isProRata |
Boolean |
Indicates if pro rate applies to current subscription |
JSON Output
HTTP CODE: 200 OK
{
"packageRateTermID": null,
"CustomerName": "Ashtonio ",
"customerID": 269,
"PackageName": "CU-Agent-Paid-01",
"subscriptionID": 10186,
"packageID": 275,
"packageVersionID": 280,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-01-16T13:00:00+00:00",
"firstProrataSyncDate": null,
"EndDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 0,
"LastModified": "2016-01-16T13:12:51.7837721+00:00",
"comp_nextInvDate": "2016-02-16T13:00:00+00:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 95,
"componentVersionID": 122,
"componentVersionNumber": 0,
"NumUnits": 20000,
"isSetUnits": true,
"Memo": null
}
],
"isFutureChange": false,
"isProRata": false
}
Add subscription
POST https://api.billagain.com/v1/subscriptions
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| packageID req |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier. Required only if version number is not specified |
| packageVersionNumber |
Numeric |
Unique package version number |
| packageRateTermID req |
Numeric |
Specific subscription package rate term identifier |
| componentUsage |
Object List |
|
| componentID req |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier, Required if no componentVersionNumber is specified |
| componentVersionNumber |
Numeric |
Unique component version identifier |
| NumUnits req |
Numeric |
Current units used |
|
| StartDate req |
Date |
Specific subscription start date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| EndDate |
Date |
Specific subscription end date |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| Term req |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType req |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
| Parameter |
Format |
Description |
| subscriptionID |
Numeric |
Unique subscription identifier |
| customerID |
Numeric |
Unique customer identifier |
| packageID |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier |
| packageVersionNumber |
Numeric |
Unique package version number |
| comp_nextInvDate |
Date |
Computed date whereby the next subscription invoice will be send |
| comp_Status |
Alpha |
Computed subscription status:
- Future - Subscription is not currently active but will start at a date specified
- Trial - Subscription is currently on a trial period and running its trial terms as specified in its selected package’s set up
- Active- Subscription is currently in progress and being billed to its customer
- Cancelled – Subscription has been terminated and is not being billed to the Customer
- Expired - The Subscription has reached its end date and Is no longer being billed to the Customer
|
| componentUsage |
Object List |
|
| componentID |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier |
| componentVersionNumber |
Numeric |
Component version number |
| isSetUnits |
Alpha Numeric |
Indicates id units has been set for specific component usage |
| NumUnits |
Numeric |
Current units used |
|
| CustomerName |
Alpha |
Specific subscription customer name |
| EndDate |
Date |
Specific subscription end date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| isCancelled |
Boolean |
Indicates if subscription is cancelled |
| isExpired |
Boolean |
Indicates if subscription is expired |
| lastInvDate |
Date |
|
| lastRenewDate |
Date |
Previous date the current subscription invoice was sent on |
| LastModified |
Date |
Last date specific subscription was modified |
| nextRenewDate |
Date |
Next date the specific subscription invoice will be send on |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| PackageName |
Alpha Numeric |
Specific subscription package name |
| packageRateTermID |
Numeric |
Specific subscription package rate term identifier |
| StartDate |
Date |
Specific subscription start date |
| Term |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
| TrialEndDate |
Date |
Specific subscription trial end date |
| isFutureChange |
Boolean |
Indicates if subscription has future changes |
| isProRata |
Boolean |
Indicates if pro rate applies to current subscription |
JSON Input
{
"customerID":303,
"packageID":290,
"packageVersionID":295,
"packageVersionNumber":1,
"packageRateTermID":790,
"componentUsage":[{
"componentID":103,
"componentVersionID":129,
"componentVersionNumber":1,
"NumUnits":1
}],
"StartDate":"04/jan/2016",
"firstProrataSyncDate":null,
"EndDate":null,
"numDaysBeforeToInv":1,
"Term":1,
"TermType":"months"
}
JSON Output
HTTP CODE: 201 Created
{
"packageRateTermID": null,
"CustomerName": null,
"customerID": 303,
"PackageName": null,
"subscriptionID": 10214,
"packageID": 290,
"packageVersionID": 295,
"packageVersionNumber": 1,
"Term": 1,
"TermType": "months",
"StartDate": "2016-04-06T00:00:00+02:00",
"firstProrataSyncDate": null,
"TrialEndDate": "2017-02-04T00:00:00+02:00",
"lastInvDate": null,
"lastRenewDate": null,
"nextRenewDate": "2017-01-04T00:00:00+02:00",
"isExpired": false,
"isCancelled": false,
"numDaysBeforeToInv": 1,
"LastModified": "2016-04-06T12:51:06.7910533+00:00",
"comp_nextInvDate": "2016-04-05T00:00:00+02:00",
"comp_Status": "Active",
"componentUsage": [
{
"componentID": 103,
"componentVersionID": 129,
"componentVersionNumber": 0,
"NumUnits": 1,
"isSetUnits": true
}
],
"isFutureChange": false,
"isProRata": false
}
Cancel specific subscription
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/cancel
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| CancelType req |
Alpha |
Type of cancelation:
- renewal - Set Cancel Date To Renewal Date
- immediate - Cancel subscription immediatly
|
| CreditType req |
Alpha |
Credit Type:
- prorata - Cancel subscription, Part Credit for Period (last Due Date - Now)
- fullcredit - Cancel subscription, Full Credit for Period (last Due Date - Next Due Date)
- nocredit - Cancel subscription, Customer will not get any credit
|
| InvoiceType req |
Alpha |
Invoice Type:
|
| Reason req |
Numeric |
Specify the reason for cancelation of subscription |
JSON Input
{
"CancelType":"renewal",
"CreditType":"nocredit",
"InvoiceType":"invoice",
"Reason":"Subscription has ended"
}
JSON Output
HTTP CODE: 204 No Content
Change specific subscription package
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/changePackage
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| packageID req |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier, required only if packageVersionNumber is not set |
| packageVersionNumber |
Numeric |
Unique package version identifier |
| ChangeDate |
Date |
Date you wish subscription to be changed to. Will be used to calculater isFutureChange if not null. If field is null the package change will be immediately |
| isProRata req |
Numeric |
Indicate if changes should be done pro rata |
JSON Input
{
"customerID":303,
"packageID":291,
"packageVersionID":296,
"ChangeDate":"12/may/2016",
"isProRata":true
}
JSON Output
HTTP CODE: 204 No Content
Changes specific subscription terms
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/changeterm
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| packageID req |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier, required only if packageVersionNumber is not set |
| packageVersionNumber |
Numeric |
Unique package version identifier |
| packageRateTermID |
Numeric |
Unique pacakgae rate term identifier, Required if term and term type is not specified |
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID req |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier, Required if no componentVersionNumber is specified |
| componentVersionNumber |
Numeric |
Unique component version identifier |
| NumUnits |
Numeric |
Current units used |
|
| Term |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
JSON Input
{
"customerID":303,
"packageID":290,
"packageVersionID":0,
"packageVersionNumber":1,
"packageRateTermID":0,
"componentUsage":[{
"componentID":103,
"componentVersionID":0,
"componentVersionNumber":1,
"NumUnits": 3
}],
"Term":12,
"TermType":"months"
}
JSON Output
HTTP CODE: 204 No Content
Change subscription start date
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/changestartdate
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| StartDate |
Date |
Current subscription start date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
JSON Input
{
"StartDate": "04/june/2016",
"firstProrataSyncDate": "04/july/2016"
}
JSON Output
HTTP CODE: 204 No Content
Change subscription end date
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/changeenddate
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| EndDate |
Date |
Current subscription end date, can be set to null if subscription has no end date |
JSON Input
{
"EndDate":"3/june/2018"
}
JSON Output
HTTP CODE: 204 No Content
Reactivate specific subscription
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/reactivate
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| packageID req |
Numeric |
Unique package identifier |
| packageVersionID |
Numeric |
Unique package version identifier, required only if packageVersionNumber is not set |
| packageVersionNumber |
Numeric |
Unique package version identifier |
| packageRateTermID req |
Numeric |
Unique package rete term identifier |
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID req |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier, Required if no componentVersionNumber is specified |
| componentVersionNumber |
Numeric |
Unique component version identifier |
| NumUnits req |
Numeric |
Current units used |
|
| StartDate req |
Date |
Specific subscription start date |
| firstProrataSyncDate |
Date |
Subscription will start immediately, however the customer will be charged a pro rated amount |
| EndDate |
Date |
Specific subscription end date |
| numDaysBeforeToInv |
Numeric |
Amount of days before the specific subscription invoice will be send |
| Term req |
Numeric |
Specific subscription period between billings for the Subscription |
| TermType req |
Alpha |
Specific subscription term type:
- months - Billed on n monthly basis.
- days - Billed on n daily basis.
|
JSON Input
{
"customerID":303,
"packageID":290,
"packageVersionID":295,
"packageVersionNumber":0,
"packageRateTermID":790,
"componentUsage":[{
"componentID":103,
"componentVersionID":0,
"componentVersionNumber":1,
"NumUnits":1
}],
"StartDate":"24/jan/2017",
"firstProrataSyncDate":null,
"EndDate":null,
"nextDueDate":null,
"numDaysBeforeToInv":0,
"Term":1,
"TermType":"months"
}
JSON Output
HTTP CODE: 204 No Content
Remove specific subscription future changes
DELETE https://api.billagain.com/v1/subscriptions/{subscriptionID}/futurechanges
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
JSON Output
HTTP CODE: 204 No Content
Modify specific subscription components
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/components/modify
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| customerID req |
Numeric |
Unique customer identifier |
| componentUsage |
Object List |
Specify component usage for specific subscription |
| componentID req |
Numeric |
Unique component identifier |
| componentVersionID |
Numeric |
Unique component version identifier, Required if no componentVersionNumber is specified |
| componentVersionNumber |
Numeric |
Unique component version identifier |
| NumUnits |
Numeric |
Component usage amount |
|
JSON Input
{
"customerID":303,
"componentUsage":[{
"componentID":103,
"componentVersionID":129,
"componentVersionNumber":null,
"NumUnits":5
}]
}
JSON Output
HTTP CODE: 204 No Content
To increase or decrease component usage, meant for scenarios where usage changes in the period
PUT https://api.billagain.com/v1/subscriptions/{subscriptionID}/components/recordusage
| Parameter |
Format |
Description |
| subscriptionID req |
Numeric |
Unique subscription identifier |
| Parameter |
Format |
Description |
| componentID req |
Numeric |
Unique component identifier |
| customerID req |
Numeric |
Unique customer identifier |
| Quantity req |
Numeric |
Specicfic subscription usage quantity |
| isDecrease |
Boolean |
Indicate if the change is a increase or decrease, if not set will defualt to false |
JSON Input
{
"componentID":103,
"customerID":303,
"Quantity":100
}
JSON Output
HTTP CODE: 204 No Content