Get a list of components
GET https://api.billagain.com/v1/components
None - optional paging values can be passed through
Parameter |
Format |
Description |
componentID |
Numeric |
Unique component identifier |
ComponentCode |
Numeric |
Unique component code |
Descrip |
Alpha Numeric |
Specific component description |
isActive |
Boolean |
Indicates if compnent is active |
packageGroupID |
Numeric |
Unique Package Group identifier |
Name |
Alpha Numeric |
Specific component name |
UnitName |
Alpha Numeric |
Specify specific component unit name. eg: per license / per sms / per installation |
Term |
Numeric |
Specific component term |
TermType |
Alpha |
Will either be months or days, will specify type for specified term |
Type |
Alpha |
See here for more details
|
Scheme |
Alpha |
See here for more details
|
ComponentVersions |
Object List |
|
componentID |
Numeric |
Unique component identifier |
componentVersionID |
Numeric |
Unique component version identifier |
isActive |
Boolean |
Indicates if component version is active |
isDefault |
Boolean |
Indicates if component version is default |
VersionName |
Alpha Numeric |
Component version name |
VersionNo |
Numeric |
Component version number |
|
JSON Output
HTTP CODE: 200 OK
[
{
"componentID": 103,
"packageGroupID": 95,
"ComponentCode": "SMSFree",
"Name": "SMSFree",
"UnitName": "SMS",
"Type": "quantity",
"Scheme": "unit",
"Descrip": "",
"isActive": true,
"Term": 0,
"TermType": null,
"ComponentVersions": [
{
"componentVersionID": 129,
"componentID": 103,
"VersionNo": 1,
"VersionName": "v1",
"isDefault": true,
"isActive": true,
"ComponentVersionCurrencies": null
},
{
"componentVersionID": 130,
"componentID": 103,
"VersionNo": 2,
"VersionName": "v2",
"isDefault": false,
"isActive": true,
"ComponentVersionCurrencies": null
}
]
},
{
"componentID": 94,
"packageGroupID": 93,
"ComponentCode": "asd",
"Name": "asd",
"UnitName": "12",
"Type": "quantity",
"Scheme": "volume",
"Descrip": "",
"isActive": true,
"Term": 0,
"TermType": null,
"ComponentVersions": [
{
"componentVersionID": 121,
"componentID": 94,
"VersionNo": 1,
"VersionName": "v1",
"isDefault": true,
"isActive": true,
"ComponentVersionCurrencies": null
},
{
"componentVersionID": 128,
"componentID": 94,
"VersionNo": 2,
"VersionName": "v2",
"isDefault": false,
"isActive": true,
"ComponentVersionCurrencies": null
}
]
},
{
"componentID": 102,
"packageGroupID": 93,
"ComponentCode": "Gigabyte",
"Name": "50Gb",
"UnitName": "gb",
"Type": "quantity",
"Scheme": "volume",
"Descrip": "",
"isActive": true,
"Term": 0,
"TermType": null,
"ComponentVersions": [
{
"componentVersionID": 127,
"componentID": 102,
"VersionNo": 1,
"VersionName": "v1",
"isDefault": true,
"isActive": true,
"ComponentVersionCurrencies": null
}
]
}
]
Get specific component
GET https://api.billagain.com/v1/components/{componentID}
Parameter |
Format |
Description |
componentID req |
Numeric |
Unique component identifier |
Parameter |
Format |
Description |
componentID |
Numeric |
Unique component identifier |
ComponentCode |
Numeric |
Unique component code |
Descrip |
Alpha Numeric |
Specific component description |
isActive |
Boolean |
Indicates if compnent is active |
packageGroupID |
Numeric |
Unique Package Group identifier |
Name |
Alpha Numeric |
Specific component name |
UnitName |
Alpha Numeric |
Specify specific component unit name. eg: per license / per sms / per installation |
Type |
Alpha |
See here for more details
|
Scheme |
Alpha |
See here for more details
|
ComponentVersions |
Object List |
|
componentID |
Numeric |
Unique component identifier |
componentVersionID |
Numeric |
Unique component version identifier |
isActive |
Boolean |
Indicates if component version is active |
isDefault |
Boolean |
Indicates if component version is default |
VersionName |
Alpha Numeric |
Component version name |
VersionNo |
Numeric |
Component version number |
|
JSON Output
HTTP CODE: 200 OK
{
"componentID": 103,
"packageGroupID": 0,
"ComponentCode": "SMSFree",
"Name": "SMSFree",
"UnitName": "SMS",
"Type": "quantity",
"Scheme": "unit",
"Descrip": "",
"isActive": false,
"Term": 1,
"TermType": "months",
"ComponentVersions": [
{
"componentVersionID": 130,
"componentID": 0,
"VersionNo": 2,
"VersionName": "v2",
"isDefault": false,
"isActive": false,
"ComponentVersionCurrencies": null
},
{
"componentVersionID": 129,
"componentID": 0,
"VersionNo": 1,
"VersionName": "v1",
"isDefault": true,
"isActive": false,
"ComponentVersionCurrencies": null
}
]
}
Add specific component
POST https://api.billagain.com/v1/components
Parameter |
Format |
Description |
ComponentCode req |
Alpha Numeric |
Unique component code |
Name req |
Alpha Numeric |
Unique component name |
Type req |
Alpha |
See here for more details
|
Scheme req |
Alpha |
See here for more details
|
Descrip |
Alpha Numeric |
Specific component description |
isActive |
Boolean |
Indicates if compnent is active, if not set defaults to false |
UnitName req |
Alpha Numeric |
Specify specific component unit name. eg: per license / per sms / per installation |
packageGroupID req |
Alpha Numeric |
Unique Package Group identifier |
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.
|
ComponentVersion req |
Object |
Unique customer reference |
VersionName req |
Alpha Numeric |
Current version name |
ComponentVersionCurrencies |
Object List |
|
CurrencyCode req |
Alpha |
Specify currency code |
ComponentBracketPrices |
Object List |
|
Price req |
Numeric |
Specify price |
QtyFrom req |
Numeric |
Specify quantity from |
QtyTill |
Numeric |
Specify quantity till, leave blank for infinity |
|
|
|
Parameter |
Format |
Description |
componentID |
Numeric |
Unique component identifier |
ComponentCode |
Numeric |
Unique component code |
Descrip |
Alpha Numeric |
Specific component description |
isActive |
Boolean |
Indicates if compnent is active |
packageGroupID |
Numeric |
Unique Package Group identifier |
Name |
Alpha Numeric |
Specific component name |
UnitName |
Alpha Numeric |
Specify specific component unit name. eg: per license / per sms / per installation |
Type |
Alpha |
See here for more details
|
Scheme |
Alpha |
See here for more details
|
ComponentVersions |
Object List |
|
componentID |
Numeric |
Unique component identifier |
componentVersionID |
Numeric |
Unique component version identifier |
isActive |
Boolean |
Indicates if component version is active |
isDefault |
Boolean |
Indicates if component version is default |
VersionName |
Alpha Numeric |
Component version name |
VersionNo |
Numeric |
Component version number |
|
JSON Input
{
"ComponentCode":"CMP-API1",
"Name":"Api component",
"Type":"Quantity",
"Scheme":"unit",
"Descrip":"Api test component",
"isActive":true,
"UnitName":"per license",
"packageGroupID":95,
"Term":1,
"TermType":"months",
"ComponentVersion":{
"VersionName":"API v1",
"ComponentVersionCurrencies":[{
"CurrencyCode":"ZAR",
"ComponentBracketPrices":[{
"Price":"120.00",
"QtyFrom":"1",
"QtyTill":"20"
},
{
"Price":"100.00",
"QtyFrom":"20",
"QtyTill":null
}
]
}]
}
}
JSON Output
HTTP CODE: 201 Created
{
"componentID": 105,
"packageGroupID": 95,
"ComponentCode": "CMP-API1",
"Name": "Api component",
"UnitName": "per license",
"Type": "Quantity",
"Scheme": "unit",
"Descrip": "Api test component",
"isActive": true,
"Term": 1,
"TermType": "months",
"ComponentVersions": [
{
"componentVersionID": 131,
"componentID": 105,
"VersionNo": 1,
"VersionName": "API v1",
"isDefault": true,
"isActive": true,
"ComponentVersionCurrencies": [
{
"componentVersionCurrencyID": 196,
"componentVersionID": 131,
"CurrencyCode": "ZAR",
"ComponentBracketPrices": [
{
"componentBracketID": 293,
"componentVersionCurrencyID": 196,
"QtyFrom": 1,
"QtyTill": 20,
"Price": 120
},
{
"componentBracketID": 294,
"componentVersionCurrencyID": 196,
"QtyFrom": 20,
"QtyTill": null,
"Price": 100
}
]
}
]
}
]
}
Edit specific component
PUT https://api.billagain.com/v1/components/{componentID}
Parameter |
Format |
Description |
componentID req |
Numeric |
Unique component identifier |
Parameter |
Format |
Description |
Name req |
Alpha Numeric |
Unique customer reference |
Type req |
Alpha |
See here for more details
|
Scheme req |
Alpha |
See here for more details
|
Descrip |
Alpha Numeric |
Specific component description |
isActive |
Boolean |
Indicates if compnent is active, if not set defaults to false |
UnitName req |
Alpha Numeric |
Specify specific component unit name. eg: per license / per sms / per installation |
packageGroupID req |
Alpha Numeric |
Unique Package Group identifier |
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
{
"ComponentCode":"CMP-API11",
"Name":"Api component",
"Type":"Quantity",
"Scheme":"unit",
"Descrip":"Api test component",
"UnitName":"per license",
"packageGroupID":95,
"Term":1,
"TermType":"months",
"isActive":true,
"packageGroupID":1
}
JSON Output
HTTP CODE: 200 OK
Delete component
DELETE https://api.billagain.com/
Parameter |
Format |
Description |
componentID req |
Numeric |
Unique component identifier |
JSON Output
HTTP CODE: 204 No Content