All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
addSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats |
cancelSubscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription |
changeSubscriptionPrice | POST /subscription/{subscriptionId}/price | Change Price |
createSubscription | POST /customer/{customerId}/subscription/start | Create Subscription |
customerChangeSubscriptionPlan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
extendTrial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
listSubscriptionPlans | GET /subscription/plans | List Subscription Plans |
listSubscriptions | GET /subscription | List |
removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
showSubscriptionById | GET /subscription/{subscriptionId} | Detail |
startTrial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
InlineResponse20011 addSeatsSubscriptions(body, subscriptionId)
Add Seats
Adds seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SeatsAddBody(); // SeatsAddBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.addSeatsSubscriptions(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsAddBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
'String' cancelSubscription(body, subscriptionId)
Cancel Subscription
Info for a specific subscription
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionIdCancelBody(); // SubscriptionIdCancelBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.cancelSubscription(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdCancelBody | ||
subscriptionId | String | The id of the subscription to retrieve |
'String'
- Content-Type: application/json
- Accept: application/json
InlineResponse20011 changeSubscriptionPrice(body, subscriptionId)
Change Price
Changes the price being used for a price. Useful for changing pricing schedule or just price.
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionIdPriceBody(); // SubscriptionIdPriceBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.changeSubscriptionPrice(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPriceBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription createSubscription(body, customerId)
Create Subscription
Create subscription for a customer
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionStartBody(); // SubscriptionStartBody |
let customerId = "customerId_example"; // String | The id of the customer to retrieve
apiInstance.createSubscription(body, customerId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionStartBody | ||
customerId | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription customerChangeSubscriptionPlan(body, subscriptionId)
Change Subscription Plan
Change the subscription plan for a customer
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionIdPlanBody(); // SubscriptionIdPlanBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.customerChangeSubscriptionPlan(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPlanBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription extendTrial(body, subscriptionId)
Extend Trial Subscription
Extend a trial subscription so it's converted from a trial to a normal subscription.
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionIdExtendBody(); // SubscriptionIdExtendBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.extendTrial(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdExtendBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
InlineResponse2006 getActiveForCustomer(customerId)
List Customer Active Subscriptions
List all Active customer subscriptions
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
apiInstance.getActiveForCustomer(customerId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 getForCustomer(customerId)
List Customer Subscriptions
List all customer subscriptions<br><br><strong>Since 1.1</strong>
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
apiInstance.getForCustomer(customerId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
customerId | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse20010 listSubscriptionPlans(opts)
List Subscription Plans
List all subscriptions plans
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let opts = {
'limit': 56, // Number | How many items to return at one time (max 100)
'lastKey': "lastKey_example" // String | The key to be used in pagination to say what the last key of the previous page was
};
apiInstance.listSubscriptionPlans(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | How many items to return at one time (max 100) | [optional] |
lastKey | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 listSubscriptions(opts)
List
List all subscriptions
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let opts = {
'limit': 56, // Number | How many items to return at one time (max 100)
'lastKey': "lastKey_example" // String | The key to be used in pagination to say what the last key of the previous page was
};
apiInstance.listSubscriptions(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | How many items to return at one time (max 100) | [optional] |
lastKey | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse20011 removeSeatsSubscriptions(body, subscriptionId)
Remove Seats
Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SeatsRemoveBody(); // SeatsRemoveBody |
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.removeSeatsSubscriptions(body, subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsRemoveBody | ||
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription showSubscriptionById(subscriptionId)
Detail
Info for a specific subscription
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let subscriptionId = "subscriptionId_example"; // String | The id of the subscription to retrieve
apiInstance.showSubscriptionById(subscriptionId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
subscriptionId | String | The id of the subscription to retrieve |
- Content-Type: Not defined
- Accept: application/json
Subscription startTrial(body, customerId)
Start Trial Subscription For Customer
Start subscription for a customer
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new BillaBear.SubscriptionsApi();
let body = new BillaBear.SubscriptionTrialBody(); // SubscriptionTrialBody |
let customerId = "customerId_example"; // String | The id of the customer to retrieve
apiInstance.startTrial(body, customerId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionTrialBody | ||
customerId | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json